-
Notifications
You must be signed in to change notification settings - Fork 23
Need to reinstate send suspend logic #78
Comments
I want to make sure I understand the logic that you're talking about. This is the logic that suspends a receiver when there are no IPs currently in any incoming connections to the InputPort that the receiver has called receive on. Is that correct? |
On further investigation, I see that the whole If you have the patience, I'd like to spend some time working on resolving this. It will probably take a few days. I'll work on a branch so that there is a reviewable Pull Request. If you're already working on a fix, just let me know. |
Re the post before your last one: what seems to have disappeared is the logic to suspend a sender when the connection being sent to is full. If I'm right, this would explain why the app you were working on saturates storage. I referred you to the discussion of ballooning in the book - this is not a desirable behaviour, as logic errors can behave like storage errors, and the application behaviour becomes much less predictable. In this case you can look at the code before PR #74 was merged in to see how connections and the related ports are interrelated. |
Re your last post, I am happy to let you do this. I have reset my personal version of jsfbp to the one before PR #74 was merged in. My initial test worked fine, and I could happily run with this version. However it is rather a sledge-hammer approach, and would cause jsfbp to lose some doubtless useful changes that you put in later. So if you can be more surgical about removing the effects of PR #74 on the connection logic, that would be much better. However, I want to say that I really dislike people refactoring my code, and moving stuff around, as it makes it nearly impossible for me to see what has changed. Sorry if this offends your esthetic sense :-) , but my classes are chosen rather carefully, and I don't like to see them changed in any significant way. In this case your refactoring seems to have led to quite a bit of confusion - on both our parts! See also my earlier comment about how the Travis test didn't pick up on this at all, leading me to think everything was fine... when it wasn't! You are actually the 3rd person to try refactoring various implementations - first the JavaFBP implementation some years ago, then the C#FBP one, and now jsfbp. In both of the previous cases, it became obvious that the people involved were confused at a very fundamental level, so we had to give up on the effort! Hope we can continue to work together - there is a lot of good stuff here! |
Hi Dan, How is this going? I realized I should have posted a warning on the Readme Regards, Paul On Fri, Nov 11, 2016 at 4:51 PM, Dan Rumney [email protected]
|
PS In my npm test breader seems to have broken - can I fix it, or drop it Thx Paul On Wed, Nov 16, 2016 at 9:54 AM, Paul Morrison [email protected] wrote:
|
Hi Paul, Went away for the weekend and been catching up. Regarding suspending the sender, I believe this remains in place in the ProcessConnection code, specifically at: https://github.com/jpaulm/jsfbp/blob/master/core/ProcessConnection.js#L79 At this point, if the number of pending IPs is greater than the connection capacity, then the process is put into This check occurs in a permanent loop that isn't broken until the IP that is being 'sent' can be added to the connection. The absence of tests around this behaviour is definitely an oversight and a problem. Perhaps the first step is to try and craft a test that passes when the behaviour is correct and otherwise fails. Certainly Travis didn't catch this, but I think that's more a shortcoming of the test suite rather than an inherent shortcoming of CI. I think an update to the README is probably a good idea. Alternatively, another approach might be to branch off the current master branch and then revert all of the changes I put in, with a view to being more circumspect about the changes. Finally, you can modify https://github.com/jpaulm/jsfbp/blob/master/test/components/breader.js#L9 to read |
As I look at it, you should roll my work back... my implementation of connections is way off. My |
Thanks, Dan, it would be best for now. A few days ago I did a git reset When I do a git status, I get: C:\Users\Paul\Documents\GitHub\jsfbp [master ↓]> git status What is the correct git statement to set the repo to this level for the Thanks, Paul On Wed, Nov 16, 2016 at 12:02 PM, Dan Rumney [email protected]
|
No that's correct - the ProcessConnection has the capacity, as it is where On Wed, Nov 16, 2016 at 12:02 PM, Dan Rumney [email protected]
|
OK... so here's what to do:
That will create a new commit that rolls everything back, rather than destroying the shared history. That way, the changes are still viewable, but they're no longer at the front of the tree |
Yes... the |
An example would be:
|
Also, the OutputPort does have a |
In this case, jsfbp will differ from all the other implementations! We Sorry, Dan! On Wed, Nov 16, 2016 at 12:35 PM, Dan Rumney [email protected]
|
"Finally, you can modify https://github.com/jpaulm/jsfbp/blob/master/test/ Do you leave the function, or remove the whole thing? TIA Paul On Wed, Nov 16, 2016 at 12:00 PM, Dan Rumney [email protected]
|
So, in the case of the graph above, having a single capacity for a I can see how an implementation of a Connection could do this, but not with a single capacity value... there would need to be one for each incoming processes. Definitely doable, but not what appears to be in place in the Java implementation. |
For skipping a test:
becomes
|
B**dy GitHub! I got to git push - but I had updated Readme, so it said to do a pull remote: Counting objects: 3, done. Try again?! Maybe if I did a reset --hard from the same commit hash...? (Sorry!) Paul On Wed, Nov 16, 2016 at 12:34 PM, Dan Rumney [email protected]
|
Git can be a pain when you're trying revert stuff :) OK... so, first, make sure you have no changes that have not been committed (shouldn't be a problem).
|
Close but no banana! The final git push said C:\Users\Paul\Documents\GitHub\jsfbp [master ↕]> git push Sorry, have to run out for a couple of hours - I feel we're nearly there! On Wed, Nov 16, 2016 at 1:10 PM, Dan Rumney [email protected]
|
OK finally figured it out:
I did this on my copy, ran The |
Thanks, Dan, Will give that a try as soon as I get home! Regards, Paul On Nov 16, 2016 2:06 PM, "Dan Rumney" [email protected] wrote:
|
Never saw git clean before! Interesting! No errors... Did next statement, and got C:\Users\Paul\Documents\GitHub\jsfbp [master ↓]> git reset --soft @{1}
Huh?! Maybe my posh~git is different from yours...? On Wed, Nov 16, 2016 at 2:06 PM, Dan Rumney [email protected]
|
Try ORIG_HEAD instead of @{1} It could be that '@{1}' has some special meaning to your shell On Wed, Nov 16, 2016 at 3:31 PM Paul Morrison [email protected]
|
Dan, please ignore the previous note - I tried it in regular command error: failed to push some refs to 'https://github.com/jpaulm/jsfbp.git' I assume this is because of the change I made to Readme - if so, my On Wed, Nov 16, 2016 at 4:31 PM, Paul Morrison [email protected] wrote:
|
That's weird If you're fine losing the README changes, this:
|
Took it! Phew! Thanks a million! Onwards and upwards! Paul On Wed, Nov 16, 2016 at 4:52 PM, Dan Rumney [email protected]
|
Beautiful! Thanks! I guess these kinds of errors happen - I had a similar Regards, Paul On Wed, Nov 16, 2016 at 1:05 PM, Dan Rumney [email protected]
|
Sorry, Dan, had to backup a bit further - to 99DA196 - before FIFO.js and Readme should probably be checked. Thanks for your help, Paul On Wed, Nov 16, 2016 at 4:52 PM, Dan Rumney [email protected]
|
Need to reinstate send suspend logic - this seems to be mostly in PR #74
The text was updated successfully, but these errors were encountered: