Archive for the ‘Usability’ Category

Simple Performance Improvement with Large Ehcache Disk Store Data Sets

Thursday, April 29th, 2010

One of my applications has several millions cacheable entries.  In order to cache as much as possible without going back to the database I use both a  memory store and a disk store in my Ehcache configuration.  Loading a serialized item from disk is still faster than loading from a database generally.  That being said I was running into performance issues due to the constant reads and writes to and from the disk store.   Due to the serialized nature of the data file it would block on subsequent accesses resulting in lag and performance issues.  So, how did I address it?  I decided to partition the single cache into multiple caches.  So, rather than using something like:

ehcache.getRegion(CONSTANT).get(id);

I now use:

ehcache.getRegion(CONSTANT + (id % 10));

I now have 10 different cache regions resulting in less concurrent access and better performance.  A very simple trick when you have extremely large data sets.  Remember, partitioning is always your friend regardless of what type of data you use.

UPDATE: This is being done in Ehcache 1.5.0…I understand there are better improvements in Ehcache 2.x, so please consult the documentation for more information.

RSS Viewer: Server Improvements and Maintenance Downtime [Online Again]

Wednesday, October 7th, 2009

Update [Oct 15, 2009 4:09 AM EST]: Looks like we are back up and running again and things are working much smoother now. If you see any issues, please send us an email right away so we can quickly resolve it (info@znetdevelopment.com). Notifications are currently disabled and under test and should be back live around 9:30 AM EST. Thanks for your patience. Hopefully these server updates will improve the application performance and usage.

Update [Oct 15, 2009 12:14 AM EST]: We will be going down again in 45 minutes (1:00 AM EST) for about an hour or two to move over to our latest server updates. We should have all of the kinks work out and be live soon again working better.

Update [Oct 12, 2009 7:45 AM EST]: Apparently, feeds are not processing properly and a few other issues have arised. We have decided to revert back to the old version while we look into the specific issues. We did manage to improve the performance of loading the recent items, so that fix is currently running. Stay tuned as we hope to get this major server update out in the next day or two.

Update [Oct 12, 2009 6:45 AM EST]: We are back up again and everything should be functional again and things seem more responsive and faster. Once we release our next application update, we hope to improve the performance in that aspect as well and make this one of the fastest RSS readers in the app store. Until then, stay tuned. If you notice any issues, let us know so we can investigate. This was a pretty major server-side update and while we attempt to ensure full functionality, we know that guarantees are never possible. Thanks again.

Update [Oct 12, 2009 1:44 AM EST]: We are now down and should be back up by 3:00 AM EST (7:00 AM UTC/GMT)

Update [Oct 11, 2009 12:15 AM EST]: We are postponing this until Oct 12, 2009 1:00 AM EST in order to do some final verification testing to ensure we get everything working properly. More details coming tomorrow.

This upcoming weekend we will be rolling out another set of server-side changes that should improve performance and reliability even more. This will most likely resolve the remaining issues of login difficulties, timeouts, and inability to get recent feeds or inconsistency between push notifications and recent feeds. We plan to begin rolling these updates out on Sunday, October 11 early morning starting at 1:00 AM ET (5:00 AM UTC/GMT). The expectation is to have a downtime of about an hour. During this time push notifications will not be sent and you will be unable to login. However, once the server is brought back online, you should immediately start noticing drastic improvements. Check back here to get further updates and progress or follow us on Twitter.

We would like to thank everyone for their continued support and for all of our first time buyers in the first month. Once we stabalize our servers and reliability this weekend, we plan to jump right back in to improving the client side interface and our upcoming feature list. We would love your feedback though to help us prioritize which features get in the next release. Add a comment stating your preference including google reader synchronization, dynamic keywords, sharing (digg, twitter, etc), site management (naming feeds), improved language and encoding support, landscape support, and any others you can think of.

Thanks

Eclipse Galileo (3.5) Released - My Favorite Features

Wednesday, June 24th, 2009

Eclipse Galileo has officially been released and with it comes multitudes of changes. Below are my favorites from the Platform, JDT, and Web Tools projects.

For more information, including screenshots, see:

Mac OSX Builds Use Cocoa and Sheets

The platform now uses native cocoa-build SWT widgets, rather than the obsolete Carbon. This brings the platform more in line with current Mac OSX technologies. Further, it uses Sheets for most popup dialogs to follow the OSX user interface guidelines.

Comparing Microsoft Word Documents

Comparing Microsoft Word documents in Eclipse now uses the native Microsoft Word compare support to show changes between versions. For any project that stores Word documents in source control, this feature may be nice to compare changes between versions…especially in terms of merging updates.

Open Resource Dialog

The Open Resource Dialog now allows the choice of what editor to use by right clicking to the context menu. This is a huge, yet small, benefit. Often times you may want to use a different editor than the default. This new change makes that much easier. For example, if you have custom named configuration files in XML that have an official editor (ie: JSF), you can right click to select the specific editor rather than the default XML editor.

