Difference between revisions of "Talk:Nodal-wikid.pl"

From Organic Design wiki
m
(Info on the new stream identification problem)
Line 7: Line 7:
  
  
 
+
;The new session-handler setup
 
This script will now be used to talk to the [[talk:session.pl|session-handler]]s instead of [[server.pl]]. Its [[server.pl]] that receives the initial connection request because its the one listening on the socket, but now it will pass its [[talk:session.pl|session-handler]]-handle to [[nodal-wikid.pl]] and remove it from its own IO::Select list.
 
This script will now be used to talk to the [[talk:session.pl|session-handler]]s instead of [[server.pl]]. Its [[server.pl]] that receives the initial connection request because its the one listening on the socket, but now it will pass its [[talk:session.pl|session-handler]]-handle to [[nodal-wikid.pl]] and remove it from its own IO::Select list.
  
[[session.pl]] is listed under [[nodal-wikid.pl]] in the script-tree even though its actually spawned by [[server.pl]], because [[server.pl]] passes the handle on to the [[nodal-wikid.pl]] instance.
+
[[session.pl]] is listed under [[nodal-wikid.pl]] in the script-tree even though its actually spawned by [[server.pl]], because [[server.pl]] passes the handle on to the [[nodal-wikid.pl]] instance along with all further responsibility.
  
How does it do this? [[server.pl]] has a handle to [[nodal-wikid.pl]] because it connects back to its parent when it spawns. When [[server.pl]] spawns an [[talk:session.pl|session-handler]] it also has the [[nodal-wikid.pl]] handle in its global scope and uses this as its parent to connect back to rather than the main socket.
+
How does it do this? [[server.pl]] has a handle to [[nodal-wikid.pl]] (the ''$::peerdHandle'') because it connects back to its parent when it spawns. When [[server.pl]] spawns a [[talk:session.pl|session-handler]] it passes both the newly connecting [[peer.swf]] handle and the global ''$::peerdHandle'' handle as spawn-parameters. --[[User:Nad|Nad]] 10:04, 17 Apr 2006 (NZST)
:--[[User:Nad|Nad]] 10:04, 17 Apr 2006 (NZST)
+
:Note that from the perspective of the ''peerd'' child thread (declared in [[nodal-wikid.pl]]), all incoming information appears to come from [[server.pl]], because the ''session-handler'' threads which are using the ''$::peerdHandle'' which was created by ''peerd'''s initial connection to [[server.pl]]. This means that ''peerd'' must determine which of the streams is really the parent and then can treat all others as ''session-handlers''. --[[User:Nad|Nad]] 15:45, 18 Apr 2006 (NZST)
 
----
 
----
 
The process of organising node's GUIDs is not yet automatic, and so we need to deal directly with them instead of having them hidden behind the scenes like an inode-number.
 
The process of organising node's GUIDs is not yet automatic, and so we need to deal directly with them instead of having them hidden behind the scenes like an inode-number.

Revision as of 03:45, 18 April 2006

NodalWiki.pl is the currently running instance of peerd, the Perl nodal-space.

It's using this instead of peerd because this ones designed to run as a child thread of wikid.pl while the peerd-husk is still in development.

From talk:session.pl:

A session-handler subroutine is spawned as an independent child by server.pl in response to a connection from an instance of peer.swf. This ensures that each interface has a dedicated peer-process which is necessary for real-time event propagtion. The handle is then passed to nodal-wikid.pl (the running peerd thread) which maintains a connection with all the locally spawned session-handlers so that the interfaces can exchange change-information with the network.


The new session-handler setup

This script will now be used to talk to the session-handlers instead of server.pl. Its server.pl that receives the initial connection request because its the one listening on the socket, but now it will pass its session-handler-handle to nodal-wikid.pl and remove it from its own IO::Select list.

session.pl is listed under nodal-wikid.pl in the script-tree even though its actually spawned by server.pl, because server.pl passes the handle on to the nodal-wikid.pl instance along with all further responsibility.

How does it do this? server.pl has a handle to nodal-wikid.pl (the $::peerdHandle) because it connects back to its parent when it spawns. When server.pl spawns a session-handler it passes both the newly connecting peer.swf handle and the global $::peerdHandle handle as spawn-parameters. --Nad 10:04, 17 Apr 2006 (NZST)

Note that from the perspective of the peerd child thread (declared in nodal-wikid.pl), all incoming information appears to come from server.pl, because the session-handler threads which are using the $::peerdHandle which was created by peerd's initial connection to server.pl. This means that peerd must determine which of the streams is really the parent and then can treat all others as session-handlers. --Nad 15:45, 18 Apr 2006 (NZST)

The process of organising node's GUIDs is not yet automatic, and so we need to deal directly with them instead of having them hidden behind the scenes like an inode-number.

Currently the nodes have just been assigned successive integers starting from zero as the various nodal concepts have arrisen. For this reason the location of the most up-to-date list of nodes is in the currently developing nodal script - in this case nodal-wikid.pl.

--Nad 22:31, 15 Feb 2006 (NZST)


+peer dev links