Re: [javagroups-users] Deliver to one only
Brought to you by:
belaban
From: Andy H. <an...@ex...> - 2004-04-09 08:45:30
|
Sorry, let me explain a little further. The channel holds details about _all_ the members in a group. The DT holds information about what types of services those members provide. The group may be 10 in size but only 2 provide the link to the telemetry system, for example. I have thought that under the hood, all messages go to all members anyway so I could have just send the first castMessage to all members anyway. What I want to achieve is the same as in JMS where a message is delivered to just one subscriber. Otherwise the message going on to the telemetry system may be transmitted multiple times and the telemetry system would see this as an escalating condition as if the measured error condition was hit more than once. You might ask why I'm not using JMS and the simple answer is that it doesn't guarantee that the messages is delivered only once across all subscribers when the JMS is not federated. SwiftMQ used to be used and this did work as we wanted but the license changed and the costs for our type of installation are now prohibitive. JGroups, on the other hand, does work well across LANs and WANs. It was my thinking that as JMS is going to be layered on top of JGroups then there may be an interface already within JGroups that supports the notion of delivering a single message to only one member rather than to all. Now you may say I've gone over the top and all I need to do is to create a new group which is the telemetry transmitter group and hey presto everything is fine. The problem is that a single message is still delivered to all members of the group and there are potentially 100s if not 1000s of little services which would mean creating this number of groups and I think that would cause problems although I have not tried this out. Any clearer? At 02:59 09/04/2004, Bela Ban wrote: >I'm not sure what you want to do, but why do you need the DT ? Looks like >you're maintaining group information in it, but this info is already >maintained by the channel itself. Maybe I'm misreading this ? > > >Andy Hutchinson wrote: > >>I'm using JGroups to implement, amongst other things, a failover >>mechanism for the transmission of a message onto an industrial telemetry >>system. >> >>Basically there are a number of processing nodes which want to send a >>message. This can be done by any number of other nodes but it must be >>guaranteed to be sent, but only once. >> >>Each transmission node adds a tag to a DistributedTree which is then used >>to create the distribution list for a MessageDispatcher and a castMessage >>call where GroupRequest is GET_FIRST. This effectively gives me the >>quickest node to respond and I then send the message directly to this >>node. If it subsequently fails I go round the loop again until it succeeds. >> >>I am aware that a JMS layer is being added to JGroups and JMS has the >>necessary api I'm looking for. My implementation works but it seems very >>messy whereas the JMS implementation does exactly what is needed. Have I >>missed something or should I wait for the JMS implementation and recode >>to that or have I done the best possible with the current JGroups api? > > > >-- >Bela Ban >http://www.jgroups.org >Cell: (408) 316-4459 |