Forwarding in a Content-Based Network SIGCOMM 2003 Antonio Carzaniga, Alexander L.Wolf 14 th...

26
Forwarding in a Forwarding in a Content-Based Content-Based Network Network SIGCOMM 2003 SIGCOMM 2003 Antonio Carzaniga, Alexander L.Wolf Antonio Carzaniga, Alexander L.Wolf 14 14 th th January, 2004 January, 2004 Presented by Sookhyun, Yang Presented by Sookhyun, Yang

Transcript of Forwarding in a Content-Based Network SIGCOMM 2003 Antonio Carzaniga, Alexander L.Wolf 14 th...

Forwarding in a Forwarding in a Content-Based NetworkContent-Based Network

SIGCOMM 2003SIGCOMM 2003

Antonio Carzaniga, Alexander L.WolfAntonio Carzaniga, Alexander L.Wolf

1414thth January, 2004 January, 2004Presented by Sookhyun, YangPresented by Sookhyun, Yang

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 22/26/26

ContentsContents

IntroductionIntroduction Content-Based NetworkingContent-Based Networking Content-Based Routing SchemeContent-Based Routing Scheme Problem StatementProblem Statement ContributionContribution Forwarding AlgorithmForwarding Algorithm EvaluationEvaluation ConclusionConclusion

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 33/26/26

IntroductionIntroduction Content-based networkContent-based network

Flow of messages is driven by the Flow of messages is driven by the contentcontent of the messages, not by the of the messages, not by the IP addressIP address

Sender simply publish messagesSender simply publish messages Receiver declare and advertise their interests by means of Receiver declare and advertise their interests by means of selection selection

predicatespredicates Service delivers to receivers each messages that Service delivers to receivers each messages that matches matches the selection the selection

predicates declared by those receiverspredicates declared by those receivers

Application-level overlay networkApplication-level overlay network consisting of consisting of client client nodes andnodes and router router nodesnodes

• Routers performRouters perform specialized specialized routing and forwarding functionsrouting and forwarding functions

[Content-based addressing scheme]

• M - the universe of messages• P: M {true, false} - the universe of predicates over M• predicate pn advertised by n - content-based address of node n• pn(m) = true – message is implicitly addressed by its content to node n

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 44/26/26

BackgroundBackground Reverse path forwarding (RPF) algorithmReverse path forwarding (RPF) algorithm

Transmit the packet on all of its outgoing links only if the packet arrived on the linTransmit the packet on all of its outgoing links only if the packet arrived on the link that is on its own shortest path back to the senderk that is on its own shortest path back to the sender

source

Not forwarded

forwarded

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 55/26/26

Content-Based NetworkingContent-Based Networking Practical refinement of definitionsPractical refinement of definitions

Concrete syntax and semantics embodied in the Concrete syntax and semantics embodied in the disjunctive normal formdisjunctive normal form of of Siena event notification service [7]Siena event notification service [7]

MessageMessage is a set of typed attributes is a set of typed attributes Attribute is uniquely identified within the message by a Attribute is uniquely identified within the message by a namename, and has a , and has a

typetype and a and a valuevalue

PredicatePredicate is a disjunction of conjunctions of constraints on the is a disjunction of conjunctions of constraints on the values of individual attributesvalues of individual attributes

[string carrier= UA; string dest=ORD; int price=300; bool upgradeable=true;]

[string dest=ORD Λ int price < 400]

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 66/26/26

Content-Based Routing scheme (1/4)Content-Based Routing scheme (1/4)

Content-based routingContent-based routing [8] [8] Start from a basis of a broadcast systemStart from a basis of a broadcast system PrunePrune branches of the broadcast distribution system using advertised branches of the broadcast distribution system using advertised

predicatespredicates Limit the propagation of each message to only those node that Limit the propagation of each message to only those node that

advertised predicates matching the messageadvertised predicates matching the message

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 77/26/26

Content-Based Routing scheme (2/4)Content-Based Routing scheme (2/4) Two types of routing protocolsTwo types of routing protocols

Broadcast routing protocolBroadcast routing protocol• Topological informationTopological information• Maintain the forwarding state that would be necessary to implement Maintain the forwarding state that would be necessary to implement

broadcast systembroadcast system Content-based routing protocolContent-based routing protocol

• Predicate advertised by nodesPredicate advertised by nodes• Maintain the forwarding state that decide (for each router interface) whether Maintain the forwarding state that decide (for each router interface) whether

a message matches the predicates advertised by any downstream nodea message matches the predicates advertised by any downstream node

