[jgroups-dev] How to implement/use flow control in JGroups

[email protected]
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>
Hi everyone, I must apologize first that my first post here is asking for help.  I also apologize if this is the wrong mailing list for this type of question.

I will keep introductions short in this post.  Basically I am a software developer working for a web/teleconferencing company.  We often have large web conferences which require multiple servers to coordinate and share information.  We have wanted to move to JGroups as a possible solution to handle message passing, group membership, and all the other love JGroups can offer.

In order to do this, I am trying to create a layer just above JGroups that we can use to run our application without the need to have the application interface directly with JGroups.  This has been a fairly easy task, and I have been able to do it with one exception, flow control....

With the needs we have, we never want messages to be queued (or rather have the queue be very very short).  The reason being that a message waiting in queue may already be outdated, and instead we would much rather just create a new message that is more relevant for the time being.  There are several ways to implement this, but we have chosen:
After a message is sent by JGroups, we call a "callback" which alerts the application that we are now ready for more data.  Then the application gives us a new bit to send, we send it, and after that is sent we call that messages callback, the cycle continues.  This is more ideal than blocking because if we have data ready to send, and it is blocked, this means the data is going out of date while it is blocked.  If we are just alerted right when we can accept data, that gives us the greatest chances of providing fresh and current information.  (I recognize there are some ways to get around this, but I prefer not to complicate it)

The issues I face in accomplising this are:
I can't figure out how I can know what (how much) data is in queue to send within JGroups.  And thus have no idea when I should be ready to send more data to JGroups.

From what I can tell, I can't do that with the built in FlowControl (which just blocks from what I can tell....although worst case I will switch to this)...

Is there a way to accomplish this within the current design of JGroups, or are my only options:
* Build a new protocol to handle this style of flow control
* Change to a blocking scheme with the existing flow control
* Anything else I don't see right now?

Let me know if anything needs clarification, and thanks in advanced for your help!


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Javagroups-development mailing list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.