Hi Ken,
Below I have provided what I hope to be enough information to get started until the project has better documentation.
Configuration:
Edit
https://github.com/thomasquintana/freepy/blob/master/conf/rules.py to define the messages of interest and how to appropriately route them. As an example, by default the HEARTBEAT event is delivered to
switchlets.heartbeat.example.Monitor. Matching can be based on an exact header value or using regular expressions. If the persistent flag is set then the switchlet (Actor) is instantiated as a singleton so the switchlet state is preserved between events or if the persistent flag is omitted or set to False a new instance is created to handle new inbound events of the matching type.
Switchlets:
Switchlets are Pykka actors that handle events, responses, etc. as they arrive. The only required method is on_receive(self, message) and should be considered the entry point for every switchlet (Actor). In
https://github.com/thomasquintana/freepy/blob/master/lib/commands.py I have used the command pattern to expose all the commands in the mod_commands module. If you send those to the dispatcher from your actor as per the example you will receive any responses for the command and furthermore you can use the predefined Job-UUID to listen for any events related to that specific command.
I am currently adding unit test coverage which will be followed by thorough documentation over the next two weeks but I figured I would make the code available immediately for those not faint of heart :)
Best,
Thomas Quintana