Mechanisms Mechanisms for the propagation of routing informationfor the propagation of routing information PushPush based on receiver advertisements (RA) based on receiver advertisements (RA) Pull Pull based on sender requests (SR) and update replies (UR)based on sender requests (SR) and update replies (UR)

Sender Receiver

Push

Pull

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 88/26/26

Content-Based Routing scheme (3/4)Content-Based Routing scheme (3/4)

Receiver advertisements (RAs)Receiver advertisements (RAs) Issued by nodes periodically and/or when they advertise new content-baIssued by nodes periodically and/or when they advertise new content-ba

sed addressessed addresses Carry the Carry the content-based address (predicate)content-based address (predicate) and and identifier of its issueridentifier of its issuer PushPush routing information from the issuer (receiver) out to all the potential routing information from the issuer (receiver) out to all the potential

senderssenders

Propagation of RAPropagation of RA Follow the broadcast tree rooted at the issuer nodeFollow the broadcast tree rooted at the issuer node

• Sets up RPFs towards the issuerSets up RPFs towards the issuer PredicatePredicate advertised by an RA is advertised by an RA is combined in a disjunctioncombined in a disjunction to the predic to the predic

ate associated with the interface on the reverse path to the issuerate associated with the interface on the reverse path to the issuer If this combination generates a If this combination generates a new predicate for that interfacenew predicate for that interface, then the , then the

node continues the propagation of RAnode continues the propagation of RA Otherwise, the node simply stop propagating RAOtherwise, the node simply stop propagating RA

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 99/26/26

Content-Based Routing scheme (4/4)Content-Based Routing scheme (4/4)

Sender request (SR)Sender request (SR) RouterRouter uses a SR to collect routing information from other routers uses a SR to collect routing information from other routers PullPull content-based routing information from receivers back to senders content-based routing information from receivers back to senders

Flow of SR/URFlow of SR/UR Follow the broadcast tree rooted at the issuer (sender)Follow the broadcast tree rooted at the issuer (sender) Routers respond to SRs by generating Routers respond to SRs by generating update repliesupdate replies (URs) containing t (URs) containing t

heir content-based addressheir content-based address URs are returned back to the issuer of the SR, on the reverse path of thURs are returned back to the issuer of the SR, on the reverse path of th

e SR, combining e SR, combining content-based addressescontent-based addresses with URs along the way with URs along the way Issuer (sender) of the SR receives Issuer (sender) of the SR receives one UR per interfaceone UR per interface, each one carry, each one carry

ing the ing the combined content-based addresscombined content-based address of the nodes reachable throug of the nodes reachable through that interfaceh that interface

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1010/26/26

Problem StatementProblem Statement Propose a Propose a forwarding processforwarding process consisting of the combination of consisting of the combination of broadcast broadcast

forwardingforwarding and and content-based forwardingcontent-based forwarding Focus on the design of the Focus on the design of the content-based forwarding algorithmcontent-based forwarding algorithm

Assumption 1: Assumption 1: broadcast forwarding and routing functionbroadcast forwarding and routing function Output for message Output for message mm originating at a node originating at a node ss is a set of output interfaces is a set of output interfaces BB

Assumption 2: Assumption 2: Content-based routing functionContent-based routing function Maintain a Maintain a content-based forwarding tablecontent-based forwarding table Table represent a map between Table represent a map between interfacesinterfaces and and predicatespredicates

Contention-based forwarding function Contention-based forwarding function CBFCBF

CBF(m, B, T) = { i : i B ∈ Λ matches(pi, m)} m - message B - a set of broadcast output interfaces T - content-based forwarding table {p1, p2, … ,pI}

FastFast

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1111/26/26

ContributionContribution Use Use indexing data structureindexing data structure developed by Yan and Carcia-Molina [2 developed by Yan and Carcia-Molina [2

0]0] Enhance functionality of the Enhance functionality of the matching algorithmmatching algorithm Make it appropriate for use in the forwarding function of a content-bMake it appropriate for use in the forwarding function of a content-b

ased networkased network

Extensions of algorithmExtensions of algorithm Extend the set of types and operators in predicatesExtend the set of types and operators in predicates

• Prefix, suffix, and substring operators for stringsPrefix, suffix, and substring operators for strings Add the explicit expression of Add the explicit expression of disjunctionsdisjunctions to predicates to predicates Optimize using the construction of Optimize using the construction of selectivity tableselectivity table

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1212/26/26

BackgroundBackground Ternary search trie (TST)Ternary search trie (TST)

m

b e n

y o s

o

ya g

m e o

s

amasbebygomemynoso

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1313/26/26

Forwarding Algorithm (1/6)Forwarding Algorithm (1/6) Recall of definitionRecall of definition

