PROTOTYPES

58
PROTOTYPES T-110.6120 17.11.2011 Jimmy Kjällman Ericsson Research, NomadicLab

description

PROTOTYPES. T- 110.6120 17.11.2011 Jimmy Kjällman Ericsson Research, NomadicLab. Prototypes. Two research prototypes will be described in this presentation Blackadder Developed in PURSUIT Channel-oriented base implementation Demonstrated at the end of the lecture Blackhawk - PowerPoint PPT Presentation

Transcript of PROTOTYPES

PURSUIT Prototypes

PROTOTYPEST-110.612017.11.2011

Jimmy KjllmanEricsson Research, NomadicLab 2010-11-02 1PrototypesTwo research prototypes will be described in this presentation

BlackadderDeveloped in PURSUITChannel-oriented base implementationDemonstrated at the end of the lecture

BlackhawkOriginates from PSIRPDocument-oriented implementation

2010-11-02 2Original slides:George Parisis, Computer Laboratory, University of Cambridge, 2011BLACKADDERBlackadderRealizes PURSUITs functional modelfor information-centric networking

RendezvousTopologyForwardingPub/Sub Service ModelSIdRIdRIdFunctional scopingInformation scopingDisseminationStrategyRecursionInformation StructureScopes, subscopes, information items

Information is structured as a directed acyclic graphIDs are (statistically) unique within a scope(Possibly) self-generated, flat labelsSame ID space for both subscopes and information itemsComplete identifier: Prefix + IDOne or more paths starting from one or more graphs root(s)Information Structure000100030001000100020001000100020003AAA0AAA1AAA20002AAA1ScopeInformationitemAAA2Information ID : /0003/0002/AAA2Scope ID : /0001/0001/0001, /0002/0001/0001, /0003/0001/0001 00020001000200030001000100010002Core FunctionsSimplified exampleRendezvousTopologyForwardingPSDissemination StrategiesDefines the methods used for implementation (of a scope)Architectural componentsData formatsGovernance structuresEtc.Can be overridden for sub-items if permittedStrategies have to be alignedUsually engineered at design time

Larger problem solutions through the assembly of smaller onesService ModelPublish/Subscribe

For example:publish_scope(id, prefix, strategy)publish_info (id, prefix, strategy) unpublish_scope(id, prefix, strategy)unpublish_info (id, prefix, strategy) subscribe_scope(id, prefix, strategy)subscribe_info (id, prefix, strategy) unsubscribe_scope(id, prefix, strategy)unsubscribe_info (id, prefix, strategy)publish_data(id, strategy, data, data_len)getEvent(&event)

Blackadder ArchitectureClick is an external framework that Blackadder uses

TopologyManagerBackground Information:The Click Modular RouterOpen source platform for building packet processing configurations that consist of connected elementsLanguage for describing router configurationsReady-made elementsLibraries for creating new elements as C++ classesPortable codeKernel and userlevelLinux, FreeBSD, Mac OS X, etc.Modular design approachReuse of elements in different configurations(e.g., in different prototypes or experiments)Basic operation: packets are pushed or pulled between elementsClick Router ConfigurationExample: Ping(nothing to do with Blackadder,just illustrates a Click router)

define($DEV eth0, $DADDR 8.8.8.8, $GW $DEV:gw)

FromDevice($DEV, SNIFFER false)-> c :: Classifier(12/0800, 12/0806 20/0002)-> CheckIPHeader(14)-> ip :: IPClassifier(icmp echo-reply)-> ping :: ICMPPingSource($DEV, $DADDR)-> SetIPAddress($GW)-> arpq :: ARPQuerier($DEV)-> IPPrint-> q :: Queue-> ToDevice($DEV);arpq[1]-> q;c[1]-> [1] arpq;Blackadder Architecture

TopologyManagerIPC ElementImplements a Netlink socket for receiving pub/sub requests from applications (or an API library) and for sending back pub/sub events and published dataThese are sent as messages through the socketIn user space, the IPC element utilizes the selection mechanism provided by ClickIn kernel space, the element receives sk_buffs in the context of the running process buffers are wrapped into Click packets that are later processed by a Click taskEverything is asynchronous like an event-based system

API (Service Model):Functions and Messagespublish_scope(id, prefix, strategy)publish_info (id, prefix, strategy) unpublish_scope(id, prefix, strategy)unpublish_info (id, prefix, strategy) subscribe_scope(id, prefix, strategy)subscribe_info (id, prefix, strategy) unsubscribe_scope(id, prefix, strategy)unsubscribe_info (id, prefix, strategy)

publish_data(id, strategy, data, data_len)

(These messages are only used node-internally)

API: EventsStart Publishing, Stop PublishingNew Scope, Deleted Scope

Published Data

