OpenSim InterRegionCommunications
From OpenSimulator
Line 16: | Line 16: | ||
LocalBackEndServices' events get triggered by the OGS1's events. The sim's scene receives the event from It's instantiation of LocalBackEndServices, whether or not it's part of a grid. | LocalBackEndServices' events get triggered by the OGS1's events. The sim's scene receives the event from It's instantiation of LocalBackEndServices, whether or not it's part of a grid. | ||
− | + | * Standalone | |
Login--->ExpectUser--->Client Connect--->InformNeihborsOfChildAgent--->NeighborExpectUser--->ClientConnectNeighbor | Login--->ExpectUser--->Client Connect--->InformNeihborsOfChildAgent--->NeighborExpectUser--->ClientConnectNeighbor | ||
− | + | * Grid | |
RegionRegistersSS----> SSRegistersGrid---> GridSendsBackNeighbors---> RegionUP | RegionRegistersSS----> SSRegistersGrid---> GridSendsBackNeighbors---> RegionUP | ||
− | + | * Same Instance | |
LoginGrid--->GridNofityRegion--->ExpectUser--->Client Connect---->InformNeighborsofChildAgent--->NeighborExpectUser--->ClientConnectNeighbor | LoginGrid--->GridNofityRegion--->ExpectUser--->Client Connect---->InformNeighborsofChildAgent--->NeighborExpectUser--->ClientConnectNeighbor | ||
− | + | * InterRegion | |
LoginGrid--->GridNotifyRegion--->ExpectUser--->LocalBackEndExpectUser--->ClientConnect---->SSInformNeibghborsOfChildAgent---> | LoginGrid--->GridNotifyRegion--->ExpectUser--->LocalBackEndExpectUser--->ClientConnect---->SSInformNeibghborsOfChildAgent---> | ||
OGS1InformNeighborsOfChildAgent--->OGS1NeighborExpectUser---->LocalBackEndServiceExpectUser---->SceneExpectUser--->ClientConnect | OGS1InformNeighborsOfChildAgent--->OGS1NeighborExpectUser---->LocalBackEndServiceExpectUser---->SceneExpectUser--->ClientConnect |
Revision as of 17:14, 4 October 2008
I've been taking a look at the region to region communications and I'm reporting my findings here to make working on it simpler.
Region to region communications are handled by .Net remoting right now.
There are two Communications 'plugins' that are used. Communications.Local which handles inter instance region to region communication and Communications.OGS1 which handles region to region remoting, and grid to region XMLRPC requests.
When starting up, the region gets an instance to a SceneCommunicationService and calls it's RegisterRegion method. This calls the RegisterRegion method on whatever communication provider that you're using, be it Communications.Local or Communications.OGS1. If it gets back a non null response.. (which means it got back a RegionListener object), then it registers for events from that RegionListener.
During remoting events will be received by the RegionListeners for the various neighbor regions.
If the regions are in the same process instance, then there's no reason to remote to the same process, so it triggers the receiving listener's event without remoting.
During this process it uses boolean values to check if the message was handled. If the message was not handled (false), then it goes to the next way of communication. If, at the end, the message wasn't handled by any means of communication, the message is ignored.
LocalBackEndServices' events get triggered by the OGS1's events. The sim's scene receives the event from It's instantiation of LocalBackEndServices, whether or not it's part of a grid.
- Standalone
Login--->ExpectUser--->Client Connect--->InformNeihborsOfChildAgent--->NeighborExpectUser--->ClientConnectNeighbor
- Grid
RegionRegistersSS----> SSRegistersGrid---> GridSendsBackNeighbors---> RegionUP
- Same Instance
LoginGrid--->GridNofityRegion--->ExpectUser--->Client Connect---->InformNeighborsofChildAgent--->NeighborExpectUser--->ClientConnectNeighbor
- InterRegion
LoginGrid--->GridNotifyRegion--->ExpectUser--->LocalBackEndExpectUser--->ClientConnect---->SSInformNeibghborsOfChildAgent---> OGS1InformNeighborsOfChildAgent--->OGS1NeighborExpectUser---->LocalBackEndServiceExpectUser---->SceneExpectUser--->ClientConnect