Forwarding table is a one-to-one association of predicates to interfacesForwarding table is a one-to-one association of predicates to interfaces Predicate is a disjunction of conjunctions of elementary constraintsPredicate is a disjunction of conjunctions of elementary constraints Constraint is a quadruple Constraint is a quadruple <type, name, op, value><type, name, op, value> Forwarding a message Forwarding a message mm amounts to computing the set of interfaces amounts to computing the set of interfaces

associated with a predicate matching associated with a predicate matching mm

Counting algorithmCounting algorithm Founded on a particular Founded on a particular index structureindex structure representing the forwarding representing the forwarding

tabletable Matching problemMatching problem

filter

message

match

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1414/26/26

Forwarding Algorithm (2/6)Forwarding Algorithm (2/6) High level view of structure of forwarding tableHigh level view of structure of forwarding table

Left-hand side Right-hand side

attribute

constraint

Boolean

Conjunctionsof constraints

disjunctionsof filters

Need optimized lookup function!!!Need optimized lookup function!!!

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1515/26/26

Forwarding Algorithm (3/6)Forwarding Algorithm (3/6) Optimization 1 – “Extended counting algorithm”Optimization 1 – “Extended counting algorithm”

Disjunction of filtersDisjunction of filters• Eliminate a lookup in the table of counters for all the filters linked to interface Eliminate a lookup in the table of counters for all the filters linked to interface

that has already been matchedthat has already been matched TerminationTermination

• Set of matched interfaces = complete set of neighbor interfacesSet of matched interfaces = complete set of neighbor interfaces