Improved Installation/Plugin Management

Eclipse has greatly improved how plugins are added and managed, especially when adding new plugin sites.

Open Implementation Hyperlink

An Open Implementation hyperlink has been added for overridable methods, which directly opens the implementation in case there’s only one, or shows all the concrete implementations for that method in the hierarchy of its declaring type, using the quick type hierarchy. By default, the hyperlink appears when you hold down the Ctrl key while hovering over an overridable method. You can configure the modifier for this hyperlink on the General > Editors > Text Editors > Hyperlinking preference page.

This feature is a huge bonus, especially when you are navigating through source files trying to process the flow. If the class declares a type as an interface (which is usually the case), then normally you wil ctrl+click to the interface, which is obviously not what you want. This new feature allows you to pick the concrete class that you want to jump to making debugging easier.

Javadoc Viewer and Hover

The Javadoc view and hovers now support the {@inheritDoc} tag and add links to overridden methods (like the Javadoc tool). Moreover, the message for deprecated elements now shows up on top, and relative links are supported (for example, to embed images from the “doc-files” directory or to link to {@docRoot}).

This feature should make viewing javadoc inline when hovering an element easier to follow to click through to.

New JPA Entity Generation from Tables

Dali has a new Entity Generation wizard via a contribution from Oracle. This functionality includes a new wizard that offers additional configuration options.

This makes setting up JPA projects, tables, and entities much easier.

XSLT Source Editing

Content assistance is now available for the XSLT mode attribute. This attribute is on the xsl:template and xsl:apply-templates elements. The assistance will find all available modes that have been defined in the current stylesheet as well as any imported or included stylesheets.

Content Assistance is available for the name attribute on the xsl:call-template element. This will provide proposals of available named templates that can be called. This searches the current stylesheet as well as any imported or included stylesheets.

Content assistance is available for the href attribute on xsl:include and xsl:import elements. This will search the current project for any XSLT stylesheet that is available, and provide it as a possible proposal. It is limited in scope to the current project.

The XSL Tools Editor now supports the Templates View. This allows for drag and drop support of XPath templates into the editor. Users may also use this view to create and maintain new or existing templates.

XSLT Debugger

The XSLT debugger now supports a result view. The view will show the output that has been generated to the current break point. As a user steps through code the view will be updated as well.

During debugging of an XSLT Stylesheet, variables that contain NodeSets are now expandable, allowing inspection of the contents of the Nodes carried

Using Spring For Dependency Management

Sunday, April 26th, 2009

Spring is often times considered a web application library similar to the EJB 3.x stack.  However, Spring is so much more and can live in standalone applications as well.  Today I am going to touch on using Spring in standalone applications to handle dependency or configuration management.  I do not mean configuration management in the sense of CMS, but in the sense of handling and creating inner-dependencies between business objects, especially in the aspect of singletons.  One of the biggest issues with applications is high coupling by having to have objects create other objects, assign the relationships, and manage those dependencies.  However, one of the primary goals of any application is loose coupling, which in turn reduces maintenance.  Some of the traditional ways of handling these types of scenarios include:

  • Factories that create the instances and setup the dependencies.  While this abstracts the configuration to a factory, it still requires high coupling in the factory to talk to other factories and know about the objects and their inner dependencies.  It also requires static classes for the factories typically, which reduces testability.  My general rule of thumb is to reduce static classes in order to improve pluggability and testability.
  • Custom XML configuration to setup the dependencies and objects.    This pattern abstracts away all the coupling, but requires yet another XML format to be defined, a custom parser to be written, etc.  This can be a tedious operation depending on how fine grained and customizable the format is.

Spring offers a much better approach to this.  It allows you to use either annotations or XML configuration to setup the dependencies.  The difference with Spring’s XML configuration is that it is highly dynamic and flexible and offers several capabilities.  Further, Spring offers other support including AOP in order to separate and handle cross cutting concerns.  For example, you can easily add security or logging around any method invocation without the associated class having to manage that relationship.  In the end, your objects only deal with the objects they must directly deal with resulting in very loose coupling and high testability.

(more…)

Scalable NIO Servers - Part 4 - Protocol

Monday, April 20th, 2009

Now that I have narrowed by server down to using JBoss Netty, it’s time to define protocols. This involves two things. First, we need to select the actual protocol itself and second, we need to define how to construct the handlers. Let’s start by defining the handlers. Netty is built upon the principle of handlers, which are more or less the same idea as filters in web applications. This allows you to define functional handlers that perform specific tasks such as compression, security, and business logic. In this manner, one handler does not need to concern itself with another handlers and handlers can be added/removed without affecting the system. However, order and dependency does matter in certain cases. For example, if you have a handler that depends on a translation of bytes into a POJO, then the handler performing the translation must be in the pipeline and occur prior to the application logic. Generally, a semi-complex, yet real world application, for a protocol stack would consist of:

  • Encryption Handlers via SSL processing, handshakes, etc. These handlers take the data stream, decrypt it, and pass the decrypted bytes down the stream
  • Compression Handlers via GZip processing for instance. These handlers take the data stream, uncompress it, and pass the uncompressed bytes down the stream
  • Transport Protocol Handlers for converting transport protocol data in protocol messages such as HTTP. Subsequent handlers use the protocol-specific messages (ie: HTTP message) for interacting with the protoocol data
  • Security Handler for performing security in terms of authentication and authorization checks. These handlers read a header or portions of the data stream and validate the data as being both a valid, authentication user as well as being permissible or authorized or view/modify the associated data
  • Application Protocol Handlers for controlling an actual underlying application/business protocol. These differs from the transport protocols in that they specify the actual business data and commands to perform on the business data. Often times, these handlers parse out a given business command, convert to a business message or POJO, and invoke a business delegate object or handler to process the data
  • Application/Business Handlers for processing business logic related to a specific protocol message.

This type of stack allows easy extensibility and customization. Future handlers can be added in as needed and future application messages can be added in through custom delegates. It also allows the business logic code to only contain business logic without concern for security, compression, etc. The business logic deals solely with business objects and the business protocol. Further, because of this abstraction and because of the abstraction of the transport layers in Netty, supporting other transport protocols such as UDP, serial, USB, etc is an easy task.

(more…)

Quince / Home

Friday, April 17th, 2009

Just like software, user interface design or user centered design has patterns as well.  The following are a collection of various patterns with examples to sites that deploy them.  This is a very good collection of web-based patterns for your current and future web applications.

Quince

Building Scalable Servers

Thursday, April 2nd, 2009

As part of my new iPhone project to build a new game, I need to have a backend server to communicate with all the members in order to sync and dynamically update on the fly.  Knowing the iPhone and its possibilities, I want to plan for a highly optimistic future in which thousands of concurrent connections take place.  The transactions will be minimal and compressed to conserve bandwidth, but will occur frequently to monitor player actions and provide alerts to other players as they are interacted with.  So, my immediate question was where do I start.  I obviously have two primary choices:  HTTP or proprietary.  Let’s look into each option a little more in depth.

(more…)

End IE6 Support on Aug 27 Campaign

Thursday, February 19th, 2009

Microsoft Internet Explorer v6 has long been a crippling effect to web developers worldwide.  It’s slow development pace, lack of continuous updates, shortcomings in web standards, and usage of proprietary standards (ie: ActiveX) all cause developers continued headaches.  Rather than support the new web standards such as CSS 2.1 and CSS 3, HTML5, etc, developers must create workarounds.  This results in less usability, more development time, and maintenance nightmares.  If the internet is to ever see Web 3.0, we must bring IE6 support to an end.  Only then, can developers create all types of interactive and exciting content, creating a new flourishing of content.  For the positive side of life, Internet Explorer v8 is much better in terms of standards and support, although it is still far behind other browsers such as Firefox, Opera, etc.

There are only two ways to cause IE6 to cease to exist:  (1) convince all IE6 users to upgrade (2) force all users to upgrade.  In January 2009, the estimated market share of IE6 was 19% (Browser Market Share).  Unfortunately, that is too many users to either convince or just abandon.  However, we can start warning (ie: forcing) users to upgrade over a time period and once that time period has elapsed, sites immediately stop supporting IE6 and require users to upgrade to view content.  Sometimes the only way to get users to do something is to proactively suggest and eventually force them into it.

That being said, I am beginning the push to start displaying warnings to users that IE6 will be deprecated and no longer supported on August 27, 2009.  Why August 27, do you ask?  Per Wikipedia, IE6 was originally released on Aug 27, 2001.  That means that on Aug 27, 2009, 8 years will have passed.  That is more like 20-30 years in the digital technology age and plenty of time for users to have upgraded to a new version of IE or better yet another browser.

I am calling all web developers to join me in helping to bring IE6 to its final resting place in history.  As a suggestion, here are some examples for how to go about this.

  • Use IE6 javascript detection and on page load show a modal dialog telling the user they are using an older browser that will cause certain features to not work and provide a list of links to other browsers, including IE8
  • Provide an advertisement on the page that informs users that their browser needs to be updated to view improved content on the site
  • Provide a warning at the top of the page informing the user to upgrade with a list of links

Also, mention to the user that on August 27, 2009 their browser will no longer be supported.  If we can get sites to implement this, then maybe we can start causing the market share to quickly drop and eventually deteriorate by its birthday on August 27.

Note that I am not alone in this fight.  See the following:

Flickr: Designing Web Interfaces’ Photostream

Wednesday, February 11th, 2009

From the popular book Designing Web Interfaces, the following is a photo/movie collection of various sites illustrating the various interfaces and their usability effect.

Flickr: Designing Web Interfaces’ Photostream.