Agents in Prova rule language wrapped by UMO

View: New views
6 Messages — Rating Filter:   Alert me  

Agents in Prova rule language wrapped by UMO

by alex.kozlenkov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It took me a Sunday's work to wrap agents written in Prova rule language by a Mule UMO. Prova has rich built-in message-processing functionality based on reaction rules. Originally, we used local, JADE, and JMS protocols but it made perfect sense to use Mule now.

Prova is now approaching release 2.0 and in the new beta 2f, this functionality will be enabled. This is an example of two agents:
Agent001

:- eval(agent001()).

card('Mastercard').
card('Visa').

agent001() :-
        card(Card),
        sendMsg(XID, esb, "Agent002", request, card(Card)).

Agent002

rcvMsg(XID, Protocol, From, request, card(Card)) :-
        iam(Me),
        println(["Request received by ",Me," on protocol ",Protocol," from ",From," about card ",Card]).

The above starts Agent001 by running the goal "agent001()" then sends two messages for either of the two cards on the "esb" protocol. The second agent has a reaction rule that accepts messages matching the specified pattern and prints the main data.

This is, of course, a toy example, but we could easily extrapolate this to useful rule-based decison making nodes. For example, the decision logic in the Mule Loanbroker example can be easily extermalised as rules. Prova is also good for various intelligent routing stuff based on Petri nets or state machines.

Re: Agents in Prova rule language wrapped by UMO

by Andrew Perepelytsya :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alex,

If you feel like releasing this module into a public domain, we can host it in mule-contrib SVN repository, which is a repository for modules 'affiliated' with Mule, but not necessarily bundled with a core distribution. Let me know if it sounds ok, we'll then arrange for access permissions so you can commit to the repo directly.

Andrew

On 10/15/06, alex.kozlenkov <alex.kozlenkov@...> wrote:

It took me a Sunday's work to wrap agents written in Prova rule language by a
Mule UMO. Prova has rich built-in message-processing functionality based on
reaction rules. Originally, we used local, JADE, and JMS protocols but it
made perfect sense to use Mule now.

Prova is now approaching release 2.0 and in the new beta 2f, this
functionality will be enabled. This is an example of two agents:
Agent001

:- eval(agent001()).

card('Mastercard').
card('Visa').

agent001() :-
        card(Card),
        sendMsg(XID, esb, "Agent002", request, card(Card)).

Agent002

rcvMsg(XID, Protocol, From, request, card(Card)) :-
        iam(Me),
        println(["Request received by ",Me," on protocol ",Protocol," from ",From,"
about card ",Card]).

The above starts Agent001 by running the goal "agent001()" then sends two
messages for either of the two cards on the "esb" protocol. The second agent
has a reaction rule that accepts messages matching the specified pattern and
prints the main data.

This is, of course, a toy example, but we could easily extrapolate this to
useful rule-based decison making nodes. For example, the decision logic in
the Mule Loanbroker example can be easily extermalised as rules. Prova is
also good for various intelligent routing stuff based on Petri nets or state
machines.
--
View this message in context: http://www.nabble.com/Agents-in-Prova-rule-language-wrapped-by-UMO-tf2448257.html#a6824157
Sent from the Mule - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



Re: Agents in Prova rule language wrapped by UMO

by alex.kozlenkov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrew Perepelytsya wrote:
Alex,

If you feel like releasing this module into a public domain, we can host it
in mule-contrib SVN repository, which is a repository for modules
'affiliated' with Mule, but not necessarily bundled with a core
distribution. Let me know if it sounds ok, we'll then arrange for access
permissions so you can commit to the repo directly.

Andrew
Absolutely, we certainly want to release into public. Prova is open source anyway. I've checked since yesterday and I can in fact have two Prova agents communicating via Web services with a simple Mule re-configuration. In this way, I can expose all sorts of intelligent decision making services via any Mule protocol. Please, contact me privately about the permissions.

Cheers,
Alex

Re: Agents in Prova rule language wrapped by UMO

by alex.kozlenkov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guys,

We have released the promised update to the Prova rule language, version 2.0 Beta 2F, that is now compatible with Mule ESB (see Prova News). The actual Mule-Prova gateway will implement a ProvaUMO interface and allow Prova agents to send and receive messages across the bus.

I am now going to clean up my gateway example and submit it in the contribution area. After that, I'm quite open for ideas and possible use cases. However, I understand that at this stage, I'm perhaps better positioned to drive this forward for awhile given my familiarity with Prova.

Given our mutual interest with JBoss Rules guys for interoperability, we are experimenting with various integration options that will integrate backward chaining, forward chaining, and Prova-style reaction rules under one umbrella. Rich Halsey is reporting on some progress integrating Prova with JEOPS and will be expanding that to JBoss Rules.

All in all, we are looking for ways of making various intelligent rule-based services available on the Mule bus.

Cheers,
Alex
Andrew Perepelytsya wrote:
Alex,

If you feel like releasing this module into a public domain, we can host it
in mule-contrib SVN repository, which is a repository for modules
'affiliated' with Mule, but not necessarily bundled with a core
distribution. Let me know if it sounds ok, we'll then arrange for access
permissions so you can commit to the repo directly.

Andrew

On 10/15/06, alex.kozlenkov <alex.kozlenkov@betfair.com> wrote:
>
>
> It took me a Sunday's work to wrap agents written in Prova rule language
> by a
> Mule UMO. Prova has rich built-in message-processing functionality based
> on
> reaction rules. Originally, we used local, JADE, and JMS protocols but it
> made perfect sense to use Mule now.
>
> Prova is now approaching release 2.0 and in the new beta 2f, this
> functionality will be enabled. This is an example of two agents:
> Agent001
>
> :- eval(agent001()).
>
> card('Mastercard').
> card('Visa').
>
> agent001() :-
>         card(Card),
>         sendMsg(XID, esb, "Agent002", request, card(Card)).
>
> Agent002
>
> rcvMsg(XID, Protocol, From, request, card(Card)) :-
>         iam(Me),
>         println(["Request received by ",Me," on protocol ",Protocol," from
> ",From,"
> about card ",Card]).
>
> The above starts Agent001 by running the goal "agent001()" then sends two
> messages for either of the two cards on the "esb" protocol. The second
> agent
> has a reaction rule that accepts messages matching the specified pattern
> and
> prints the main data.
>
> This is, of course, a toy example, but we could easily extrapolate this to
> useful rule-based decison making nodes. For example, the decision logic in
> the Mule Loanbroker example can be easily extermalised as rules. Prova is
> also good for various intelligent routing stuff based on Petri nets or
> state
> machines.
> --
> View this message in context:
> http://www.nabble.com/Agents-in-Prova-rule-language-wrapped-by-UMO-tf2448257.html#a6824157
> Sent from the Mule - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

Re: Agents in Prova rule language wrapped by UMO

by alex.kozlenkov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guys,

With Prova (http://www.prova.ws) reaching ever closer to version 2.0 and its build now based on Maven 2.0, it is easier for us to extend the rule-based workflow example I did before. I'm adding examples that demonstrate various workflow patterns (see http://www.workflowpatterns.com/) to the module released before.

I will demonstrate that Prova rulesets deployed as components on the Mule bus can successfully replace most of the BPEL functionality while adding non-determinism, unification, and reasoning capabilities of rules. Such rulesets will be able to orchestrate services accessible via any Mule transports, not just web services as in BPEL.

I'll post a link here to a Maven 2 distribution shortly. We will be exploring a more interesting realistic use case after this groundwork is done.

Alex

Re: Agents in Prova rule language wrapped by UMO

by alex.kozlenkov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Prova components for Mule with a number of Workflow Patterns examples including Join, Simple Merge, Multi Choice, and a more complex and interesting Deferred Choice is available. Each test case has a set of associated rules that are extensively commented. We intend to extend this set with the majority of the workflow patterns and complement with more interesting use cases.