For a given message m,for each attribute a in m{

find constraints matched by afor each constraint c in a{

find the matched filter f}when (counter_filter == total # of constraints of f)

add interface to set of matched interfaces}

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1616/26/26

Forwarding Algorithm (4/6)Forwarding Algorithm (4/6) Optimization 2 – “Multi-Operator Index”Optimization 2 – “Multi-Operator Index”

Speed up the process of finding the constraintSpeed up the process of finding the constraint Combine TST (Ternary Search Trie) for attribute name and a simple switch on thCombine TST (Ternary Search Trie) for attribute name and a simple switch on th

e typee typeAttribute name and type

Attribute name and type

Multi-operator indexprefix, suffix, substring op for strings

<Integer constraint indexing>

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1717/26/26

Forwarding Algorithm (5/6)Forwarding Algorithm (5/6) Optimization 2 – “Multi-Operator Index” (cont’d)Optimization 2 – “Multi-Operator Index” (cont’d)

Extended TST (Ternary search trie)Extended TST (Ternary search trie)• Capability of matching Capability of matching partial stringspartial strings (prefix and substring constraints) (prefix and substring constraints)

• Pair of “Pair of “crowncrown” lists linking the sequence of >, < constraints as leaves in TST” lists linking the sequence of >, < constraints as leaves in TST

• Pair of Pair of backtrackbacktrack functions moving from partial to alphabetically closest complete matc functions moving from partial to alphabetically closest complete match (use to jump to the >, < chains)h (use to jump to the >, < chains)

Lookup functionLookup function Start from the first character of the input stringStart from the first character of the input string When partial-match node is reached, return prefix constraint and/or the substring When partial-match node is reached, return prefix constraint and/or the substring

constraintconstraint If final node touched is #, return the corresponding =, >, <, and suffix constraintsIf final node touched is #, return the corresponding =, >, <, and suffix constraints If final node touched is not a leaf, backtracks to the two closest leaf nodes, one pIf final node touched is not a leaf, backtracks to the two closest leaf nodes, one p

receding and the other following the final node in alphabetical orderreceding and the other following the final node in alphabetical order Jump onto <, > chains from matching final node or closest matching nodesJump onto <, > chains from matching final node or closest matching nodes Repeat for each character of the input stringRepeat for each character of the input string Complexity of complete lookup function = Complexity of complete lookup function = O( l(logN + l) + |result|)O( l(logN + l) + |result|)

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1818/26/26

zz pf

ss

<

sf

=

>

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 1919/26/26

Forwarding Algorithm (6/6)Forwarding Algorithm (6/6) Optimization 3 – “Exploiting attribute selectivity”Optimization 3 – “Exploiting attribute selectivity”

Eliminate interfaces from consideration as soon as possibleEliminate interfaces from consideration as soon as possible Determinant attributeDeterminant attribute

• Every filter of interface Every filter of interface II contains at least one constraint on determinant contains at least one constraint on determinant attributeattribute

• If a message does not contain a determinant attribute of interface If a message does not contain a determinant attribute of interface II, interface , interface II can be ignored during the processing of the message can be ignored during the processing of the message

Selectivity tableSelectivity table• Map that associates Map that associates determinant attributedeterminant attribute with the with the interfacesinterfaces• Compute theCompute the intersection intersection of attribute names of all filters for each interfaceof attribute names of all filters for each interface• Sort in descending order by the cardinality of the set of excluded interfacesSort in descending order by the cardinality of the set of excluded interfaces

Pre-processing functionPre-processing function• Use selectivity table to calculate excluded set of interfaces that will not Use selectivity table to calculate excluded set of interfaces that will not

match the messagesmatch the messages• Parameterize pre-processing function by { Parameterize pre-processing function by { # of pre-processing rounds# of pre-processing rounds}}

Round – how far down the selectivity table pre-processing function will traverseRound – how far down the selectivity table pre-processing function will traverse

I1I1 priceprice

I2I2

I3I3 stockstock

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 2020/26/26

Evaluation (1/6)Evaluation (1/6) Experiments are intended to provide an initial exploration of the paExperiments are intended to provide an initial exploration of the pa

rameter spacerameter space Experimental setupExperimental setup

Algorithm in C++Algorithm in C++ 950MHz computer with 512Mb of main memory950MHz computer with 512Mb of main memory Auxiliary programs for generating loads of filters and messagesAuxiliary programs for generating loads of filters and messages 100 messages, each one between 1 and 19 attributes (avg = 10)100 messages, each one between 1 and 19 attributes (avg = 10)

Experimental parameterExperimental parameter ScalabilityScalability

• Total number of constraints Total number of constraints C ≈ I f c (I: interface, f : filter, c: constrainⅹ ⅹC ≈ I f c (I: interface, f : filter, c: constrainⅹ ⅹt)t)

• Up to five million constraintsUp to five million constraints Attribute and constraint nameAttribute and constraint name

• Set of 1000 elementsSet of 1000 elements• Select random words out of a common dictionary using a Zipf distributionSelect random words out of a common dictionary using a Zipf distribution

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 2121/26/26

Evaluation (2/6)Evaluation (2/6)

Experimental parameter (cont’d)Experimental parameter (cont’d) Attribute and constraint valueAttribute and constraint value

• Combination of dictionary values for strings and a range for integersCombination of dictionary values for strings and a range for integers

• 1000 words, 100 integers1000 words, 100 integers

• Uniform distribution for selecting valuesUniform distribution for selecting values Attribute and constraint typeAttribute and constraint type

• 50% strings and 50% integers50% strings and 50% integers

• Operators in integer constraints: 60% (equality), 20% (less-than), Operators in integer constraints: 60% (equality), 20% (less-than), 20% (greater-than)20% (greater-than)

• Operators in string constraints: 35% (equality), 15% (prefix), 15% Operators in string constraints: 35% (equality), 15% (prefix), 15% (substring), 10% (less-than), 10% (greater-than)(substring), 10% (less-than), 10% (greater-than)

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 2222/26/26

Evaluation (3/6)Evaluation (3/6)

Basic resultsBasic results

Pre-processing roundReduction of matching time up to 40%Reduction of matching time up to 40%

Centralized ArchitectureCentralized Architecture

One filter per interface<-worst case

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 2323/26/26

Evaluation (4/6)Evaluation (4/6)

Basic results (cont’d)Basic results (cont’d)

Distributed ArchitectureDistributed Architecture

Fixed number of interfaces=> More closely modeling

High ratio of filtersper interface

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 2424/26/26

Evaluation (5/6)Evaluation (5/6)

Basic results (cont’d)Basic results (cont’d)

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 2525/26/26

Evaluation (6/6)Evaluation (6/6) Sensitivity to the number of pre-processing roundsSensitivity to the number of pre-processing rounds

Performance gain oversimple counting algorithm

Computer Network LabComputer Network Lab LAB Seminar 2004LAB Seminar 2004 2626/26/26

ConclusionConclusion In this paperIn this paper

Present the first algorithm designed specifically for the implementation Present the first algorithm designed specifically for the implementation of the forwarding function of routers in a content-based networkof the forwarding function of routers in a content-based network

Refine, adapt, and extend earlier work in the area of centralized content Refine, adapt, and extend earlier work in the area of centralized content filteringfiltering

Formulate a variant of the counting algorithm that can handle disjunctive Formulate a variant of the counting algorithm that can handle disjunctive predicatespredicates

Develop optimization targeted specifically at the disjunctions that are the Develop optimization targeted specifically at the disjunctions that are the semantics of network interfaces in a content-based networksemantics of network interfaces in a content-based network