Blackadder Architecture

TopologyManagerAccessing the networkStandard Click elements for network communicationToDevice and FromDevice for directly sending and receiving Ethernet framesSuitable, e.g., when experimenting over high-speed LANsRawSocket for sending and receiving IP (UDP) packets over raw socketsSuitable, e.g., when experimenting in the PlanetLab testbed or VPNsIP network used as an underlay

Network Packet Format

Blackadder Architecture

TopologyManagerForwardingReceives packets from the network communication elementsMatches the FID with all outgoing links and forwards the packetsA separate LID is assigned to the internal link between the Forwarding element and the Local Proxy ElementImplements the notion of destination

Sample forwarding configurationsClick configurations can be auto-generated

Forwarder (MAC, 1,1, 08:00:00:00:00:01, 08:00:00:00:00:11, 10000000000000000000000000000000000000000000000000000000000000001, 08:00:00:00:00:02, 08:00:00:00:00:12, 10000010000000000000000000000000000000000000000000000000000000002, 08:00:00:00:00:03, 08:00:00:00:00:13, 1000001000000000001000000000000000000000000000000000000000000000);

fw[1] -> Queue(1000) -> ToDevice(eth0);fw[2] -> Queue(1000) -> ToDevice(eth1);

FromDevice(eth0, SNIFFER false) -> Classifier(12/080a)[0] -> [1]fw;FromDevice(eth1, SNIFFER false) -> Classifier(12/080a)[0] -> [2]fw;

Forwarder (IP, 1,1, 192.168.0.1, 192.168.0.2, 10000000000000000000000000000000000000000000000000000000000000001, 192.168.0.1, 192.168.0.6, 10000010000000000000000000000000000000000000000000000000000000002, 192.168.1.1, 192.168.1.2, 1000001000000000001000000000000000000000000000000000000000000000);

fw[1] -> Queue(1000) -> RawSocket(UDP) -> IPClassifier(dst udp port 9999)[0] -> [1]fw;fw[2] -> Queue(1000) -> RawSocket(UDP) -> IPClassifier(dst udp port 9999)[0] -> [2]fw;

Blackadder Architecture

TopologyManagerLocal ProxyThe heart of a network node everything goes through itReceives all pub/sub requests from applications and other Click elementsKeeps track ofPending subscriptionsAdvertised information items (and assigns FIDs)ReceivesPublished data and notifications about new or deleted scopesPushes packets to subscribers (applications or Click elements)Notifications to start or stop publishing dataPushes packets to one (of the potentially many) publishers

Local ProxyApplications are identified by the local Blackadder node by their Netlink source address (usually the process ID)Click elements are identified by the outgoing port number (from the Local Proxy to the specific element)These IDs are replaced in all pub/sub requests by a statistically unique Node Label (e.g., hash of MAC address)

Blackadder Architecture

TopologyManagerRV FunctionThe same element runs in all nodesEvery node can create an information structure that will be known and maintained by the local RV functionOther nodes can send pub/sub requests to that node if they know a path to itUsual scenariosA network node (its RV function) maintains a local structure for IPC (node-local strategy)A network node (its RV function) maintains a structure accessible by physical neighbours (link-local strategy)One or more dedicated RV nodes run in a domain end hosts know how to reach them (domain-local scenario)RV IPCThe RV Element access the world the same way applications doIt subscribes to root scope FFFF where all pub/sub requests are publishedIt publishes Topology Formation requests to scope FFFE to which the TM has subscribedTopology formation is required when:A set of publishers need to be notified with Forwarding IDs that point to a set of subscribersA set of subscribers need to be notified about a new or deleted scopeBlackadder Architecture

TopologyManagerThe Topology ManagerAn applicationCalculates shortest paths in a network Forwarding informationUses (e.g.) the igraph library for thisHow the TM does IPCSubscribes locally to scope FFFEReceives requests from the RV node as publicationsPublishes responses directly to publishers and subscribers using the Information ID /FFFD/destinationNodeIDUtilizes an implicit rendezvous dissemination strategy where information is published with a specific FIDBlackadder Architecture

TopologyManagerDissemination StrategiesCurrently 5 strategies are implementedThese strategies are used for choosing the scope of information visibility in a network

Node-localIPCLink-localA node can create information graphs a) locally accessible to physical neighboursb) remotely accessible to this nodeLink IDs are provided by applications

Dissemination StrategiesIntra-domainEnd-hosts use an FID to a dedicated RV to create information graphs and to subscribe to scopes and information itemsPublishers assign FIDs (to subscribers) to individual information items

