![Page 1: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/1.jpg)
An Application Framework For Event-driven, Re-configurable
Distributed Applications
M.RanganathanMultimedia and Digital Video Group
National Institute of Standards and Technology
![Page 2: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/2.jpg)
Goals of the AGNI Project
• Design and build a secure , extensible, re-configurable, fault-tolerant middle-ware for peer-to-peer distributed applications.
• Develop peer-to-peer applications based on developed infra-structure.
• Evaluate architectures for Mobile Agent platforms via simulation.
![Page 3: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/3.jpg)
Application Scenarios
• Distributed Event-driven applications:– Distributed testing, logging and monitoring.– Distributed control.– Conferencing, conference control.– Network Management.
![Page 4: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/4.jpg)
Overview
• Built around the Mobile Streams abstraction.– A Mobile Stream is a named communication end-point.– Provides a FIFO ordering guarantee.– Name-location mapping can dynamically changed.
Basic idea: Start with the communication structure of the application.Attach handlers to communication end-points to define complete app.
![Page 5: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/5.jpg)
Streams
STREAM (global name, ordering guarantee)
Handler Handler Handler
Messages
![Page 6: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/6.jpg)
Overview
• Application is structured as a set of handlers that “react” to messages.
• System can be re-configured dynamically - Streams can be moved around in reaction to external changes.
![Page 7: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/7.jpg)
Resource Control
• System is re-configurable and dynamically extensible– System can be extended by dynamically adding
Streams and handlers. – Reconfigured by moving around streams.
• Resource Control Mechanism – controls on mobility, message delivery,
reconfiguration, new stream creation and destruction.
![Page 8: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/8.jpg)
Resource Control Mechanisms
• System-wide resource control.• Per-stream resource control.• Per-location resource control.
![Page 9: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/9.jpg)
Application : Agent Monitor
• Track the location of agents in the distributed system.
• Reactive GUI application.• Allow user to easily deploy agents using a
GUI driven management tool.
![Page 10: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/10.jpg)
Agent Monitor
![Page 11: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/11.jpg)
Agent Debugger
• A tool to debug Agent Scripts.• Extension of tcl-debug debugger.• Goals:
– Location transparency.– Global stepping.– Global conditional breaks.
![Page 12: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/12.jpg)
Agent Debugger Organization
Debugger GUI
Debugee Agent
Monitor Stream
MBOX
Per-locationController
![Page 13: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/13.jpg)
Total ordering of messages
• Total order:– Messages can be sent concurrently.– Consumers consume messages in the same order.
• Application:– Collaborative sharing of unmodified Tk applications
using WYSIWIS model.– Dynamic reconfiguration to reduce latency.
![Page 14: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/14.jpg)
Tk-Collaborative Toolkit
Event Dispatcher
Tk Application Tk Application
Tk Events Tk Events
Mobile
Tk Events Tk Events
Tk Events
![Page 15: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/15.jpg)
Record and Replay of collaborative tools
• XCVW Multi-party conferencing tool.– Asynchronous interactions generated by each party.– Want to record the interactions while tool is being used
and replay tool live later keeping the same event sequencing.
– Live replay generates the same network load.• Joint work with MITRE (Supported by DARPA
under the IC&V project).• Uses the NIST Mobile Stream Infrastructure.
![Page 16: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/16.jpg)
Organization
![Page 17: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/17.jpg)
Causal Order via mobility• Can replace causal ordering of actions by
streams and FIFO messages (between streams).
A B AT2 T5T3
T6T1A
C
• Example: Sequence of actions to be performed on machines A B and C:
Applications: Testing and collaborative applications.
![Page 18: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/18.jpg)
Application: Distributed Testing
• Simplifies the design and construction of distributed testers as follows:– Asynchronously and autonomous execution simplifies
logic to build testers.– Reduction of tester generated network load.– Reduction of control latency.– Encapsulation of protocols used in distributed testing.– Dynamic adaptation to failures.
![Page 19: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/19.jpg)
Example
• Required sequence:– Start data producer at A.– Start data consumer at B.– Initiate the transfer of data from A to B– Report the timing.
• Agent :– Hop to A start producer– Hop to B start consumer– Hop back to A start transfer.– Gather result and report.
![Page 20: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/20.jpg)
A Distributed web-based Test Harness
• A high level scripting environment to specify sequences of actions and execute them in a web-based environment.
T1
T3
T2T4
At location 2At location 1
At location 3
At location 1
Sequential { at 1 { do task T1 } concurrent {
at 2 {do task T2}at 3 {do task T3}
} at 1 {do task T4}}
![Page 21: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/21.jpg)
Architecture
HTTPD
Browser Agnid Agnid Browser
Sequential { at 1 { do task T1 } concurrent {
at 2 {do task T2}at 3 {do task T3}
} at 1 {do task T4}}
Compiler
AGNI Streams Commands
![Page 22: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/22.jpg)
System Organization
RELIABLECACHE/DIRECTORY MANAGER
CacheState
Control traffic
Unreliable Peer
Agent Daemon
CacheState
Unreliable Peer
Agent Daemon
Control traffic
Data
![Page 23: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/23.jpg)
Hierarchical Directory Managers
![Page 24: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/24.jpg)
Agent Daemon Organization
Stream (name)Stream (name)
LocationLocation
AgentAgent
Stream (name)Stream (name)
BriefcaseBriefcase
Tcl InterpTcl Interp
POSIX ThreadPOSIX Thread
AgentAgentBriefcaseBriefcase
Tcl InterpTcl Interp
POSIX ThreadPOSIX Thread
AgentAgentBriefcaseBriefcase
Tcl InterpTcl Interp
POSIX ThreadPOSIX Thread
AgentAgentBriefcaseBriefcase
Tcl InterpTcl Interp
POSIX ThreadPOSIX Thread
![Page 25: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/25.jpg)
System Simulation
• We have built a complete simulation of system:– Most code re-used from actual implementation.– Underlying message interface is simulated.
• Allows experimentation with protocols and algorithms for re-configurable systems.
![Page 26: An Application Framework For Event-driven, Re-configurable Distributed Applications](https://reader033.vdocuments.net/reader033/viewer/2022051219/5681601c550346895dcf1a87/html5/thumbnails/26.jpg)
Future Plans
• Research Issues:– Security– Efficient inter-stream communication.– Resilience / Fault tolerance.
• Applications– Network management.– Distributed web-based testing.– Caching for collaborative applications.– Distributed resource-aware applications.