pyre.nexus¶
Submodules¶
Package Contents¶
-
class
pyre.nexus.nexus¶ Bases:
pyre.nexus.Asynchronous.AsynchronousProtocol definition for components that enable applications to interact over the network
-
class
pyre.nexus.service¶ Bases:
pyre.protocolProtocol definition for components that handle events in communication channels
-
activate(self, application, dispatcher)¶ Prepare to start receiving information from the network
-
acknowledge(self, dispatcher, channel)¶ A peer has attempted to establish a connection
-
validate(self, channel, address)¶ Examine the peer {address} and determine whether to continue the conversation
-
connect(self, dispatcher, channel, address)¶ Prepare to start accepting requests from a new peer
-
process(self, dispatcher, channel)¶ Start or continue a conversation with a peer over {channel}
-
shutdown(self)¶ Clean up and shutdown
-
-
class
pyre.nexus.node(**kwds)¶ Bases:
pyre.nexus.Peer.Peer-
services¶
-
doc= the table of available services¶
-
application¶
-
prepare(self, application)¶ Get ready to listen for incoming connections
-
shutdown(self)¶ Shut everything down and exit gracefully
-
reload(self)¶ Reload the nodal configuration for a distributed application
-
signal(self, signal, frame)¶ An adaptor that dispatches {signal} to the registered handler
-
newSignalIndex(self)¶ By default, nodes register handlers for process termination and configuration reload
-
registerSignalHandlers(self)¶ By default, nodes register handlers for process termination and configuration reload
-
-
class
pyre.nexus.server¶ Bases:
pyre.componentThe base class for network servers
-
address¶
-
application¶
-
dispatcher¶
-
activate(self, application, dispatcher)¶ Grab a port and register it with the event dispatcher
-
acknowledge(self, channel)¶ A peer has attempted to establish a connection
-
validate(self, channel, address)¶ Examine the peer {address} and determine whether to continue the conversation
-
connect(self, channel, address)¶ Prepare to start accepting requests from peers
-
process(self, channel)¶ Say something to the peer
-
shutdown(self)¶ Clean up and shutdown
-
-
class
pyre.nexus.task¶ Base class for functors that are part of an application data model
-
execute(self, **kwds)¶ The body of the functor
-
__call__(self, **kwds)¶
-
-
class
pyre.nexus.taskcodes¶ Bases:
enum.EnumIndicators used by tasks to describe what happened during their execution
-
completed= 0¶
-
failed= 1¶
-
aborted= 2¶
-
damaged= 3¶
-
-
class
pyre.nexus.crewcodes¶ Bases:
enum.EnumIndicators used by crew members to describe what happened during the execution of the most recent task that was assigned to them
-
healthy= 0¶
-
damaged= 1¶
-
-
class
pyre.nexus.team¶ Bases:
pyre.protocolThe specification for a process collective that coöperate to carry out a work plan
-
size¶
-
doc= the number of team members to recruit¶
-
recruiter¶
-
doc= the strategy for recruiting team members
-
assemble(self, workplan, **kwds)¶ Recruit a team to execute the set of tasks in my {workplan}
-
vacancies(self)¶ Compute how may recruits are needed to take the team to full strength
-
-
class
pyre.nexus.recruiter¶ Bases:
pyre.protocolThe protocol of resource allocation strategies
-
recruit(self, team, **kwds)¶ Recruit members for the {team}
-
deploy(self, team, **kwds)¶ Create a new {team} member
-
dismiss(self, team, member, **kwds)¶ The {team} manager has dismissed the given {member}
-
-
class
pyre.nexus.asynchronous¶ Bases:
pyre.protocolA protocol that specifies the two ingredients necessary for building event driven applications
-
marshaler¶
-
doc= the serializer that enables the transmission of objects among peers¶
-
dispatcher¶
-
doc= the manager of the event loop
-
run(self)¶ Start processing requests
-
prepare(self)¶ Carry out any necessary start up steps
-
watch(self)¶ Activate my event loop
-
shutdown(self)¶ Signal my event loop to stop processing events
-
shutdown(self) Shut down and exit gracefully
-
-
pyre.nexus.fork()¶ Use fork as the team member recruitment strategy
-
pyre.nexus.peer()¶ The base class for components that provide an application with its event loop
-
pyre.nexus.pool()¶ The manager of a team that execute a workplan concurrently