The last weeks I studied the code of Fabriq project. You can download the code from Arvindra Shemi’s blog post:
More information about the project at:
An image from the docs:
According to the project documentation:
FABRIQ is an infrastructure for constructing networks of nodes processing and relaying messages. These nodes are hosted in machines running into a serviced application.
You can have multiple machines running the same or different applications. The “network” is the application, “node” is a collection of “actions”, and each action process a message. More doc:
These nodes can be hosted in any distribution on several machines according to a defined configuration, so there may be machines running a single node or several nodes, this association are made by specifying the host-name or machine identification associated with each node in the network.
Each of these machines is running a serviced application responsible for starting and stopping its Host and Nodes which are the application main components. The host is responsible for handling the configuration, loading and unloading nodes and receives the messages and delivers them to the appropriate Node.
An interesting article that goes to the guts:
Technically oriented articles:
I think that all these features can be reimplemented using current technologies (the published project use .NET 1.x, COM hosting), as Windows Communication Foundation, or the new distributed services of Microsoft Robotics (DSS).
In the first case, the Message to exchange and process could be the System.ServiceModel.Channel.Message class from WCF. But another idea is to have a custom Message class, that could be serializable via differents transports: WCF, DSS, Remoting, Web Services, or anything else.
I’m working on rewrite from scratch the full idea, with dynamic configuration, load balancing, in WCF or in other base technologies. I borrowed some ideas from my old project AjServer:
Hacia el AjServer (Spanish)
An extract from a configuration file:
<?xml version="1.0" encoding="utf-8" ?> <AjMessages> <Application Name="AjMessages"> <Node Name="Administration"> <Handler Name="ConfigureHandler" Type="AjMessages.ConfigureHandler, AjMessages"/> <Handler Name="PrintHandler" Type="AjMessages.PrintHandler, AjMessages"/> <Handler Name="PrintMessageHandler" Type="AjMessages.PrintMessageHandler, AjMessages"/> <Handler Name="ConfigurePipeline"> <Handler Name="PrintHandler"> <Property Name="Text" Value="Reconfiguring server..."/> </Handler> <Handler Name="PrintMessageHandler"/> <Handler Name="ConfigureHandler"/> </Handler> <Action Name="Configure" Handler="ConfigurePipeline"/> </Node> </Application> ... <Host Name="Host1" Address="http://localhost:50000/AjMessages"> <Application Name="AjMessages"> <Node Name="Administration"/> </Application> <Application Name="App1"> <Node Name="Node1"/> <Node Name="Node2"/> </Application> </Host> </AjMessages>
I have a running version, with WCF and without WCF. I hope to post about my advances these days.
Angel “Java” Lopez