Subscribe locallyDo not send anything to any RVImplicit rendezvousPublish the data immediately using the provided FIDA Blackadder NetworkAll network nodes run the same softwareBlackadder runs in user space or kernel space in the nodesConfigurations can be differentEnd-nodes are configured to have link access (LID) and access to dedicated rendezvous (RV) nodes (with an FID)Dedicated forwarding nodes run only the forwarding elementAnd other elements if additional functionality is required(e.g. caching)Dedicated RV and TM nodesAny nodes can be RV nodes an FID is required to reach themTM nodes run a Topology Manager (TM) applicationA deployment tool can be used for generating configuration files and deploying them in a networkNetwork attachment component for dynamic settingsSimple API ExamplePublisher

ba = Blackadder(True) ba.publish_scope(sid, , DOMAIN_LOCAL, None)ba.publish_info(rid, sid, DOMAIN_LOCAL, None) ev = Event(); ev.type = 0while ev.type != START_PUBLISH: ba.getEvent(ev) pass

while True: data = raw_input() ba.publish_data(sid+rid, DOMAIN_LOCAL, None, data, len(data))

(This example uses a Python API that is wrapped on top of a C++ API library that translates API calls to messages that are passed through IPC sockets.)

Subscriber

ba = Blackadder(True)

ba.subscribe_info(rid, sid, DOMAIN_LOCAL, None) ev = Event()

while True: ba.getEvent(ev) if ev.type == PUBLISHED_DATA: print ev.data[:ev.data_len]

Blackadder availabilityOpen source (GPLv2 / BSD)

Code, documentation, etc.http://www.fp7-pursuit.eu/https://github.com/georgeparisis/blackadder

Current release: v0.2beta (in GitHub)

BLACKHAWK

BlackhawkPub/Sub prototype that implements the core ideas from PSIRPBlackboard-based architectureIntegrated with the OS kernelE.g., virtual memory managementObjectives: efficiency, natural interface, object deduplication, etc.Works in FreeBSD

Publications as Memory ObjectsA publication is an object in the blackboard i.e.,in the computers memoryA (concept) publication is identified by a RIdA version is a specific piece of data identified by a vRIdversion-RId: hash tree rootA page is a block of data identified by a pRIdpage-RId: hash of content

Sub-object relationshipsConcept publications can have several different versionsVersions have a specific set of pages in a specific order

Scopes are special publications that are identified by SIds and store collections of RIdsBlackboard: ObjectsPublicationA piece of contentRelated metadataIdentifiers, size, type,

Objects have their own identifiersE.g. 256 bits; an opaque or a hierarchical structureCould be tied to the data and/or an entitySingle global identifier space assumed (by default)

ScopeCollection of data publications (their IDs)Information aggregation,access controlDataPlaceholder for a concept, i.e.,mutable contentVersionImmutable instance of a data publicationPageA chunk of actual data(e.g. in the OS kernel or in network packets)E.g., 4096 bytes

Object HierarchyScope 0Scope 2Scope 1Pub 1Pub 4Pub 2Pub 3Version 3Version 1Root ScopeSubscopesPublicationsVersion 2Version 4Version 5VersionsPage 1Page 2Page 3Page 4Page 5Page 6Page 7...PagesPage 8Page 9Page 10Page 11...Page 12Pub/Sub API: OperationsCreateCreate a piece of content to be publishedI.e., allocate virtual memory objects fordata and metadataPublishMake content available to othersResults in a new versionSubscribeRequest and get contentRegister, ListenGet notified about publication events(e.g., when a new version appears)Conceptual APIhandle := create(size)

publish(sid, rid, handle)

handle := subscribe(sid, rid)

events := listen(handles[])pointers to data and metadataof a memory objectidentifies a scopeidentifies a publicationSystem Overview(PSIRP Integrated Prototype)User space:normal applicationsspecial helper appsAPI library

Kernel space (module)system call interfacefile system interfacelink-layer networking aidspublication repository (blackboard) kernel space user spaceRVSnodeTM serverscope helper,RVS clientnetwork I/O,forwardingpub/sub libraryvirtual memorysystemTM clientblackboardpub/subkernel modulefile systemsocket systemSystem ArchitectureRZVnodeKernel-level ClickBlackboardUserlevel Click

Data publisherRZVclientpub/sub APIData subscriberfsRZVifForwardersocketKernelinterfaceUserlevel interfaceTMNetwork devicesBlackboardBlackboard*

System call interfaceVirtual memory systemKernel-levelinterfaceFile system

KerneleventsInternal data structuresFile system,keventsPub/Sub API libraryPub/Sub applicationsVM System IntegrationMotivation:We want to achieve efficiency, a natural interface and object deduplication

Existing FreeBSD VM system data structures utilized:vm_page_tvm_object_tvm_map_t, vm_map_entry_t...

In our system, for each publication, we have a VM object for metadata and dataVM System IntegrationMetadata objectOne page (currently)Objects own ID, its size, etc.List of sub-object IDsPub: versionsVersion: pages

