Re: Pattern for One-Entry-Multiple-Workers Problem
"John McClain - Sun Microsystems, Inc." <[email protected]>
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
Stefan Schulz wrote: >> Just so I can nail this down in my head, do you view the "contents + >> availability event" approach inelegant too? Or is your elegants issue >> only with using contents w/o the availability event? > > If it could be assured, that no availability event would get lost, the > most elegant way would indeed be to only have to react on such events. > Using contents() to me is a compromise with regard to completeness, > i.e., for checking upon missed events. Assured delivery of events is a tricky one. In general it will cause some component of your system to either explicitly or implicitly hold onto state. For JavaSpace05 (and spaces in general) we decided to make this state explicit. It is a more flexible approach with simpler primitives, though on the downside it can be less obvious and be too flexible. >> What rate are the your "CfPs" being generated at? Are they being >> generated by one entity or many? How much time does it take respond to a >> CfP? How many responses do you expect to get from a single CfP? > > > Well, the CfP scenario only was a simplified example of the real > application/framework we build. I cannot give an idea about incoming > events, as this depends on the usage of the application/framework. > > Let's replace the term CfP with "Request on Domain X" (RoD/X). In > general, there would be one entity per user session creating new RoDs > with different X. Depending on the number of workers installed (which > again is flexible and depends on the usage of the application) each > RoD/X would be looked into and eventually processed by an arbitrary > number of workers. The processing itself could also result in posting a > new RoD/Y (usually with Y != X), which gets analogously processed, i.e., > the number of results and the time for responding to a RoD/X may > exponentially grow with the number of workers. I guess I am still wondering about using a sequence number based approach. avaiablity events would still be used to efficiently get new RoDs, and contents would be used by new comers to efficiently get the initial list, but the ordering could be exploited to efficiently recover lost events. The downside of course is that imposing an order on the RoDs can be a pain. It is easy if only one entity is generated RoDs or if RoDs aren't be created too often (so keeping a sequence number in the space does not become a bottleneck). It also seems with contents there is a possibility for creating partially ordered sequences of entries (which would presumably make it easer to put the entries in the sequence), though I have not had the opportunity to fully work this one through. hope this helps -- BTW, if you want to reply to this message, please direct your reply to the list, thanks John McClain [email protected] Sun Microsystems, Inc. Burlington, MA A business that makes nothing but money, is a poor business. - Henry Ford =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff JAVASPACES-USERS". For general help, send email to [email protected] and include in the body of the message "help". To view past JAVASPACES-USERS postings, please see: http://archives.java.sun.com/archives/javaspaces-users.html JDC members can download the JavaSpaces(tm) Technology from: http://developer.java.sun.com/developer/products/jini/