taps-related topics from the neat project - ietf · taps-related topics from the neat project naeem...

19
TAPS-related topics from the NEAT project Naeem Khademi TAPS WG - IETF 98 Chicago- USA 28 March 2017

Upload: truongkien

Post on 12-May-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

TAPS-relatedtopicsfromtheNEATproject

NaeemKhademiTAPSWG-IETF98

Chicago-USA28March2017

Introduc;ononNEAT§  NEATprojecthasbeenongoingsinceMarch2015

§  NEATlibrarybuildsaTAPS-likeprototypesystem

-  Protocol-andplaLorm-independent-  Opensource,BSDLicensed(3clause),implementedinC-  CurrentlysupportsFreeBSD,Linux(Ubuntu),MacOSX,andNetBSD-  Event-based(usingcallbacks),libuv-based-  MostcorecomponentsareinplacebutsXllwork-in-progress

§  TheNEATAPIwasfirstpresented

atIETF95(BuenosAires)

§  NEATUserAPIbasedondra[-ieL-taps-transports-usageandNEATinternaluse-cases

2

KeyFeatures

§  APIproper;es

§  NEATPolicysystem

§  Simpler/flexiblecodingwiththeNEATUserAPI

§  ApplicaXonfeedback(HappyApps)

3

Applica;onproper;esinNEAT§  NEATgivesusersachancetocontrolas

muchastheywant,yetallowautoma;za;on

§  Itusesakey/value-basedpropertysysteminJSONformat–  Theycanhavedifferenttypesandmetadata

abachedtothem,e.g.precedence–  cansetmulXple/allproperXeswithoneAPI

call

§  ProperXesaregiven“precedence”--e.g.1=desired;2=required1)  Desired:tryandfallbackifunsuccessful2)  Required:failifunsuccessful

{ "transport": [ { "value": "SCTP", "precedence": 1 }, { "value": "TCP", "precedence": 1 } ]}

{ "property_name": { value: "property_value", precedence: 1 }}

neat_set_property(ctx, flow, properties);

4

KeyFeatures

§  APIproperXes

§  NEATPolicysystem

§  Simpler/flexiblecodingwiththeNEATUserAPI

§  ApplicaXonfeedback(HappyApps)

5