Data objectPages contain actual content

VM System IntegrationMetadata and data objects mapped to applications memory spaces (when created or subscribed to)Data is copy-on-writeCan be modifiedresults in a new shadow objectunmodified pages shared dont need to be copiedRe-publishing results in a new version that can be subscribed to1 ......2 ......File System IntegrationEach publication has a corresponding vnode in the kernelApplications get an open file descriptor in the handleAfter publish or in subscribeEnables the use of keventsWe use it to get notifications when somebody publishes (or subscribes to) somethingFile System IntegrationA new file system type, psfs

File system view to the blackboardE.g.: /pubsub/sid/rid/vrid/prid/dataData/metadata can be accessed ondifferent levels in the object hierarchyIn theory, we can also map file systemops to pub/sub ops

Could be used for enabling demand paging over the network as wellTogether with a pull-based caching-enabled transport protocol

/pubsub/sid1/sid2/rid1datameta/vrid1...In-kernel RendezvousPublication Index (pubi)Each scope, data publication and version (and page) has this small additional data structure for auxiliary in-kernel metadataHolds pointers to metadata and data VM objects and a vnode,filesystem-related information, etc.

Publication Index Table (PIT)UMA zone-based storageHash table with ID pubi mappingsAll identifers are accessible on the same hierarchical levelUsed for (recursive) object lookups in the blackboardID pubi metadata and/or data sub-obj. ID In-kernel RendezvousID, size,sub-object count, etc.Sub-object IDs......PublicationIndex (pubi)MetadataPagePIT pagesPointer tometadataID pubi entry

Networking: Basic ProtocolPRSSubscriber set update (MD SUB)Version metadataData subscriptionDataRCRCRNPublishSubscribeRendezvousRCRCDPDSDSUserlevel interfaceData publisherData subscriberDATA SUB (own)ForwarderDATA SUBDATA SUB(own)Network devicesRZV, MDRZV, MDKernel interfaceRZVifRZV clientRZV nodeMDMD SUBRZV,MD,DATASUBRZVBlack-boardDATAPUBDATAPUBOutbound packetsInbound packetsProcess interactions(pub/sub)TMUserlevelKernelAPINative C API: the libpsirp pub/sub library

Wrappers for Python and RubyGenerated with SWIG and additional C andPython/Ruby codeThe API for Python is object-orientedC APIHeader#include libpsirp.hTypesIdentifiers: psirp_id_t (array)Handle: psirp_pub_t (pointer)Primitivespsirp_create(), psirp_subscribe(), psirp_subscribe_sync(), psirp_publish(), psirp_free()Accessorsfor data, length, identifiers, fd, psirp_pub_data(psirp_pub_t pub), psirp_pub_data_len(psirp_pub_t pub), Eventspsirp_kq_tor standard kqueue() and kevent() callsVery Simple API Example#include

void pubsub(psirp_id_t *sid, psirp_id_t *rid) { psirp_pub_t pub; psirp_subscribe(sid, rid, &pub, 0x0) != 0); uint8_t data = psirp_pub_data(pub); data[0] = a; data[1] = b; psirp_publish(sid, rid, pub, 0x0);

psirp_free(pub);}

BlackhawkOpen source (GPLv2 / BSD)

Documentation, source code, VM images, etc.http://www.psirp.orghttp://code.psirp.orghttp://users.piuha.net/blackhawk/

Current release: v0.3 in this presentation we described a more developed versionSummaryTwo information-centric pub/sub prototypesDifferent approachesChannel vs DocumentNot presented: Algorithmic IDsBlackadder implements PURSUITs functional modelBlackhawk implements PSIRPs memory object modelSimilar APIs, similar architectural componentsOngoing work: Integration

BLACKADDER DEMOClick

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

Click

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

ID

Prefix ID length

LIPSIN Identifier

Type

ID length

Strategy

ID length

1

1

Variable length

Variable length

1

1

LID size

ID

Data

LIPSIN Identifier

Type

ID length

Strategy

1

1

Variable length

1

LID size

ID

Type

ID length

1

1

Variable length

ID

Type

ID length

1

1

Variable length

Data

Click

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

LIPSIN Identifier

LID size

No. IDs

ID1 length

Click

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

Click

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

Click

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

Click

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

Click

IPC Element

Communication Elements

/dev/eth0

/dev/eth1

App1

App2

App3

App4

AppN

...

Rendezvous

Forwarding

Local Proxy

Raw IP Sockets

Publication typeIdentifierMetadataData

ScopeSIDVRIDsRIDs in scope

Concept (Data)RIDVRIDsNewest version

VersionVRIDPRIDsImmutable data

PagePRID-Immutable page