-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LoadBalance with substreams #8
Comments
From Ged Byrne via Google group (Aug. 13, 2015)
|
From Alfredo Sistema (Aug. 13, 2015)
|
Ged, my gut reaction is that the approach you describe would tend to be quite slow, and might also be deadlock-prone. Also incomplete groups have to be held somewhere until they are fully assembled - I think I have seen the term "marshalling" used here. I was looking for a "flow-based" solution where everything keeps flowing. Note the cited Aggregator page says, "Once a complete set of messages has been received..." - this may be quite long time... We did do something like this in our JavaFBP Brokerage app, but this was because transactions had to be held until they could be connected with information coming from other sites. Once this happened, the whole assembly could then travel on... |
Alfredo, My solution sounds quite a bit like yours - here is my test setup: SlowPass is like Passthru, but each incoming IP is delayed by a random amount of time, from 0 to 126 milliseconds. I plan to write a component to check that the IPs within a given substream are in the right order - then we can run this network with larger amounts of data. To make SubstreamSensitiveMerge, suspend properly, I had to create a new API call - findInputPortElementWithData() - this is described in the Release description of v3.0.2, and will also have to be added to http://www.jpaulmorrison.com/fbp/jsyntax.htm . It sounds similar to what you describe. To see how to use it, look at https://github.com/jpaulm/javafbp/blob/master/src/main/java/com/jpmorrsn/fbp/components/SubstreamSensitiveMerge.java . |
New component CheckSequenceWithinSubstreams has been added - this detected an empty substream created by GenSS - this has been fixed! |
In an earlier post on this topic, I pointed at https://github.com/jpaulm/javafbp/blob/master/src/main/java/com/jpmorrsn/fbp/examples/networks/TestLoadBalanceWithSubstreams.java . You will see that there is a LoadBalance process (recently modified so it doesn't split up substreams) feeding some processes, which in turn feed into a SubstreamSensitiveMerge process. This of course is the classical divergent-convergent topology, which is one of the danger signs for deadlocks. I believe that this example will run safely if the longest substream will fit within the connections on the shortest path between the LoadBalance and the SubstreamSensitiveMerge, but, if this rule is violated, you may get deadlocks. I have replaced the Passthru processes with SlowPass components (Passthru with a random delay), and this rule appears to hold. I am therefore wondering if it would be better to simply make a blanket statement telling people they can use either of these two components, but not to use both in the same area of the network. I have done some tests, and the above rule seems to hold, but I am wondering if any interested Google Group members could think about this, and give me some recommendations. There may be a role for both of these components, but perhaps not in the same network! |
This is getting strange! I discovered a few small bugs in SubstreamSensitiveMerge and the (new) API call it uses - findInputPortElementWithData. These apply to JavaFBP, C#FBP, and probably JSFBP as well. These problems have now been fixed for the first two. Running various tests with these, using different connection capacities, now very seldom crashes with a deadlock! At this time I can't prove that this network will never give a deadlock, which makes me rather uncomfortable! This network is, after all, a divergent-convergent topology, which is known to cause problems, but it may be that the findInputPortElementWithData function somehow compensates for this. The above-mentioned API call has shown up rather late in FBP's evolution, in response to the problem caused by combining substreams with LoadBalance, and I am really not sure if I would build a production system using it. It should be noted that it should very seldom be necessary to recombine streams that have been split by LoadBalance - much better to leave them to go their separate ways in the network! I would very much appreciate some Group member(s) of a mathematical bent doing some analysis on this... Remember that substream size can also be manipulated by modifying GenSS in both of these environments. GenSS can be found in folder examples\components in JavaFBP, and in FBPVerbs in C#FBP. Thanks in advance, and best regards, |
This issue was introduced on the Google group - https://groups.google.com/forum/#!topic/flow-based-programming/NaYix1I81QM . I am reproducing the discussion here.
@jpaulm (Aug.1, 2015)
@jpaulm (Aug. 13, 2015)
The text was updated successfully, but these errors were encountered: