22
April 1998, University of Pennsylvania Anna Philippou PLAN: A Programming PLAN: A Programming Language for Active Language for Active Networks Networks Hicks, Kakkar, Moore, Hicks, Kakkar, Moore, Gunter, Nettles Gunter, Nettles

April 1998, University of Pennsylvania Anna Philippou PLAN: A Programming Language for Active Networks Hicks, Kakkar, Moore, Gunter, Nettles

  • View
    217

  • Download
    4

Embed Size (px)

Citation preview

April 1998, University of Pennsylvania

Anna

Philippou

PLAN: A Programming PLAN: A Programming Language for Active Language for Active NetworksNetworksHicks, Kakkar, Moore, Gunter, Hicks, Kakkar, Moore, Gunter, NettlesNettles

SynopsisSynopsis

• Motivations and requirementsMotivations and requirements

• The languageThe language

• The networkThe network

• ImplementationImplementation

• Summary and conclusionsSummary and conclusions

MotivationMotivation

• Introduce programmability into the Introduce programmability into the networknetwork

ApproachApproach

SService Levelervice Level

• programmable programmable network routersnetwork routers

• node-resident services node-resident services written in a general-written in a general-purpose language purpose language

• authentication may be authentication may be required for certain required for certain servicesservices

Packet LevelPacket Level

• programs within programs within packetspackets

• special-purpose special-purpose language (PLAN) language (PLAN)

• network configuration, network configuration, resource discovery, no resource discovery, no need for authenticationneed for authentication

PLAN basicsPLAN basics

• A language for programs carried in A language for programs carried in packets of a programmable networkpackets of a programmable network

• PLAN programs replace the headers of PLAN programs replace the headers of packets in traditional networkspackets in traditional networks

• Ability to call routines written in other Ability to call routines written in other languageslanguages

• Availability guaranteesAvailability guarantees

RequirementsRequirements

• FlexibilityFlexibility

• SafetySafety

• SecuritySecurity

• PerformancePerformance

• UsabilityUsability

The LanguageThe Language

Functional Language in the style of Functional Language in the style of MLML– strictly functionalstrictly functional

– strongly typed and statically typeablestrongly typed and statically typeable

– lexically scopedlexically scoped

The LanguageThe Language

However, unlike ML,However, unlike ML,– no recursion and unbounded iterationno recursion and unbounded iteration

– no high-order functionsno high-order functions

– no pattern matchingno pattern matching

– monomorphicmonomorphic

– no mutable stateno mutable state

The PLAN packetThe PLAN packet

program

Dest

Resbound

routFun

definition listbody

Remote ExecutionRemote Execution

• New packets are created via the PLAN-primitives:New packets are created via the PLAN-primitives:

– OnRemoteOnRemote(prog,(prog, dest, ResB, RoutFun)dest, ResB, RoutFun)

– OnNeighborOnNeighbor(prog, dest, ResB, ())(prog, dest, ResB, ())

• On creation a packet is sent to its destination to On creation a packet is sent to its destination to be evaluated.be evaluated.

• Each hop decreases the Resource bound of a Each hop decreases the Resource bound of a packet by one.packet by one.

• These primitives provide data-transport.These primitives provide data-transport.

fun print_host(h:host, count:int) : int =print(h); print(“:”); print(count); print(“ “ ); count+1

fun ack(l:host list): unit = foldr(print_host,l,1); print(“--\n”))

fun traceroute (source:host, dest:host,l:host list, count:int):unitlet val this:host = thisHost()in (OnRemote(ack(this::l),source, count, defaultRoute); if (this <> dest) then let val next:host = defaultRoute(dest)

in OnNeighbor(traceroute(source, dest, this::l,

count+1),next, getRB ())

end else ())

end

fun traceroute (source:host, dest:host, l:host list, count:int):unit

let val this:host = thisHost()in (OnRemote(ack(this::l),source, count, defaultRoute); if (this <> dest) then let val next:host = defaultRoute(dest) in OnNeighbor(traceroute(source, dest, this::l,

count+1), next, getRB, ())

end else ())

end

host application

A DCBhost router router router

traceroute

[ traceroute(A,D,[],1), A, n, DefaultRoute ]

host application

A DCBhost router router router

ack

traceroute

traceroute

out

host application

A DCBhost router router router

ack

ack

traceroutetraceroutetraceroute

out

host application

A DCBhost router router router

ack

ack ack

traceroutetraceroutetraceroutetraceroute

out

host application

A DCBhost router router router

ack

ack ackack

traceroutetraceroutetraceroutetraceroute

out

Delivery ProgramDelivery Program

fun transport(payload:blob, dest:port):unit =deliver (dest, payload)

The Service LevelThe Service Level

• Core services (Core services (thisHostthisHost, , printprint, , defaultRoutedefaultRoute).).

• Services may change the state of a Services may change the state of a router (need for authentication).router (need for authentication).

• Example: a dynamic routing protocol.Example: a dynamic routing protocol.

ImplementationImplementation

• Requirements:Requirements:– dynamic code loading anddynamic code loading and

– portabilityportability

• Implementations in Implementations in – O’Caml, Java, PizzaO’Caml, Java, Pizza

• Services are implemented in the same Services are implemented in the same language as the PLAN interpreterlanguage as the PLAN interpreter

Implementation (ctd)Implementation (ctd)

• Dynamic installation of services by Dynamic installation of services by passing bytecode to service passing bytecode to service installation routinesinstallation routines

• Dynamic type checkingDynamic type checking

Related WorkRelated Work

• Active networks: Softnet, AIN, Active Active networks: Softnet, AIN, Active BridgeBridge

• ANTS, Sprocket, TacomaANTS, Sprocket, Tacoma

• PLANETPLANET