1.03k likes | 1.25k Views
The CBorg Mobile Multi Agent Systems. An Overview. Werner Van Belle Karsten Verelst Theo D’Hondt Programming Technology Lab (PROG) Departement Computer Science (DINF) Vrije Universiteit Brussel (VUB). Mobile Multi Agent Systems. Application: interconnection of agents Wide Area Network
E N D
The CBorg Mobile Multi Agent Systems An Overview Werner Van Belle Karsten Verelst Theo D’Hondt Programming Technology Lab (PROG) Departement Computer Science (DINF) Vrije Universiteit Brussel (VUB)
Mobile Multi Agent Systems • Application: interconnection of agents • Wide Area Network • Fine grained component structure • Frequent migration of components
Mobile Multi Agent Systems • A Mobile Agent is an Active Autonomous Component • Able to Communicate with others • Able to Migrate to other ‘Agent Systems’ • The Agent system is the “Operating System” to support these components
Overview • 1 -- The Agent System • a -- infrastructure • b -- the language (pico) • c -- communication • d -- migration • e -- concurrency management • f -- creation • 2 -- Demonstration • 3 -- Internals • 4 -- Future Work
CBorg • Developed at PROG • Goal is to implement a light weight MMAS for research purposes • We try to achieve as much transparency as possible • Features • location transparency • strong migration • Based upon an interpreted language Pico
CBorg • The Cborg appliation is the operating environment (the agent system) which runs on every participating computer. • Cborg takes care of • naming agents • routing and sending messages to agents • creating and destroying agents • executing agents concurrently • migrating agents
Naming/ Agent Systems • Every agent system has a unique hierarchical name;eg. tecra and void.tecra • Hierarchical interconnection between agent systems forms a mobile multi agent infrastructure
Naming/ Agents • Agentnames are based upon the name of the agent system and a freeform identifier. Eg: tecra/session1 tecra/nameserveragent Agent Names does NOT change whenever an agent migrates
A CBorg Agent • Object Oriented • Own Code & Data Space • Single Threaded • Agents run concurrently • Can send messages to other agents • Can migrate to other agent systems • Written in PICO
Overview • 1 -- The Agent System • a -- infrastructure • b -- the language (pico) • c -- communication • d -- migration • e -- concurrency management • f -- creation • 2 -- Demonstration • 3 -- Internals • 4 -- Future Work
PICO/Standard Stuff • Definition • a:900 • a[10]:0 • a(a,b,c):display(a+b+c) • Assignment • a:=90 • a[67]:=89
PICO/Eval -Apply a:b:20 ag:read(“a+b”) eval(ag) -> 40 f(a,b)::a+b f(1,2) -> 3 f@[1,2] -> 3
PICO/Variable Arguments f@args:: {sum:0; for(I:1,I<=size(args), I:=I+1, sum:=sum+args[I]); sum} f(1,2,3) -> 6 f@[1,2,3,4] -> 10
PICO/Call by Name a:50 delay(f())::f delayed:delay(display(a)) a:=600 delayed() : 600
PICO/Objects { makePoi(x,y):: {move(X,Y) :: { x := X; y := Y }; area() :: 0; makeSqu(w) :: {widen(W) :: w := W; area() :: w^2; clone() }; clone() }; Point: makePoi(0,0); Square: Point.makeSqu(2); Square.area() --> 4
Overview • 1 -- The Agent System • a -- infrastructure • b -- the language (pico) • c -- communication • d -- migration • e -- concurrency management • f -- creation • 2 -- Demonstration • 3 -- Internals • 4 -- Future Work
CBorg/ Communication • “tecra/ses1” a:agent(“void.tecra/disc”); a.calculate([[1,2],[3,4]]); “void.tecra/disc” calculate(matrix)::display(matrix) - Automatic serialisation and deserialisation - Transparant routering - Connectionless
CBorg/ Callbacks • “tecra/ses1” a:agent(“void.tecra/negate”); a.calculate([[1,2]],agentself()) -> void “void.tecra/negate” calculate(matrix,resultto):: resultto.display(negate(matrix)) - Asynchronous message passing - Queued at receiver side - Returns always void at sender side
CBorg/ Serialisation “tecra/ses1” makepoint(x,y):: {show()::display(x+”:“+y); clone()} a:agent(“tecra/ses2”) p:makepoint(10,20) a.show(p) -> 10:20 “tecra/ses2” show(p)::p.show() - pass objects by reference - pass primitives by value
Overview • 1 -- The Agent System • a -- infrastructure • b -- the language (pico) • c -- communication • d -- migration • e -- concurrency management • f -- creation • 2 -- Demonstration • 3 -- Internals • 4 -- Future Work
Migration • Weak Migration • The agent can only migrate whenever the agent has stored its entire state in its objects • Cooperation from the agent is required • Code should be written in a special ‘state’-based manner
Migration • Strong Migration • At any moment an agent can migrate to another place without any special requirements towards the agent • The agent doesn’t need to take special precautions when executing • The agent doesn’t have to ‘cooperate’ • Code mobility becomes useful
Use of Migration (III) yahoo 1 My application 2 3 4 repository
Use of Migration (III) yahoo 1 My application 2 3 4 repository
CBorg/ Migration • CBorg supports the notion of strong migration. agentmove(place(“void.tecra”))
CBorg/ Migration Fac(n):: { if(n\\1 = 0, agentmove(place(“tecra/ses1”)), agentmove(place(“void.tecra/ses1”))); if(n=1,1,n*Fac(n-1)) }
Overview • 1 -- The Agent System • a -- infrastructure • b -- the language (pico) • c -- communication • d -- migration • e -- concurrency management • f -- creation • 2 -- Demonstration • 3 -- Internals • 4 -- Future Work
CBorg/ Concurrency • Agent = single thread • Agents run concurrently • Agent queued incoming messages • Agent can synchronize with other agents and pass messages through this temporary channel • ** drawing plz **
CBorg/ sync (I) • “tecra/ses1” a:agent(“void.tecra/negate”); sync(a,100) -> 100 “void.tecra/negate” a:agent(“tecra/ses1”); sync(a,100) -> 100 - both parties wait at the sync - after both arriving at the sync they continue
CBorg/ sync (II) • “tecra/ses1” a:agent(“void.tecra/negate”); sync(a,[10,any]) -> [10,50] “void.tecra/negate” a:agent(“tecra/ses1”); sync(a,[any,50]) -> [10,50] - Simple unification upon value - keyword ‘any’ used as wildcard
Overview • 1 -- The Agent System • a -- infrastructure • b -- the language (pico) • c -- communication • d -- migration • e -- concurrency management • f -- creation • 2 -- Demonstration • 3 -- Internals • 4 -- Future Work
CBorg/ Creation/Killing • Interactive • Dynamic createagent(<object>,<name>) agentdie(agent) > - makes a deep copy of the <object> - super will not be copied
CBorg/ Creation MakeStarter(name,to):: {go():: for(i:1;i<=size(to);i:=i+1; {agent:to[i]; agent.go()}); agentclone(clone(),name)} init:MakeStarter(“I”, [agent(“tecra/ses1”), agent(“tecra/ses2”)]) init -> remotedict(“tecra/I”) init.go()
Overview • 1 -- The Agent System • a -- infrastructure • b -- the language (pico) • c -- communication • d -- migration • e -- concurrency management • 2 -- Demonstration • 3 -- Internals • 4 -- Future Work
Demonstration • Examples • Cborg: multi threaded link • Cborg: single threaded link
Overview • 1 -- The Agent System • 2 -- Demonstration • 3 -- Internals • a -- Naming and Routing • b -- Migration • 4 -- Future Work
Routing Problem • Whenever an agent migrates its name changes Its name shouldn’t change butHow do we route messages ?
Forwarding B D a Forward msg a C Send msg A b
Migrate Send locationupdate Forwarding B D a Forward msg C Send msg a A b
Forwarding • Pro: • easy implemented • logging is easy • Contra: • communication is slowed down • interacting agent clusters are slow when migrated
Forwarding • Message send: 2T • time over network to reach home location • time over network to reach real location • Agent move: T + t • time over network to inform home location • time over network to migrate to new (nearby) position
Notifying Partners E B a -> D D a a -> D C Send msg A ba->D
Migrate Send LocationUpdates Notifying Partners E B a -> C D a -> C C a Send msg A ba->C
Notifying Partners • Pro: • doesn’t require a special architecture • suitable for fine grained secure systems • Contra: • impossible to know all possible communication partners • enormous overhead with popular agents
Notifying Partners • Message send: t • Time over network to reach (nearby) communication partner • Agent move: (C+1)t + [T] • Time needed to update all communication partners • Time needed to migrate to new position • [Time needed to update name server]
Name Serving & Routing D b -> Aa -> C Fetch addr A C Send msg b a
Send location update Migrate Name Serving & Routing D b -> Aa -> C a Fetch addr A C Send msg b
Name Serving & Routing • Pro: • easy implemented • routing mechanism is independent of naming system • Contra: • name updates are slow • name lookups are slow