NetSim: Interrouter messaging#2534
Merged
Merged
Conversation
…n here, this is WIP.
…-DNS tests still broken here.
Contributor
Author
There was a problem hiding this comment.
Unrelated: This is an artifact of an old setup where router displaynames were not calculated locally from their node ID.
Contributor
|
LGTM. Nice testing and writeup! And this is so cool! |
islemaster
added a commit
that referenced
this pull request
May 27, 2015
NetSim: Interrouter messaging
deploy-code-org
added a commit
that referenced
this pull request
May 27, 2015
commit e271b91 Merge: c7db2db 5d20db3 Author: Brad Buchanan <bradley.c.buchanan@gmail.com> Date: Wed May 27 12:22:45 2015 -0700 Merge pull request #2534 from code-dot-org/netsim_interrouter_messaging NetSim: Interrouter messaging commit c7db2db Author: CaptainStack <CaptainStack@outlook.com> Date: Wed May 27 12:13:38 2015 -0700 Switching links to use ng-href commit 5b6ba92 Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:46:19 2015 +0000 Automatically built. commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit f9f249b Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:28:19 2015 +0000 Automatically built. commit e592e8a Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:20:06 2015 -0700 Fail more gracefully when unable to create client node. commit a3201ee Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:19:40 2015 -0700 Fix NetSim UI Tests running on localhost; select correct channels API public key under localhost-studio.code.org rewrite commit e592e8a Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:20:06 2015 -0700 Fail more gracefully when unable to create client node.
deploy-code-org
added a commit
that referenced
this pull request
May 27, 2015
commit 817bc2c Merge: abb6ca9 aef144d Author: Chris Pirich <chris@code.org> Date: Wed May 27 13:12:59 2015 -0700 Merge pull request #2513 from code-dot-org/fix_project_level_sharing Fix project level sharing commit abb6ca9 Author: Continuous Integration <dev@code.org> Date: Wed May 27 20:10:17 2015 +0000 Automatically built. commit 1d7991e Author: Josh Lory <josh.lory@code.org> Date: Wed May 27 13:01:53 2015 -0700 Only include color scss in applab, not common scss commit 1d7991e Author: Josh Lory <josh.lory@code.org> Date: Wed May 27 13:01:53 2015 -0700 Only include color scss in applab, not common scss commit 6761a91 Author: CaptainStack <CaptainStack@outlook.com> Date: Wed May 27 12:34:11 2015 -0700 Accommodating multiple cohorts on workshops page. commit 0cfeed2 Author: Continuous Integration <dev@code.org> Date: Wed May 27 19:30:15 2015 +0000 Automatically built. commit e271b91 Merge: c7db2db 5d20db3 Author: Brad Buchanan <bradley.c.buchanan@gmail.com> Date: Wed May 27 12:22:45 2015 -0700 Merge pull request #2534 from code-dot-org/netsim_interrouter_messaging NetSim: Interrouter messaging commit c7db2db Author: CaptainStack <CaptainStack@outlook.com> Date: Wed May 27 12:13:38 2015 -0700 Switching links to use ng-href commit 5b6ba92 Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:46:19 2015 +0000 Automatically built. commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit f9f249b Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:28:19 2015 +0000 Automatically built. commit e592e8a Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:20:06 2015 -0700 Fail more gracefully when unable to create client node. commit a3201ee Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:19:40 2015 -0700 Fix NetSim UI Tests running on localhost; select correct channels API public key under localhost-studio.code.org rewrite commit e592e8a Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:20:06 2015 -0700 Fail more gracefully when unable to create client node. commit e271b91 Merge: c7db2db 5d20db3 Author: Brad Buchanan <bradley.c.buchanan@gmail.com> Date: Wed May 27 12:22:45 2015 -0700 Merge pull request #2534 from code-dot-org/netsim_interrouter_messaging NetSim: Interrouter messaging commit c7db2db Author: CaptainStack <CaptainStack@outlook.com> Date: Wed May 27 12:13:38 2015 -0700 Switching links to use ng-href commit 5b6ba92 Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:46:19 2015 +0000 Automatically built. commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope
deploy-code-org
added a commit
that referenced
this pull request
May 27, 2015
commit 9e3421a Merge: 57a9f8e c5b734d Author: Brad Buchanan <bradley.c.buchanan@gmail.com> Date: Wed May 27 13:23:02 2015 -0700 Merge pull request #2539 from code-dot-org/netsim_router_address_wrap Wrap router addresses within addressable space. commit c5b734d Author: Brad Buchanan <brad@code.org> Date: Wed May 27 13:22:41 2015 -0700 Test getRouterNumber() directly commit 57a9f8e Author: Continuous Integration <dev@code.org> Date: Wed May 27 20:13:44 2015 +0000 Automatically built. commit 817bc2c Merge: abb6ca9 aef144d Author: Chris Pirich <chris@code.org> Date: Wed May 27 13:12:59 2015 -0700 Merge pull request #2513 from code-dot-org/fix_project_level_sharing Fix project level sharing commit abb6ca9 Author: Continuous Integration <dev@code.org> Date: Wed May 27 20:10:17 2015 +0000 Automatically built. commit 1d7991e Author: Josh Lory <josh.lory@code.org> Date: Wed May 27 13:01:53 2015 -0700 Only include color scss in applab, not common scss commit 1d7991e Author: Josh Lory <josh.lory@code.org> Date: Wed May 27 13:01:53 2015 -0700 Only include color scss in applab, not common scss commit 6761a91 Author: CaptainStack <CaptainStack@outlook.com> Date: Wed May 27 12:34:11 2015 -0700 Accommodating multiple cohorts on workshops page. commit 0cfeed2 Author: Continuous Integration <dev@code.org> Date: Wed May 27 19:30:15 2015 +0000 Automatically built. commit e271b91 Merge: c7db2db 5d20db3 Author: Brad Buchanan <bradley.c.buchanan@gmail.com> Date: Wed May 27 12:22:45 2015 -0700 Merge pull request #2534 from code-dot-org/netsim_interrouter_messaging NetSim: Interrouter messaging commit c7db2db Author: CaptainStack <CaptainStack@outlook.com> Date: Wed May 27 12:13:38 2015 -0700 Switching links to use ng-href commit 5b6ba92 Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:46:19 2015 +0000 Automatically built. commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit f9f249b Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:28:19 2015 +0000 Automatically built. commit e592e8a Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:20:06 2015 -0700 Fail more gracefully when unable to create client node. commit a3201ee Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:19:40 2015 -0700 Fix NetSim UI Tests running on localhost; select correct channels API public key under localhost-studio.code.org rewrite commit e592e8a Author: Brad Buchanan <brad@code.org> Date: Wed May 27 11:20:06 2015 -0700 Fail more gracefully when unable to create client node. commit e271b91 Merge: c7db2db 5d20db3 Author: Brad Buchanan <bradley.c.buchanan@gmail.com> Date: Wed May 27 12:22:45 2015 -0700 Merge pull request #2534 from code-dot-org/netsim_interrouter_messaging NetSim: Interrouter messaging commit c7db2db Author: CaptainStack <CaptainStack@outlook.com> Date: Wed May 27 12:13:38 2015 -0700 Switching links to use ng-href commit 5b6ba92 Author: Continuous Integration <dev@code.org> Date: Wed May 27 18:46:19 2015 +0000 Automatically built. commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope commit 6974e9c Author: cpirich <chris@code.org> Date: Wed May 27 11:37:12 2015 -0700 fix expansion block bug due to block/function scope
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that multipart addresses are supported, this PR introduces the next step of allowing messages to be sent between routers on the shard.
What it does
If a router receives a message and can't find the
toAddressin its local network, it will look to see if any other nodes on the shard have the given address. If they do, the message gets forwarded to that node's router, which will then pass the message to the destination node.Here it is in action!
What it doesn't do
For now, we assume that every router has a direct connection to every other router. We aren't modeling any wires between routers. Thus, an interrouter message will always travel
and will leave two router log entries (on RouterA and RouterB).
There's no support yet for different paths to the destination or out-of-order routing - that's on the way.
DNS features have not yet been extended to the full network - the DNS tab will not show hosts/addresses around other routers, and the auto-DNS can't answer questions about nodes not in its subnet.
Enabling the feature in levelbuilder
Sending messages between routers is only possible when the "Connected routers" option is checked in levelbuilder. It's already been documented on the wiki.
How it works
The local client now acts as a proxy for each router along the outgoing message's path, up until its last router -> client leg where it passes responsibility to the receiving client.
This requires every client to run a local simulation of every router on their shard; fortunately, most of those router simulations will do very little.
I'm delegating responsibility this way in anticipation of the next case (which we'll hit soon), which uses a router that's not directly 'owned' by either client: