Presentation is loading. Please wait.

Presentation is loading. Please wait.

*Law and Coordination Rodrigo Paes. © LES/PUC-Rio Agenda Integration Coordination BPEL example Birth *Law and Coordination Further Steps.

Similar presentations


Presentation on theme: "*Law and Coordination Rodrigo Paes. © LES/PUC-Rio Agenda Integration Coordination BPEL example Birth *Law and Coordination Further Steps."— Presentation transcript:

1 *Law and Coordination Rodrigo Paes

2 © LES/PUC-Rio Agenda Integration Coordination BPEL example Birth *Law and Coordination Further Steps

3 © LES/PUC-Rio Integration We need references –In order to do things in software we need references to the component that provide the functionality Objects –Type reference public class MyCompositeType{ private SimplerType part; // reference } Agents –Agent Identifier (agent-identifier :name AgentB@bar.com :resolvers (sequence (agent-identifier :name ams@foo.com :addresses (sequence iiop://foo.com/acc))))

4 © LES/PUC-Rio Agent Integration Integration is done through agents themselves We can integrate agents in order to build more complex functions from simpler ones. Service AService B Agent B Agent A Service C (uses A and B) Agent C interacts

5 © LES/PUC-Rio Integration … so… ? Ok, we now have the elements together, so what? What can we do with it? How do we use the services provided by the parts? In other words there is a need for coordination mechanisms

6 © LES/PUC-Rio OO coordination It is basically done through method invocations and through languages constructs try{ Integer result = anObject.methodA(); // Synchronous call If (result.intValue > 0){ // Conditional … } new Thread().start() // Parallel execution }catch(Exception e){ // Fault Tolerance / Exception Handling }

7 © LES/PUC-Rio Agent coordination As agents are usually implemented in OO languages, it could be achieved using the same support as OO Then, why are there so much noise involving agent coordination?

8 © LES/PUC-Rio Coordination as First Class Community has been trying to externalize composition and coordination Service AService B Agent B Agent A Service C (uses A and B) Agent C interacts Service AService B Agent B Agent A Service C (uses A and B) Coordinator interacts

9 © LES/PUC-Rio Pos and Cons Examples –Centralized coordination: tuple spaces … –Decentralized coordination: based on cooperative models Pros –It provides coordination abstractions Sequence, parallel split, multi-choice, cancel activity … –It allows to focus on the coordination in spite of agent programming –It provides a “separation of concern” Cons –It might require learn a new language

10 © LES/PUC-Rio Practical Example of Coordination BPEL –It defines elements for coordinate web services Invoke, Assign, Terminate, Scope, Catch, Partner –It is exposed as a web-service –The integration and coordination is executed by a BPEL engine –In a word, it provides a way for integrating and coordinating web-services, without needing for writing java (or c++, c# …) code.

11 © LES/PUC-Rio Giving names What was defined so far? (*Law) –XMLaw – Specification Language –CM-Law Conceptual model –Gov-Law Governor, i.e. an executable engine

12 © LES/PUC-Rio Recap: Gov-Law It implements a state-based machine Based on an event model Able to execute commands, or services –Actions, constraints It has a local memory to keep contexts –Scene context, both general and instance –Global context, only general –Norms context –There is a need for defining contexts better

13 © LES/PUC-Rio *Law Does *Law perform any kind of agent integration? –Definitively not with the meaning we stated before, i.e, *Law does not support you in integrating agents to build more complex entities –The reason: Just because *Law was not conceived for this mean. It allows you to specify the expected behavior of the resulting system, but it does not help you in composing the system Would be interesting to allow *Law for performing integration and coordination?

14 © LES/PUC-Rio *Law and Coordination My first answer is yes … … the same language with different uses Enforcement –Uses XMLaw specification for guarantee correct interaction Coordination –Uses XMLaw specification in a more active way allowing integrate agents to build more complex ones Tests Replication Are the concepts of XMLaw suitable for coordination?

15 © LES/PUC-Rio CM-Law (Conceptual Model – Law) Scene –Allows to define execution context –BPEL: Scope Action –Allows to perform a user-defined action –BPEL: Invoke Norms –Notions of things the are obligated, prohibited and forbidden. They also captures notions of acquired commitments –BPEL: Not Available (to the best of my knowledge so far)

16 © LES/PUC-Rio CM-Law Protocol –Well defined execution paths –BPEL: Limited through sequence and flow Clock –Wall clock functionality –BPEL: onAlarm Role –Define the participants –BPEL: partnerLink

17 © LES/PUC-Rio CM-Law Event Model –It allows to build flexible and dynamic relationships among the elements –BPEL: Not available

18 © LES/PUC-Rio CM-Law X BPEL CM-Law –Norms –Event Model –Protocol BPEL –Variable manipulation –Exception Handling

19 © LES/PUC-Rio Further steps Modify the mediator to behave more actively –Include missing abstractions Take a look at workflow patterns 1 1 www.workflowpatterns.com


Download ppt "*Law and Coordination Rodrigo Paes. © LES/PUC-Rio Agenda Integration Coordination BPEL example Birth *Law and Coordination Further Steps."

Similar presentations


Ads by Google