Math & Engineering

A Petri Net Model of the Meeting Design Pattern for Mobile-Stationary Agent Interaction

Description
A Petri Net Model of the Meeting Design Pattern for Mobile-Stationary Agent Interaction
Published
of 11
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  See discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/3805367 A Petri net model of the meeting design patternfor mobile-stationary agent interaction Conference Paper  · February 1999 DOI: 10.1109/HICSS.1999.773090 · Source: IEEE Xplore CITATIONS 5 READS 19 2 authors , including: Some of the authors of this publication are also working on these related projects: Multi-Agent Systems and secured coupling of Telecom and Energy grids for next generation smartgrid services (MAS2TERING)   View projectOmer F. RanaCardiff University 446   PUBLICATIONS   3,753   CITATIONS   SEE PROFILE All content following this page was uploaded by Omer F. Rana on 19 June 2014. The user has requested enhancement of the downloaded file. All in-text references underlined in blue are added to the srcinal documentand are linked to publications on ResearchGate, letting you access and read them immediately.  APetriNetModeloftheMeetingDesignPattern   forMobile-StationaryAgentInteraction    OmerF.RanaandChiaraBiancheri  DepartmentofComputerScience,CardiUniversityPOBox916CardiCF23XF,UK  f  O.F.Rana,C.Biancheri g  @cs.cf.ac.uk  Abstract  Aframeworkformodellingperformanceofagent designpatternsADPsasPetrinetPNmodelsis presented.WeexploretheMeetingADPinIBMs Aglets.TheframeworkisextendabletootherADPs, anduserspeciedcontrolconditions.Developmentof thePNwillallowaprogrammersystemsdesignerto calculateboundsonperformancefortheMeetingADP, andenablebetterresourcemanagementinadistributed computingenvironment.OurPNmodelcancaterfor multiplemobileandstationaryagents,andalsofor stochasticvariablessuchasnetworklatencyandport contentionatahost. Keywords:  Mobile-Agents,Petrinets,Aglets,DesignPatterns  Introduction  Anapproachgainingfavourrecentlyistheconceptof movingthecomputationtothedata,intheformof mobilecode,thatisgenerallyreferredtoasa  mobile agent  .Thisisparticularlybenecialwhendealingwith largedatasets,orwhentheexactsequenceofservice provisionisnotknowninadvanceanddependenton theorderinwhichprocessingisperformed.Hence,in asysteminvolving  mobileagents  ,theagentcanvisit anumberofhosts,whichoerpartofthecomplete servicerequiredbytheagent.Theagentdoesnot needtoknowthecompleteitineraryinadvance,and maychangeitsroutingtablesbasedoninformation gatheredatintermediatesites.Thisgives  mobile agents  theautonomytomakedecisionsbasedon interactionswithlocalhostsastheymovefromone sitetoanother,andnegotiateserviceswithhostsas theytravelacrossacommunicationnetwork.Further- more,the  mobileagent  doesnotneedapermanent connectiontotheoriginatinghost,makingitidealfor handlingtemporarynetworkconnections,asavailable onlaptopsandothermobilecomputingdevices.Varioussystemsarecurrentlyavailablewhichsupport themobileagentsparadigm,someofwhichhave gainedpopularityoverthepastfewyears. TeleScript  fromGeneralMagicIncwastherstcommercial transportableagentlibrary19,whichhasnowbeen supersededbyaJavabasedlibrarycalled  Odyssey  . Voyager  fromObjectSpace15isaJavaclasslibrary forsupportingdistributedmobilecomponents,and combinestheCommonObjectRequestBrokerAr- chitectureCORBAmodelwithmobileJavaagents.VoyageralsosupportsanumberofotherCORBA servicessuchasdirectory,objectpersistenceand multicastservices.Othermobileagentsystemsinclude  AgentTcl  10whichusesthescriptinglanguageTclto writeexecutablecode,and  Sumatra  16.Anotherwell knownJavabasedsystemcalled  Mole  18,developed atStuttgart,allows  restrictedmigration  ,whereonly thecodeanddatafortheagentismovedtoaremote site,andnotitsexecutionstate. D'Agents  from Dartmouth17,10providessupportformultiple programminglanguagesTcl,JavaandScheme,andalsoimplementssecuritymechanismssuchas encryption,digitalsignaturesandsecuritymodules whichinteractwithresourcemanagerstodecidewhich agentsareallowedtoaccesswhatsystemresources.Insection1weoutlinethegeneralphilosophybehind designpatterns,andprovideanoverviewofagentde- signpatternswithreferencetothe  Aglets  librariesfrom IBMResearch11.The  meeting  designpatternisex- ploredindetailinsection1.1,andaPetriNetmodelof thisdesignpatternisprovidedinsection3.Resultsob- tainedfromaPetriNetsimulationarediscussedinsec- tion4,andtechniquesforconstructinga  mobileagent  basedsystemareoutlined.Weconcludewithouraspi- rationsandextensionstothecurrentwork.1  Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 0-7695-0001-3/99 $10.00 (c) 1999 IEEE   Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 1  Modellingapproaches  Varioustechniquesformodellingmobileagentsystems exist,oneofwhichisbasedontheconceptofa  messenger  paradigm.Modellinginteractionsina  mes- senger  systemcanbedividedintovariousapproaches:processalgebrassuchasmonadicandpolyadic    calculus,actorsandactorrelatedformalismssuch asstaticanddynamicactoralgebras,PetriNets,coordinationlanguagessuchasLinda,Wooldridge temporallogics,categorytheoryandothers.Asurvey canbefoundin7.DiMarzoetal.6describe the  messengerparadigm  onwhichtheapproaches summarisedin7arebased. Mobileagents  canbe viewedas  messenger  systemswhichinvolvemobile threadsofexecutionwithoutacentralcontrol.In the  messengerparadigm  twohostscommunicateby exchangingbothcodeanddata.The  messengerparadigm  extendstheRPCmodel,withparticipatinghostsassumedtobeconnected byunreliablechannelsoverwhichmessengersare exchangedasdatapackets.The  messengerparadigm  alsodescribesashareddatastructurecalled  the 'dictionary'  forexecutingthreadstosharedata,and  processqueues  aslow-levelmechanismsoeredbya hosttoimplementbasicconcurrencycontrolsuchas  threadsynchronisation  , mutualexclusion  etc.Each aspectofthe  messengerparadigm  issubsequently modelledusingtheformalismslistedabove. MobilePetriNets  extendthestandardPetriNetmodel byaddingmobilityasMobileNetsandreexionDy- namicNets.MobilePetriNetsallowthepassingofa  reference  toaprocessachannelnamealongacom- municationchannel. Places  withinthePetriNetact aschannelsandmobilityamountstopassing  tokens  as namesforplaces. DynamicNets  extend  MobileNets  byaddingthepossibilityofcreatingnewNetsduring theringofatransition.Aformalismfordescribing thecompletebehaviourofsuchasystemhasnotyet beendened.MostextensionsproposedtoPetriNetsformodelling mobileagentsystemsareforthedynamiccreationand executionofnewagentsataremotesite.Consequently,stresshasbeenplacedondevelopingPetriNetsto modelthecreationofnewagentsduringmigration.Formaltreatmentoftheseextensionshavestilltobe investigated,andtheiruseinmodellingalargeinforma- tionsystemmaybecomecumbersomeandcomplex.In ourapproachweusethewelldened  GeneralStochastic PetriNet  GSPNmodel,whichcanbesimulatedon anumberofpublicdomainandcommercialPetriNet simulatorssuchas  GreatSPN  5or  TimeNet  9.Since weareprimarilyinterestedinmodellingperformance,ourinterestslieinreningthePetriNetmodelrepre- sentingthehostarchitecture,andthesynchronisation betweenthehostandincomingagents. 1AgentDesignPatterns  Designpatterns8provideageneraldescriptionof arecurringthemewithinacertaincontext3.Vari- ousdesignpatternswereprovidedasstandardwithin the  Agletsworkbench  fromIBM,whichcapturede- signsforrecurringthemesinmobileagents,suchas the  Master-Slave  pattern, Messenger-Receiver  pattern, Meeting  patternandthe  Notier-Notication  pattern. 1.1The  Meeting  DesignPattern  The  Meeting  conceptasdescribedbyWhite19re- quiresagentsonthesamecomputertocallonean- other'sprocedures.Assumingthatonlyoneagentser- viceisactiveatahostsite,thenaccordingtothisdef- inition,anincomingagentmayinteractwiththelocal  stationaryagent  presentatthesite,ortwoagentsmight traveltothesamesitetointeractwitheachother.The staticorstationaryagentmayhavebeendispatchedto thesite,oritmayhavebeeninstalledbytheserver operator.Thesequenceofeventsthattakeplacefrom thecreationofanagletatahost,toitsmigrationto otherhostsinitsitinerary,areasfollows:   Anagletiscreatedatthe  originating  host,bycall- ingthe  OnCreation  method.Anewagletiscre- atedanditsdatastructuresareinitialised. On- Creation  iscalledonlyonceduringthelifetime oftheaglet.Aproxyobjectisalsocreatedforthis newaglet,whichisalwayslocaltoanaglethost.Henceanaglettravelsacrossanetwork,whereasa proxyobjectrepresentingtheagletremainslocal;   Theagletisdispatchedtoaremotehost.The transferofanagletfromthepointofcreationto otherhostsinitsitinerarytakesplaceaccording tothe  AgentTransferProtocol  ATP13.ATP alsoallowsanumberofdierentagentservicesto beactiveatanyhost.Theincomingagletthere- forehastoidentifyanagentservicebyaunique address.Ataremotehost,anagletcaninteract withitsenvironmentthroughan  AgletContext  ob-  ject,whichallowsanaglettoaddnewagletsor retractoldones;   Ataremotehost,theagletrunsan  OnArrival  methodtoperformanyinitialisationattheremote host,followedbythe  run  methodforexecuting 2  Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 0-7695-0001-3/99 $10.00 (c) 1999 IEEE   Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 2  code. OnArrival  needstobeexecutedeachtime theagletvisitsanewhost;   Theagletmayundergoanumberofotheropera- tionsataremotehost,suchasstoringthestate oftheagletontodiskdeactivatinganagent,re- trievingthestateofanagletfromdiskactivating anagent,cloningofanagletordisposinganaglet.The  Meeting  designpatterndeneshowsynchronisa- tionbetweendierentagentsthatwishtointeractwith eachotheristotakeplace.A  Meeting  classisusedto identifyaspecicagentservicewherethemeetingis totakeplace,andauniqueidentierforthemeeting itself;thelatterallowsmultiplemeetingstotakeplace atthesameagentservice.Onceanagentwhichwishes tointeractarrivesattheparticularagentserviceiden- tied,itneedstoregisteritselfwithamanagerobject suchasthestationaryagent,andnotifyotheragents ofitspresence.Theparticipantsinvolvedinthe  Meet- ing  designpatternaredescribedin4,andinclude:   MeetingManager:  responsibleforcoordinatingin- teractionbetweentheincomingagents,andin- formingthemofthearrivalordepartureofagents.Thisrolecanbeperformedbythestationaryagent presentatasite;   Meeting:  anobjectthatstorestheaddressofthe meetingpointandauniquemeetingidentier.It mustnotifythe  MeetingManager  aboutthearrival ordepartureofagents;   Agent:  abaseclassofamobileagent Hence,anagentnotiesa  Meeting  objectatitsarrival.The  Meeting  objectidentiesthe  MeetingManager  objectandregistersthenewlyarrivedagentusing the  addAgent  method.Thenewlyarrivedagentis notiedofallagentsthathavealreadyarrivedatthe meeting,andallexistingagentsarenotiedofthe presenceofthenewagent.Atdeparture,aleaving agentnotiesthe  Meeting  object,whichlocatesthe  MeetingManager  responsibleforthemeeting.The departingagentissubsequentlyunregisteredbythe  MeetingManager  .Thepresenceofanintermediate  MeetingManager  ob-  jectsallowsagentstosendmulticastorbroadcastmes- sagestootheragentsinvolvedinthemeeting.The  MeetingManager  hastocontacttheagentproxyatthe localhostifoneagentrequestsanoperationonan- other.Hence,althoughagentsmaypassmessagesbe- tweeneachother,itismoreecienttogoviathe  Meet- ingManager  ,ifmorethanonemessageneedstobesent. Agent Host (emerald.cs.cf.ac.uk) Meeting Point Agent ServicesMobile Agent Figure1: AgentMeetingPoint  000000000111111111 0000000011111111 0000000011111111 000000000111111111 Agent Host (emerald.cs.cf.ac.uk)AgletProxyAgletMeeting Manager Meeting Object Figure2: MeetingDesignPattern  The  MeetingManager  isalsousefulformaintainingdata sharedbymultipleagents,andtoautomaticallynotify themifanychangestakeplace.Figure1illustratesthe existenceofmultipleagentservicesatthesamehost,andgure2illustratestheinteractionbetweenvarious componentsinthe  Meeting  designpattern.Weaimto modelthisinteractioninourPetriNet. 2PetriNets:denitionandno- tation  AbriefoverviewofPetriNetsisprovidedinthis section,amoredetailedcoveragecanbefoundin14.APetriNetconsistsofa  structural  partanda  dynamic  part.Thestructuralpartisabipartiteandoriented graph  S  =  P;T;A;r;s  ,where  P  isthesetnite ofplaces, T  thesetniteoftransitions:thesetwo setsformtheedgesofthegraph. A    P    T    T    P  isthesetofarcs. r  : P    T  !  N  isthevalue ofanarcgoingfromatransitiontoaplaceand  s  : T    P  !  N  isthevalueofanarcgoingfroma placetoatransition.Wewillindicatewith    t  the set  f   p  2  P  :   p;t    2  A  g  ,theinputplacesof  t  .We deneinthesamewaythesetofoutputplacesof  t  with  t    =  f   p  2  P  :  t;p    2  A  g  ,thesetofinput transitionsofaplace   p  as     p  =  f  t  2  T  :  t;p    2  A  g  andthesetofoutputtransitionofaplace   p  as   p    =  f  t  2  T  :   p;t    2  A  g  .Wehaveaninitialmarking  M  0  ofthesetofplaces.Wedene   p  s  2  P  asthe  start place  ,usedtotriggeracontrolsequenceand   p  e  2  P  3  Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 0-7695-0001-3/99 $10.00 (c) 1999 IEEE   Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 3  the  endplace  .Torepresentcontrolconditionsinour model,weidentifywith  P  control thesetofcontrol places,where  P  control 2  P  . W  T  representsthesetof parametersassociatedwithtransitions,wherethe  i  th  1    i    length    P  elementcaneitherbepre-dened orexpressedasanexponentiallydistributedrandom variable.ThedynamicpartofaPetriNetinvolvesthechange inmarkingsovertime.Wesaythatatransition  t  is rablewithamarking  M  if  8   p  2    t; M     p      r     p;t  .Theringofatransitionchangesthestateofthe PetriNetfrommarking  M  into  M  0 asfollows: M  0    p   =  M     p  -  k  1    r     p;t  ifp  2    t  , M  0    p  =  M     p  +  k  2    s     p;t  ifp  2  t    andremainsunchangedotherwise,here  k  1  and  k  2  representmultiplicativefactorsassoci- atedwitheacharcin  A  .Todescribemobileagentsystemsweusetwoexten- sionstobasicPetriNetscalledthe  GeneralStochas- ticPetriNet  GSPN1and  ColouredPetriNet  12.InaGSPN,transitionscanbeoftwodierenttypes: immediate  transitionswhichreinzerotimeonceen- abled,and  timed  transitionsthatmayeitherreaf- terapre-denedintervalonceenabled,orhavean exponentiallydistributedrandomvariableassociated withthem,whichexpressesthedelayfromtheiren- ablingtotheirring.GSPNsareshowntobeequiva- lenttostochasticpointprocessesinwhichanembed- dedMarkovchaincanberecognised.ColouredPetri Netsontheotherhandallowthemodellingofrepeated structures,byassociatinga  colour  withtheenablingof transitions.Eachtransitionandtokencanbeassoci- atedwithacolourlabel,causingtheringoftransi- tionstonowbedependentontheavailabilityofto- kensofparticularcolourinaninputplaceforachange ofmarking.EachPetriNetmarkingshouldtherefore identifythetokensavailableateachplaceinacoloured PetriNet,ratherthansimplythetotaltokencountat aplaceasinabasicPetriNet. 3PNmodelofthe  Meeting  De- signPattern  WegenerateaPetriNetforeachserviceidentiedin section1.1,correspondingtodierentoperationsin- volvedinthe  Meeting  pattern.ThesePetriNetscan thenbecombinedtogethertomodelanagentsystem developedusingAglets.ThePetriNetsareasfollows:   PNforagent  arrival  and  departure  ;   PNfor  agent-host  interaction;   PNfor  agent-agent  interaction. Scenario1:SingleAgentServiceperhost  :When asingleagentserviceispresentatahost,allincoming agentsaretreatedidentically.Eachagentheaderisex- aminedtodeterminetheserviceitrequires,andneeds tobebueredataportbeforepassingontothe  Meet- ingManager  forregistration.ThePNingure3identiesthereceivingandregis- teringofanincomingagent.Weassumethatonlyone  MeetingManager  isavailable,andconsequently,only oneagentcanberegisteredatatime.The  Meeting- Manager  thereforerepresentsasynchronisationpoint forincomingagents.Fromgure3:   PlacesP:  Places  P1  and  P7  representthestart  s  o  and  s  e  placerespectively.Atokeninplace  P1  representstheexistenceofanincomingagent,and atokenin  P2  modelsthepresenceofaparticular portonwhichtheagentisreceived.Place  P3  rep- resentsthebueringassociatedwiththeincoming agentataport.Place  P4  isusedtomodelthe registrationoftheagentwiththelocal  Meeting- Manager  ,thelatterbeingmodelledasplace  P5  .Place  P6  correspondstothe  notication  toexist- ingagentsofthepresenceofthenewagent.Place  P7  isthenusedtotriggerthenextPNblockwhich modelseitheran  agent-agent  or  agent-host  inter- action.Itshouldbenoted,thatplaces  P2  , P5  in gure3and  P2  , P3  ingure4areactivatedby tokensreceivedfromexternalagents. j TransitionsT:  Transition  T1  isanimmediate transition,andmodelsthesynchronisationbe- tweenanincomingagentandtheavailabilityofa particularportandbuer.Forinstance,ifanin- comingagentrequestsconnectionsonaportwhich iscurrentlybusy,then  T1  wouldblockanyfurther operations.Transition  T2  isatimedtransition,andrepresentsthetimetobuertheincoming agentonanidentiedport.Transition  T3  repre- sentsthetimetoregisterandauthenticateanin- comingagentviathe  MeetingManager  .Weassume thatonlyoneagentcanberegisteredatatime,hencethesynchronisationofplaces  P5  and  P4  via  T3  .Asthe  MeetingManager  canperformmany operations,thetimetoregisteranincomingagent isdependentonthecurrentloadonthe  Meeting- Manager  object.Thetimeassociatedwithther- ingof  T3  correspondstothetimerequiredforreg- istration.Weusearandomvariabletomodelthis time,asitcannotbepredened.Theactivation timefortransition  T4  representsthetimerequired tonotifyexistingagentsofthepresenceofthecur- 4  Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 0-7695-0001-3/99 $10.00 (c) 1999 IEEE   Proceedings of the 32nd Hawaii International Conference on System Sciences - 1999 4
Search
Similar documents
View more...
Tags
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks