P2P I nte re sts a t NRL And our capabilities for modeling P2P - - PowerPoint PPT Presentation

p2p i nte re sts a t nrl
SMART_READER_LITE
LIVE PREVIEW

P2P I nte re sts a t NRL And our capabilities for modeling P2P - - PowerPoint PPT Presentation

P2P I nte re sts a t NRL And our capabilities for modeling P2P middle- ware in MANETs. Outline Unique Navy requirements NRLs approach to protocol engineering Simulating Java apps with AgentJ + NS-2 AgentJ implementation


slide-1
SLIDE 1

P2P I nte re sts a t NRL

And our capabilities for modeling P2P middle- ware in MANETs.

slide-2
SLIDE 2

Outline

Unique Navy requirements NRL’s approach to protocol engineering Simulating Java apps with AgentJ + NS-2 AgentJ implementation details AgentJ demo AgentJ development status

slide-3
SLIDE 3

Challenging DoD Requirements

  • Important to leverage open standards where sensible

Cost-savings, interoperability and maintainability. Complex systems need “more eyes” on algorithms, code , etc.

  • But DoD requirements often push beyond organic standard

expectations:

  • Operations in highly stressed environments
  • Peak performance issues may override average performance
  • Rapid, flexible deployment with minimal pre-configuration and management
  • High volume of group communication as compared to current commercial systems
  • Heterogeneous mix of platforms, operating environments (air, land, sea)
  • Inter-service, national, and coalition interoperation
  • Security requirements
  • Challenges:
  • Selection of appropriate standards
  • Adaptation of those standards to DoD environments
  • Understanding of performance and interactions across layers
slide-4
SLIDE 4

A View of the Internet

(from 80,000 feet)

The Mainstream Internet

Some Common Characteristics

  • Ad hoc assets
  • Generally wireless
  • Design for degraded operation
  • Large variability in latency and

bandwidth

  • Highly dynamic routing
  • More distributed service

models

  • Change is the norm

Some Common Characteristics

  • Stable infrastructure
  • Fiber optic/High-speed

RF/wireless optical

  • Highest bandwidth
  • Low latency
  • Connection-oriented links
  • Policy-based QoS

Some Common Characteristics

  • Mixed range of assets
  • Mixed media
  • Tending to higher bandwidth
  • Low to high latency
  • Table-based routing
  • Mixed policies in forwarding

and QoS

High Performance Networks Mobile, Ad Hoc Networks

slide-5
SLIDE 5

Service Oriented Architecture

Network Application Design and Issues

  • Different distributed application paradigms (Web

Services, Grid Computing, Agent-based)

  • Different service types and reliability Requirements
  • Highly Distributed and Dynamic Inter-app

communication design issues

  • Effectiveness of designs in MANET environments

Middleware Services Opportunities & Challenges

  • Publish/Subscribe
  • Peer discovery
  • Service discovery
  • Persistent data transport
  • Application security services
  • Very immature in MANET environments

Network Challenges

  • Infrastructure vs. Ad-hoc environments:

Tactical Edge networks and platforms may have intermittent connectivity to infrastructure. Different network services (“underware” incl. transport, name resolution, auto-configuration, discovery, etc) may be needed for extreme environments.

  • Cross-layer integration for better performance
slide-6
SLIDE 6

Vision: Potential Evolution of Network-based Systems

Self-configuring Self-organizing Self-healing Self-managing Increasing Capability MANET Routing Peer-to-Peer “Network-aware” Agent-based Systems Auto-configuration Robust, persistent data transport Human Interaction (“man on the loop”) Distributed Autonomy Distributed Applications Technology Development Disruption Tolerance

slide-7
SLIDE 7

Our approach is multi-layered.

IP and MANET Network Stack

Apps Middleware

IP and MANET Network Stack

Mobile Net Simulation

Environment Simulation

Scenario Environment I/O

Apps Middleware

Mobile Net Emulation

Environment Simulation

Scenario Environment I/O

NRL Mobile Emulator or Field

Scenario Generation, Traffic Analysis, Visualization

Network Simulator

MANET Multicast MANET Multicast

slide-8
SLIDE 8

Approach

Simulation Allows for possible large scale evaluation. Rich set of candidate protocols available Virtually unlimited instrumentation, highly reproducible NRL has used ns-2 and OPNET modeling tools Emulation Real systems with emulated connectivity, automated for possibly

reproducible results

Low to moderate scalability Encompasses real-world system phenomena Often more detailed and comprehensive than simulation Field Testing The “real deal” including subtleties of physical phenomena

(propagation, etc)

slide-9
SLIDE 9

For example: Opnet vs NS-2 Multicast (SMF) Results

Simulate (NS-2, Opnet), Emulate (MAN, MANE), Live-network Tests… Ideally, these different approaches should cross-validate their results!

slide-10
SLIDE 10
slide-11
SLIDE 11

Protocol development

OLSR Multicast (simplified and reliable) Anycast Protolib

Analysis Tools

Simulation models (operating on real-world code) Mobile Network Emulator Traffic generator Visualization and network animation tools

All open sourced, to move the community forward.

http://pf.itd.nrl.navy.mil

Our products

slide-12
SLIDE 12

Recommendations for the P2Prg CORE research approach

  • 1. Localized service discovery
  • 2. Responsive and reliable discovery
  • 3. Cross-layer design
slide-13
SLIDE 13

Presented by Ian Downard.

Interpreting ja va .ne t for P2P Middleware Models in NS-2

slide-14
SLIDE 14

Regarding:

From: "John Buford" <buford@research.panasonic.com>

To: <p2prg@ietf.org> Date: Sat, 28 Jan 2006 23:04:27 -0500 Subject: [P2Prg] request for presentations at IETF65 on P2P Simulation Tools “Given the wide set of tools for simulating P2P systems as described by Alan's and Mario's recent draft, we are proposing to have some presentations at the next P2PRG meeting at IETF 65 by researchers who are building such simulations. Goal would be to share mutual experiences with both existing and home-grown tools.”

slide-15
SLIDE 15

Background

NRL has been working with Cardiff University in Wales

who have a p2p implementation entitled "P2PS" (Peer-to- Peer Simplified) for applications in Grid computing and web services

Using AgentJ, we have ported a version of P2PS into ns-

2, and we are conducting ongoing work with looking at p2p in MANET environments.

slide-16
SLIDE 16

Motivation

AgentJ is being used at NRL to test peer-to-peer

protocols for service discovery in simulated wireless networks. This work is motivated by a need to discover resources in disadvantaged mobile ad-hoc networks. Presently, we are looking at P2P approaches to resource discovery and comparing them against various multicast techniques in a focused effort to produce middleware that conserves bandwidth and energy, reduces congestion and contention, and exhibits robustness to network fragmentation and node mobility.

slide-17
SLIDE 17

References

IRTF P2PRG Internet Draft, “Tools for

Peer-to-Peer Network Simulation”

draft-irtf-p2prg-core-simulators-00.txt

slide-18
SLIDE 18

AgentJ Presentation Goals

1.

What is AgentJ? Design summary.

2.

Technical capabilities

3.

Demo

4.

Implementation caveats, and ongoing work.

slide-19
SLIDE 19

3rd party Java code Protolib Protolib Live or emulated network NS-2 simulated network

AgentJ Overview

Interfaces NS-2 scheduler to Java apps. Also overloads java.net and invokes the JNI for Protolib compatibility. Abstracts socket and timer implementations.

AgentJ

NS-2 events NS-2 events

slide-20
SLIDE 20

Important!

AgentJ is an NS-2 agent,

not an agent as in “Mobile Agents”, or

“Intelligent Agents”

slide-21
SLIDE 21

NS-2 network animator screenshot

  • f a 25 node MANET.

How the simulation is configured.

NS-2 TCL script NS-2 TCL script

  • 1. User creates the network

(nodes, MAC, motion, etc)

  • 2. User instantiates 3rd party

Java applications into NS-2

  • 3. And binds them to AgentJ
  • 4. Finally the simulation is

RUN!

slide-22
SLIDE 22
slide-23
SLIDE 23

3rd party Java code 3rd party Java code 3rd party Java code

  • 1. User creates the network

(nodes, MAC, motion, etc)

  • 2. User instantiates 3rd party

Java applications into NS-2

  • 3. And binds them to AgentJ.
  • 4. Finally the simulation is

RUN!

JVM Global Java context hash table

AgentJ

NS-2 TCL script NS-2 TCL script

How the simulation is configured.

slide-24
SLIDE 24

NS-2 network animator screenshot

  • f a 25 node MANET.

Variables Thread

  • bjects

Socket

  • bjects

Node ID

AgentJ maintains a global context for every Java object in the simulation.

Global Java context hash table

slide-25
SLIDE 25

The simulation runs!

  • 1. User creates the network

(nodes, MAC, motion, etc)

  • 2. User instantiates 3rd party

Java applications into NS-2

  • 3. And binds them to AgentJ.
  • 4. Finally, the simulation is

RUN! NS-2 TCL script NS-2 TCL script Simulated time

slide-26
SLIDE 26

JVM

AgentJ

AgentJ runs when NS-2 fires off an event for a Java object.

NS-2 fires off an event

for a Java object, such as data received, or timer expired.

Simulated time 3rd party Java code AgentJ halts NS-2’s clock and runs that node’s Java context.

slide-27
SLIDE 27

JVM

AgentJ

AgentJ runs when NS-2 fires off an event for a Java object.

When the Java code

returns or blocks, AgentJ gives clock control back to NS-2

Simulated time 3rd party Java code

slide-28
SLIDE 28

AgentJ Design Summary

AgentJ instantiates a single JVM for the

entire simulation

AgentJ loads a node’s Java context into

the JVM whenever NS-2 fires off an event for that node.

slide-29
SLIDE 29

AgentJ threading capabilities

Includes limited support for multi-threaded

Java network applications

Synchronous socket I/O implemented via

Java byte code rewriting

ja va .ne t a g tj.ne t

AgentJ also supports asynchronous

socket I/O with Protolib sockets pa i.ne t

slide-30
SLIDE 30

Ja va .ne t support

Create sockets on a port

Da ta g ra mSo c ke t (int po rt) Multic a stSo c ke t (int po rt)

This is untested due to limitations in group based multicast

routing in NS-2. Note, we can use SMF by addressing DatagramPackets to -1 (the NS-2 broadcast address).

Send packets on a socket to an address

So c ke tAddre ss (java .la ng .String addr, int po rt)

Accepts IP addresses or NS-2 addresses

Da ta g ra mPa c ke t (b yte [] buf, int le ng th,

So c ke tAddre ss a ddre ss)

slide-31
SLIDE 31

ja va .la ng .T hre a ds support

T

hre a d.sta rt()

Spawns new java threads Used by ja va .ne t.Da ta g ra mSo c ke t to

receive packets

T

hre a d.sle e p() not yet implemented, but

should be later.

Requires use of the Protolib Timer Interface,

which has not been tested much.

Java – oTCL interface provides a workaround

slide-32
SLIDE 32

Scale?

50 Java Agents 500 Java Agents 2000 Java Agents

slide-33
SLIDE 33

Memory Complexity for AgentJ in NS-2

Total Memory Usage Number of Nodes Memory per Node Yes, AgentJ starts

  • ut needing 1Gig…

…but, it grows less per extra node.

slide-34
SLIDE 34

AgentJ Demo

Mobile Agent Systems

A study in role

allocation with “intelligent” agents.

Measuring the

agents’ resistance to unreliable comms.

Mine field scenario

slide-35
SLIDE 35

Current AgentJ Products

Documentation (conference publication,

JavaDoc, web page)

http://pf.itd.nrl.navy.mil/srss

Basic proof-of-concept applications (client-

server)

Total of 50+ classes, including:

sample applications Protolib socket and timer interfaces multicast socket support command interface to oTCL ja va .ne t, ja va .la ng .T

hre a ds reimplementations

slide-36
SLIDE 36

Development Status

“AgentJ: Enabling Java NS-2 Simulations for

Large Scale Distributed Multimedia Applications”, accepted for publication at the Distributed Frame for Multimedia Applications (DFMA) conference, May 2006.

(Alpha code) Limited ja va .la ng .thre a d capabilities Limited ja va .ne t capabilities

slide-37
SLIDE 37

Ongoing work

Mobile intelligent agent systems Integration with P2PS Attempting to attract more open-source

developers, who can help expand our java.net and java.lang.Threads implementations.

slide-38
SLIDE 38

Questions?

slide-39
SLIDE 39

1.

An Overview of the Peer-to-Peer Simplified (P2PS) Architecture

2.

Outline it’s integration into NS-2

3.

Tutorial for simulating Java Apps in NS-2.

4.

Demonstration of P2PS Service Discovery

  • ver a multihop wired network in NS-2
slide-40
SLIDE 40

Terminology used in P2PS

XML Advertisements Discovery Queries Pipes Services Endpoints Pipe/Endpoint

Resolution

Rendezvous peers

slide-41
SLIDE 41

Advertisements

Nodes announce network resources they have

access to via advertisements written as XML documents.

Pipes Services Endpoint addresses (of peers) Rendezvous nodes

XML is used as a language independent format

for exchanging messages.

slide-42
SLIDE 42

Advertisements

Pipe advertisements describe communication

channels’ attributes such as:

unidirectional, bidirectional secure, insecure reliable, unreliable multicast, unicast

Discovery pipes typically operate over UDP

multicast, which allows peers in a subnet to hear each other’s advertisements.

slide-43
SLIDE 43

Advertisements

Endpoint advertisements announce the

address a peer is using for sending and receiving data.

Pipes are resolved to endpoint addresses by

resolver peers.

Peers which can resolve endpoint

addresses are advertised with Endpoint Resolver advertisements.

slide-44
SLIDE 44

Advertisements

Rendezvous Advertisements announce

specialized peers, called rendezvous peers, that can forward queries (not advertisements) across multiple subnets.

Rendezvous Peers cache advertisements and

  • queries. When a cached adverts are matched

with new queries, or cached queries are matched with new adverts, then the rendezvous peer broadcasts the query within its local discovery subnet.

slide-45
SLIDE 45

Queries

Used to locate specific resources (pipes,

services, endpoints, pipe/endpoint resolvers, etc).

Queries request a response from peers

which can match the query to a cached advertisement.

slide-46
SLIDE 46
slide-47
SLIDE 47

P2PS/NS2 Design Overview

Java Broker

Protolib

JNI JVM

PAI NS2 Agent

Protolib PAI NS2 Agent Protolib PAI NS2 Agent

NS2 Comms

Custom Java Code Custom Java Code Custom Java Code

JNI Interface

JNI: Java Native Interface JVM: Java Virtual Machine PAI: Protolib Application Interface Figure by Ian Taylor

slide-48
SLIDE 48

P2PS/NS2 Design Overview

Java Broker

Protolib

JNI JVM

PAI NS2 Agent

Protolib PAI NS2 Agent Protolib PAI NS2 Agent

NS2 Comms

Custom Java Code Custom Java Code Custom Java Code

JNI Interface

JNI: Java Native Interface JVM: Java Virtual Machine PAI: Protolib Application Interface

slide-49
SLIDE 49

Protolib PAI PTI (Timing) PCI (Communication) P2P Middleware

How P2PS Interfaces with Protolib

PAI – Protolib Application Interface PCI – Protolib Communication Interface PTI – Protolib Timer Interface Figure by Ian Taylor

slide-50
SLIDE 50

script.tcl

set p(1) [new Agent/AgentJ] $ns_ attach-agent $n(1) $p(1)

AgentJ

Sending commands from TCL to Java Agents

slide-51
SLIDE 51

script.tcl

$ns_ at 0.0 “$p(1) setClass \ /path/to/classes/ MyJavaApp

AgentJ::Command

I recognize the command, “setClass <classpath> <class>”

Sending commands from TCL to Java Agents

slide-52
SLIDE 52

script.tcl

AgentJ::Command Java Broker

Creates a JVM Registers MyJavaApp class with Java Broker $ns_ at 0.0 “$p(1) setClass \ /path/to/classes/ MyJavaApp

JNI JVM

MyJavaApp

slide-53
SLIDE 53

script.tcl

AgentJ::Command JNI JVM Java Broker

MyJavaApp::Command parses startSpider text and schedules the “spider to start” at simulation time 1.0. $ns_ at 1.0 “$p(1) javaCommand startSpider”

MyJavaApp

I recognize the command, “javaCommand <command> <args>”. AgentJ::Command parses javaCommand text and routes the startSpider command to MyJavaApp I will route “<command> <args>” to the appropriate Java

  • bject.
slide-54
SLIDE 54

AgentJ::Command

implements

CommandInterface.java

script.tcl

Java TCL

“$p(1) setClass <classpath> <class>”

“$p(1) javaCommand <command> <args>”

Sending commands from TCL to Java Agents

Figure by Ian Taylor

slide-55
SLIDE 55

Developing Simulations

1.

Create and attach java agent object to ns-2 node

set p(1) [new Agent/AgentJ] $ns_ attach-agent $n(1) $p(1)

2.

Define the class for the agent

$ns_ at 0.0 “$p(1) setClass /path/to/classes/ \ MyJavaApp

3.

Send the agent commands

$ns_ at 1.0 “P(1) javaCommand startSpider”

slide-56
SLIDE 56

Writing Java Apps for PAI

Use Java-PAI socket implementation

For existing applications, simply replace

java.net with pai.net

slide-57
SLIDE 57

Writing Java Apps for PAI

Remove threads (or “serialize” them)

Cannot simulate threads in ns2. The program

counter in simulated applications needs to serially follow through the program. Spawned threads might not complete by the time the rest of the application’s code is simulated.

Remove accesses to hardware devices (like

serial ports)

Including some system calls

Such as, gettimeofday, java.util.date,

Cannot simulate in ns2. You can’t “spawn” new

hardware!

slide-58
SLIDE 58

Writing Java Apps for PAI

Remove accesses to hardware devices

(like serial ports)

Including some system calls

Such as, gettimeofday, java.util.date,

Cannot simulate in ns2. You can’t “spawn”

new hardware!

slide-59
SLIDE 59

Demonstration of P2PS Service Discovery over a wired network

slide-60
SLIDE 60

Questions?