Scalable publish/subcribe with JavaSpaces ?
Christian <[email protected]> Wed, 28 Feb 2007 20:44:43 +0100
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Message-ID | <[email protected]> |
Hi, I was just asking myself how the notify operation that was added to the JavaSpaces API (compared to the original set of operations available in the Linda tuple space) positions it to the publish/ subscribe paradigm. One might think at the first sight that by introducing the notify operation into the space API a new communication paradigm is created that is more complex and more powerful than simple publish/subscribe. However, the persistent nature of the shared data space has also a flip side. The common task that is typical for all publish/subscribe services, namely simply the notification of all interested subscribers about an event, is very difficult to implemented in a scalable fashion. Saving all notifications that occur in the space is usually not possible because most application scenarios involve so many notifications that the space will run out of memory. The normal eviction functionality of tuple spaces cannot be used either to remove notifications. If the “time to live” property of a tuple is to short it might not get delivered to all interested subscribers, if it is too long the space could again run out of memory. In order to handle huge amounts of notifications in a short time, each space would have to know the exact number of active subscribers for a notification in order to decide whether a notification can be removed safely. This number however can change dynamically during the lifetime of a notification. Another approach would be to automatically delete a “notification tuple” after it has been matched to all templates that were active at the time the matching process began. This behaviour would need a special treatment of “notification tuples”. The support for these “one-shot” tuples is as far as I understand not really part of the idea behind shared data spaces (namely using a share space to persist data) and would require a special space implementation. I know that there are publish/subscribe implementations that are based on tuple spaces. For example GigaSpaces offers a JMS API. I was wondering whether this is only possible by creating a new space implementation or whether it can be done with the current JavaSpace API. Note, that I'm talking about huge amounts of notifications that are published in a short time frame. I think publish/subscribe with small or moderate notifcations rates should be realizable with the current JavaSpace implementation. I really would like to hear your opinions and thoughts about this topic. Best regards Christian =========================================================================== 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