Sunday, May 9, 2010

The power of messaging

I've written some posts about messaging in enterprise eclipse applications. Yesterday I made another quick hack thats really beautiful to me. In our app we have lots of ValueLists that make up the selections in the combos. These lists are customizable, so they may change. Up to now you had to restart the client to make the changes take effect as the lists were once fetched from the server at workbench startup.

Now I made a simple change, if I get an update to a list from the server, i send an invalidate message to all online clients through xmpp (did I mention we use apache vysper as xmpp host ?) the client then simple removes the list from its storage and next time its needed it will get fetched from the server with its new state.

Took me 15 minutes to implement the whole thing and now the lists in the client are always up-to-date.
Nice :) This could make up a whole client side caching mechanism if needed.

No comments:

Using Mapstruct with Protobuf3