NEATPolicySystem(#1)

6

ConnectionSelection

(async access)

REST A

PI

Polic

y M

an

ager

Profiles

CharacteriticsInformation

Base

Applic

ati

on

request

pro

pert

ies

2. MatchedCIB

candidates

1. Updatedrequest

properties

3. Updated PIB

candidates

Policies

Connection handle

PolicyInformation

Base

4. Ranked candidates

NEATPolicycomponentsandtheirinteracXons

NEAT’sselecXonofprotocolsandparameterizaXonisbasedon:①  Configuredpolicies(PIBlookup)②  TestedcapabiliXes(HappyEyeballs)③  KnownandlearnedcapabiliXes(CIBlookup)

NEATPolicySystem(#2)§  NEATprovidesaflexiblewayfordefining

policies;alsoallowsforcrea;onofprofilesdependingonthenetworkingscenario

§  Policies:basedonNEATproperXeswith

prioriXesamongthemselves,inJSONformat;setbytheuser,systemadministratorordeveloper

§  Profiles:arepoliciesappliedbeforeCIBlookup;match(high-level)propertyintherequestisreplacedwiththeassociatedprofile(low-level)properXes

§  PoliciesandprofilesarestoredinPolicyInformaXonBase(PIB)

{ "name": "Low latency", "match": { "low_latency": { "precedence": 1, "value": true } }, "properties": { "interface_latency": { "precedence": 2, "value": [0,40] }, "is_wired": { "precedence": 1, "value": true } }}

Anexampleofprofile7

KeyFeatures

§  APIproperXes

§  NEATPolicysystem

§  Simpler/flexiblecodingwiththeNEATUserAPI

§  ApplicaXonfeedback(HappyApps)

8

Simpler/flexiblecodingwiththeNEATUserAPI§  BuiltinNEAT:manycommonnetworkprogrammingtaskslikeaddress

resoluXon,buffermanagement,encrypXon,connecXonestablishmentandhandling

§  AddressresoluXonandconnecXonestablishmentwithasinglefuncXoncall

§  Example#1:Establishingalisteningsocket(42SLoCwithNEATAPIvs59SLoCwithsocketAPI)

§  Example#2:weportedNghbp2(aHTTP/2implementaXon)webserver/clientandafewothersmallerhbp/hbps-basedclientstouseNEAT§  InteroperablewithTCP§  CanbenefitfromusingSCTP

neat_open(ctx, flow, "bsd10.fh-muenster.de", 80, NULL, 0);

~20%reduc;onincodelines

9

KeyFeatures

§  APIproperXes

§  NEATPolicysystem

§  Simpler/flexiblecodingwiththeNEATUserAPI

§  Applica;onfeedback(HappyApps)

10

Applica;onfeedback(HappyApps)(#1)

§  HappyApps:offersselecXonmechanismswhentheunderlyingtransportprotocoldoesnotprovidethesignalsrequired--e.g.QoSfallbackwithUDP(-Lite)

§  NetworkQoS:o[enlimitedtocontrollednetworkenvironmentduetolackofhigh-levelAPI

§  Keychallenge:howtoexpressservicerequirements,whilesXllenablingpolicytoinfluencechoiceandprovidingflexibilitywhenthenetworkisunabletodirectlysaXsfytherequirements

§  WithNEAT:canuseuserrequirements,policy,anddynamicinfocollectedfromotherconnecXonstodriveanappropriateDSCPcode-point

11

Applica;onfeedback(HappyApps)(#2)

Example:wedevelopedneat-streamerbasedonGstreamer(pipeline-basedmedialibraryforaudio/video)

12

MajorupdatessinceIETF95(#1)§  Mul;-streaming:transparentuseofSCTPmulX-streaming

(compile-XmeopXon)

§  Flow-levelpriority:APIsupportforflowgroup(local)prioriXestoleverage:-  Coupled-CCwithTCPbasedondra[-welzl-tcp-ccc-00-  StreamschedulingwithSCTP(WiP)

§  “transportprotocol”HEmechanism:improvementsinthecode

-  IncludinginvesXgaXonoftransportHE’scost(presentedinTAPS,IETF96)-  UsesprioriXesamong“candidatetransportsoluXons”withafixeddelay-  NEATtransport-levelHEisexplainedindra[-grinnemo-taps-he-02

13

MajorupdatessinceIETF95(#2)§  DatagramsupportfortheAPI(UDP,UDP-Lite)

§  SupportforSCTP,SCTP/UDP(bothinkernelanduserland)

§  Server-sidesupport(listeningonmulXpleprotocols)

§  Mul;-homingsupport(withSTCP)

§  Mul;pathsupport(withMPTCP)(unmerged)

§  Security(TLS/TCP;DTLS/UDPandongoingworkonDTLS/SCTP)

§  Lotsofimprovements,debuggingsandcodingopXmizaXons!

14

Q&A

NEATEUproject:hbps://www.neat-project.orgGithubRepository:hbps://github.com/NEAT-project/neatAPIdocumenta;onandtutorial:hbp://neat.readthedocs.io/en/latestAlsotoappearinIEEECommunicaXonsMagazine,June2017

Comments,feedback,patches,testresults,sugges?onsontargetappsarewelcome!

15

N.Khademi,D.Ros,M.Welzl,Z.Bozakov,A.Brunstrom,G.Fairhurst,K.-J.Grinnemo,D.Hayes,P.HurXg,T.Jones,S.Mangiante,M.Tüxen,andF.Weinrank.“NEAT:APla+orm-andProtocol-IndependentInternetTransportAPI”.IEEECommunicaXonsMagazine,acceptedforpublicaXon,March2017.

NEATWorkflow1. Request to open flow & pass application requirements

2. Query PM about feasible transport candidates basedon destination domain name

3. PM determines available transport candidates that fulfilpolicy (PIB) and cached information (CIB)

4. Return ranked list of feasible transport candidates aspre-filter for address resolution

5. Resolve addresses

6. Query PM about feasible transport candidates forresolved destination address

7. PM builds candidates, assigning priorities based onPIB/CIB matches

8. Return ranked list of feasible transport candidates forflow establishment

9. Do Happy Eyeballs with candidates, according tospecified priorities

10. Return handle to selected transport solution

11. Cache results from Happy Eyeballs in the CIB

Policy

Application

NEAT User API

Policy Manager

CIB

PIB

FrameworkSelection

1

1

2

3

3

4

5

6

7

8

9

11

11

10

10

7

Source:N.Khademi,D.Ros,M.Welzl,Z.Bozakov,A.Brunstrom,G.Fairhurst,K.-J.Grinnemo,D.Hayes,P.HurXg,T.Jones,S.Mangiante,M.Tüxen,andF.Weinrank.“NEAT:APlaGorm-andProtocol-IndependentInternetTransportAPI”.IEEECommunicaXonsMagazine,acceptedforpublicaXon,March2017.

16

ASimpleClientusingtheNEATAPI(#1)static char *properties = "{\"transport\": {\"value\": \"reliable\", \"precedence\": 2}}";

int main(void) { struct neat_ctx *ctx; struct neat_flow *flow; struct neat_flow_operations ops;

ctx = neat_init_ctx(); flow = neat_new_flow(ctx); memset(&ops, 0, sizeof(ops)); ops.on_connected = on_connected; neat_set_operations(ctx, flow, &ops); neat_set_property(ctx, flow, properties); neat_open(ctx, flow, "bsd10.fh-muenster.de", 5000, NULL, 0); neat_start_event_loop(ctx, NEAT_RUN_DEFAULT); neat_free_ctx(ctx); return EXIT_SUCCESS;}

17

ASimpleClientusingtheNEATAPI(#2)

static neat_error_code on_connected(struct neat_flow_operations *ops) { ops->on_writable = on_writable; ops->on_all_written = on_all_written; neat_set_operations(ops->ctx, ops->flow, ops); return NEAT_OK;}

static neat_error_code on_writable(struct neat_flow_operations *ops) { neat_write(ops->ctx, ops->flow, "Hi!", 3, NULL, 0); return NEAT_OK;}

static neat_error_code on_all_written(struct neat_flow_operations *ops) { ops->on_readable = on_readable; ops->on_writable = NULL; neat_set_operations(ops->ctx, ops->flow, ops); return NEAT_OK;}

18

ASimpleClientusingtheNEATAPI(#3)

static neat_error_code on_readable(struct neat_flow_operations *ops) { uint32_t bytes_read = 0; char buffer[32];

if (neat_read(ops->ctx, ops->flow, buffer, 31, &bytes_read, NULL, 0) == NEAT_OK) { buffer[bytes_read] = 0; fprintf(stdout, "Read %u bytes:\n%s", bytes_read, buffer); } neat_close(ops->ctx, ops->flow); neat_stop_event_loop(ops->ctx);

return NEAT_OK;}

19