1 / 27

MobiCS: An Environment for Prototyping and Simulating Distributed Protocols for Mobile Networks

MobiCS: An Environment for Prototyping and Simulating Distributed Protocols for Mobile Networks. Ricardo C.A. da Rocha (IME/USP) rcarocha@ime.usp.br Markus Endler (PUC-Rio) endler@inf.puc-rio.br. Outline. Motivation and Related Works System Model and Reference Architecture MobiCS Overview

sera
Download Presentation

MobiCS: An Environment for Prototyping and Simulating Distributed Protocols for Mobile Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MobiCS: An Environment for Prototyping and Simulating Distributed Protocols for Mobile Networks Ricardo C.A. da Rocha (IME/USP) rcarocha@ime.usp.br Markus Endler (PUC-Rio) endler@inf.puc-rio.br

  2. Outline • Motivation and Related Works • System Model and Reference Architecture • MobiCS Overview • Deterministic simulation • Stochastic simulation • Example • Conclusions

  3. Motivation  • Characteristics of Mobile Computing Environments • Dynamic Network Topology • Energy is scarce resource  Mobile Host may enter doze mode or be turned off • Wireless communication • unreliable connectivity (e.g. intermittent periods of disconnection) • QoS parameters change very fast • lower throughput

  4. Motivation  • Distributed Protocols for Mobile Computing should... • handle variable number of interacting nodes • make efficient use of wireless communication • consider non-availability  failure • maintain consistent distributed state despite disconnections • be correct and efficient for any number of hosts (scalability) and mobility pattern (mobility robustness) Fact: Evaluating the protocol´s correctness and efficiency are difficult tasks

  5. Motivation • Our goal: • Build a tool for rapid prototyping and evaluation of distributed protocols (e.g. multicast, reliable message delivery, notification protocols) • Approach: Protocol evaluation (correctness & efficiency) through simulation. • The tool should support: • definition of appropriate abstractions for programming the protocol (e.g. message, request-reply, transaction) • design of network elements with arbitrarybehaviors. • programming of appropriate simulation models, specially mobility models.

  6. Other Simulators  Common Limitations • Protocol developer has also to deal with low-level details. • Form of simulation (e.g. parallel) is not fully transparent. • Limited extensibility. • Lack of integrated support for protocol validation and testing. • Limited programmabilty of mobility models.

  7. System Model for Protocols in Mobile Computing • We assume a structured mobile network composed of Mobile Hosts (MHs), Mobility Support Stations (MSSs) • We adopt the Indirect Model [Badrinath94], where all communications are split into a wired and a wireless part • Basic unit of interaction in a protocol message • If mobile host is reachable, wireless message is delivered. But MH may be disconnected or migrating. • QoS of the wireless connection is modeled as its effective transmission rate. • Hand-Off is initiated by the MH • At any time, every MH is associated with exactly one MSS

  8. Reference Architecture for Simulation • Application makes service requests (user or automatically generated) • Distributed Protocols are programmed and tested • Network Elements implement HW and basic SW functionality (OS, low-level Netw. Protocols) • Simulation Engine: • schedules event processing order • may implement several simulation modes. Application Distributed Protocols Network Elements Simulation Engine

  9. MobiCSMobileComputingSimulator • MobiCS is a java class library implementing the Reference Architecture • Main Advantages: • Single tool for prototyping, validating and analysing distributed protocols. • A generic Simulation Engine API offers complete transparency of simulation modes. • Programmable and customizable simulation models (e.g. mobility, connectivity, etc.) • Supports the creation of abstractions for protocol implementation. • Comes with a deterministic and a stochasticsimulation mode (others may be added).

  10. Protocol Wired Wireless Handoff MobiCS:Protocol Programming  • Object-oriented protocol design • Protocols are composed of micro-protocols, which interact through events (mainly, messages and timers) • Main Protocol Components: • Micro-protocols are Java interfaces whose methods are handlers for the events.

  11. MobiCS:Deterministic Simulation  • Used for debugging/testing the correctness of the protocol. • A user creates a simulation script, which is executed by the simulator. • This script describes a specific scenario (i.e. pattern of protocol-external events) • Events may be application requests, MH migrations, MH disconnections, etc. • Global synchronization points end_step()in the script define the causal order relationship among the events. • Message acceptance can be toggled on/off to simulate message transmission delays: Accept(msgType) and AcceptTurnOn(bool).

  12. MobiCS:Deterministic Simulation  • Example: • The simulation executes in steps (i.e. there is no notion of simulated time) • Scripts should reflect critical situations in which the protocol behaviour is to be tested. • Since only a minimal fraction of all possible situations can be described, this method gives no guarantee of the protocol´s correctness  testing Mh1.moveTo(cell1); // Mh1 at cell of Mss3Mh1.send(new Req);Mss3.accept(Req);end_step(); Mh2.unavailable();

  13. C Independent events MobiCS:Deterministic Simulation  • Script {ha,MSSo,MSSn}.acceptOn() mh.send(new Req()); mh.moveTo(MSSn); end_step(); // cut C server.accept(Req); mh.accept(Res); server res Home agent (ha) req res MSSo req mh res MSSn

  14. MobiCS:Deterministic Simulation  • Output • Programmer may add printout of messages in specific event handlers • User-configurable Event Log generated by MobiCS´ simulation engine. • Exceptions raised during execution of either the script or the protocol code.

  15. MobiCS:Stochastic Simulation  • Allows “performance analysis” of a protocol (i.e. message complexity) • Conists of a continuous test with randomly generated events. • User creates a simulation model: Defines the behavior of all network elements concerning mobility and connectivity. • Simulation Model can be: • programmed (extending classes) or • configured (instantiation of pre-defined objects). • A simulationObject (for each network element) determines whether an event of certain type will be generated at each simulated time unit.

  16. Using MobiCS • Protocol Implementation  extend basic classes Protocol and Message • Implement the Network Elements and configure the network to be simulated  extend basic classes Mss, Mh, ... • Build the simulation scenarios: • Choose the deterministic scenarios  program deterministic script  run simulation  compare expected and real result • Choose stochastic simulation model  create corresponding simulation objects  run simulations  analyse event log

  17. server Res Req Ack proxy Proxy created MSSp Req Mh ForwardRes PList DeReg UpCurLoc ForwardRes ? Ack Greet MSSo UpCurLoc Hand-off PList DeReg Ack Greet MSSn FRes ExampleRDP 

  18. Mss Mss wireless wireless wired wired Mh wireless handoff handoff RDP Structuring: Protocol Interactions  • Protocol structured as 3 micro-protocols • wired, wireless e handoff Req,Ack ForwardRes ForwardRes Ack RemPList ForwardRes PList UpdCurrLoc DeReg

  19. RDP Structuring:Protocols  • Since there are 3 types of network elements, Server, Mh and Mss ... • we need to declare following Protocol interfaces: • Define 3 protocol instances (subclasses of Protocol): RDPServer, RDPMh, RDPMss,that implement the corresponding Protocols RDPHandOffModule RDPMssWired RDPMssWireless RDPMhWireless RDPServerWired

  20. Example:Network Configuration  mh = new MyMh(“Mh 1",sim); cell1 = new Cell(); cell2 = new Cell(); cell3 = new Cell(); mss1 = new MyMss(“Mss 1",sim,cell1); mss2 = new MyMss(“Mss 2",sim,cell2); mss3 = new MyMss("Mss 3",sim,cell3); wr = new WiredLink(mss2.getAddress(), mss1.getAddress()); wr2 = new WiredLink(mss1.getAddress(), mss3.getAddress());

  21. Res Req Ack Proxy created Req MSSo receives ForwardRes before handoff of Mh is completed ForwardRes PList DeReg UpCurLoc ForwardRes ? Ack Greet UpCurLoc PList DeReg Ack Greet FRes Example: Choosing a Deterministic Scenario  • Goal: Test protocol when ForwardRes arrives at a MSS while a Mh is migrating to another cell server proxy MSSp Mh MSSo MSSn

  22. Res Req Ack server Proxy created proxy Req ForwardRes PList DeReg MSSp UpCurLoc ForwardRes Mh ? Ack Greet UpCurLoc MSSo PList DeReg Ack Greet FRes MSSn Example: Scripting the Scenario  Server.acceptTurnOn(false); MSSn.acceptTurnOn(false); Mh.send(new Req()); Mh.moveTo(MSSo); end_step(); Mh.moveTo(MSSn); end_step(); Server.acceptTurnOn(true); end_step(); MSSn.acceptTurnOn(true);

  23. Example:Stochastic Simulation  • Example of a Simulation Model • MH Activity and Cell Attraction • Activity: probability that a MH is active (reachable) • Cell Atraction: probability that a migrating MH chooses the cell as its target cell Mobilidade • Migration Willingness: probability that a MH moves to another cell • Network Topology: neighbourhood relation among cells • Wireless QoS: Effective wireless transmission rate • Application requests: probability that a service is requested from the protocol (e.g. RDP request)

  24. Stochastic Simulation: Some Results  • We measured how the number of re-transmissions (ForwardResult) per Requests is affected by the Mobility Factor • Mobility factor = probability that a migration event is generated every n simulated time units • Other tests: size of proxyList with growing Request/Migration Ratio • Conclusion: RDP´s message overhead grows quickly with increasing migration and request rates.

  25. Conclusions • MobiCS Flexible simulation environment that integrates protocol testing (correctness) and performance analysis • Supports modular and extensible prototyping of distributed protocols  OO and micro-protocols • Provides deterministic and stochastic simulation modes, and allows for other modes (e.g. parallel) to be programmed. • Protocol implementation is totally independent of the chosen simulation mode.

  26. Conclusions • Main Contributions: • Implementation of a tool for prototyping and analysis of distributed protocols  MobiCS • Proof of concept of: • Reference Architecture for flexible and extensible simulators for Mobile Computing. • Framework for the implementation of MC simulation models and integration in a simulator • Usability • MobiCS has been used in a graduate courses at IME/USP to implement a multicast protocol MCAST [Acharya93]

  27. Conclusions  • Future Works: • Define “Network Emulation API”  MobiCS as a testbed for MC applications • Build library of mobility and wireless QoS models. • Implement parallel simulation mode. • Create Graphic User Interfaces  script creation, log-based animation, protocol debugging • MobiCS is freely available URL http://www.ime.usp.br/~rcarocha/mobics

More Related