★ wanayoo — archive 1999 http://weblogs.java.net/pub/wlg/117Nouvelle recherche | Portail wanayoo
   » search tips  |  Search:   
 Java  The Source for Java Technology Collaboration
 
 
 
Weblog
Get Involved
Register
Login
java-net Project
Press Center
 
Community
Community Directory
Member Organizations
Projects

Weblogs
 - James Gosling
 - Daniel Steinberg
Wiki
 
 
 
RSS feed of all Java Today weblogs.
 
   
Eitan Suez
Patterns independent of scale: the pull model
Eitan Suez (June 12, 2003 12:03PM PT)
» Permalink

i'm sitting and listening to the TS-1560 technical session on the ws-i basic profile. we're looking at a diagram of a sample application: consumers pulling goods from a retailer shelf, in turn triggering the retailer to pull inventory items from a warehouse. inventory levels reaching a minimum threshold then signal manufacturers to increase production of a specific item to replenish inventories.

suddenly it strikes me: at an entirely different scale and domain, we see online users making http requests against servers. but typically what we see there is a push model: the http server pushes the request to an application server which then requests information from a database server. applying our pattern from the world of manufacturing where a good is pulled from manufacturer to consumer, we see a more natural solution:

an end user makes an information request, the http server is the retailer; it can satisfy that request if its cache (inventory) contains the item (though caches don't typically get low, they do often get stale, similar to consumer goods). the cache saves an expensive trip to the warehouse.

what if instead of pushing the request to the app server, we were to post the request to a javaspace or a jms server. then workers (manufacturers) could pull the items off the space (or queue) and service the request. so what we see here is the same pattern manifesting itself at two levels of scale. analyzing the solution further we can see it's a good one, because it naturally supports issues such as the ability of the system to serve larger numbers of requests by simply adding workers, without having to revise the "design." it's still the same pattern. we can make more inferences too in terms of the natural resilience of such a solution: if a worker dies the system is still running; if one worker is "more able" than another, it will naturally pull proportionally more requests than its fellow worker.

so the fit is natural, organic almost. and we say that it is good. :)

the morals that i'd like to suggest as they pertain to javaone are and the sessions i've attended this morning (which were TS-1624 [delegating jfc data models to collections], TS-1381 [an intro to jini] and TS-1560 [ws-i basic profile]):

  • attend as many sessions as you can: they will trigger all kinds of thoughts and ideas (if you're like me, write them down before they vanish from short-term memory)
  • look for synergies possibly emerging from combining various technologies
  • if you haven't done so yet, read "the timeless way" (this book is not about software development, but applies quite well to software development)
  • if like me, you "have not had the time" to take a good look at jini, i recommend it very highly. jini is one of those "substance over hype" value propositions, and embodies simplicity.


Eitan Suez is a programmer living and working in Austin, Texas. He has been programming in Java since 1995 and is a certified Java programmer.

Showing messages 1 through 1 of 1.

Titles Only Main Topics Oldest First
  • You should have attended TS-3024...
    2003-07-11 18:59:11 scottganyo [Reply]

    In my JavaOne session, I described exactly the pull-based scenario you describe using Jini and JavaSpaces. In fact, it's not just theory, it is running our production environment at eTapestry (http://www.eTapestry.com) right now. And it works great!

    BTW: If you'd like more information and have joined JavaOne Online, the session is available here:

    http://javaoneonline.mentorware.net/servlet/mware.servlets.StudentServlet?mt=1057974728548&mwaction=/old?u=http%3A%2F%2Fweblogs.java.net%2Fpub%2Fwlg%2FshowDescr%26class_id%3D21771%26subsysid%3D2000%26from%3Dtechnical%26fromtopic%3DSearch%3Cp&y=1999>Scott


Showing messages 1 through 1 of 1.