Ed Warnicke – Note: Read with animations

Slides:



Advertisements
Similar presentations
Oct, 26 th, 2010 OGF 30, NSI-WG: Network Service Interface working group Web Services Overview Web Services for NSI protocol implementation
Advertisements

November 2013 Jan Medved, Reinaldo Penno
Proposal: Model-Driven SAL for the OpenDaylight Controller
TSpaces Services Suite: Automating the Development and Management of Web Services Presenter: Kevin McCurley IBM Almaden Research Center Contact: Marcus.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
January 2014 Thomas D. Nadeau
SOAP Quang Vinh Pham Simon De Baets Université Libre de Bruxelles1.
OpenDaylight: An Open Source SDN for Your OpenStack Cloud Stephan Baucke, Ericsson Kyle Mestery, Cisco Anees Shaikh, IBM Chris Wright,
Time Series Data Repository (TSDR)
Device Driver Framework Project October 2014.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
©2015 Extreme Networks, Inc. All rights reserved. Software Defined Networking (SDN) v2.0 Mikael Holmberg Senior Global Consulting Engineer
Exploring OpenDaylight
NOV 20, 2014 Abi Varghese Tiju John Mahesh Govind
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
OpenDaylight Architecture
LISP, SDN, and OpenDaylight
Messaging Technologies Group: Yuzhou Xia Yi Tan Jianxiao Zhai.
Basic Operations Guide
Submitted by: Madeeha Khalid Sana Nisar Ambreen Tabassum.
OSGi.
Web Services Mohamed Fahmy Dr. Sherif Aly Hussein.
Capture and Replay Often used for regression test development –Tool used to capture interactions with the system under test. –Inputs must be captured;
Integration Broker PeopleTools Integration Broker Steps –Introduction & terminologies –Application Server PUB/SUB services (Application Server)
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Abierman-nanog-30may03 1 XML Router Configs BOF Operator Involvement Andy Bierman
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Jan Hatje, DESY CSS ITER March 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
Middleware for FIs Apeego House 4B, Tardeo Rd. Mumbai Tel: Fax:
Open Service Gateway Initiative (OSGi) Reporter : 林學灝 侯承育 1.
ICT Strategy Intelligent Highways: Endpoint Adapters.
Device Identification & Driver Management TSC Update January 8, 2015.
OpenDaylight: Introduction, Lithium and Beyond
XML and Web Services (II/2546)
Message Broker
Protocol for I2RS I2RS WG IETF #89 London, UK Dean Bogdanovic v0.1.
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
Migrating Desktop Bartek Palak Bartek Palak Poznan Supercomputing and Networking Center The Graphical Framework.
WELCOME TO THE Donald Hunter Cisco.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
August 2003 At A Glance The IRC is a platform independent, extensible, and adaptive framework that provides robust, interactive, and distributed control.
AMQP, Message Broker Babu Ram Dawadi. overview Why MOM architecture? Messaging broker like RabbitMQ in brief RabbitMQ AMQP – What is it ?
Kafka Producer OpenDaylight Project Proposal
December 30, 2015 Richard Chien Marko Lai Jason Yuan
Jan Hatje, DESY CSS GSI Feb. 2009: Technology and Interfaces XFEL The European X-Ray Laser Project X-Ray Free-Electron Laser 1 CSS – Control.
Controller spin-off proposals
Created by Jan Medved I2RS Related/Relevant Yang Models Currently in Use March 2014 Robert Varga, Anton Tkacik, Jan Medved.
Azher Mughal / Beraldo Leal Programming OpenFlow Flows for Scientific Profit 1 Azher Mughal / Beraldo Leal SuperComputing 2015.
YANG Background and Discussion: Why we need a new language for NETCONF configuration modeling The YANG Gang IETF 70 Vancouver, Canada.
Clustering in OpenDaylight
Time Series Data Repository #ODSummit - The Generic, Extensible, and Elastic Data Repository in OpenDaylight for Advanced Analytics.
Test and Performance Integration Group.
Author: Maros Marsalek (Honeycomb PTL)
Atrium Router Project Proposal Subhas Mondal, Manoj Nair, Subhash Singh.
OpenDaylight Hydrogen Release Sept 2, 2013.
Exploring OpenDaylight Matt Younkins
Luis Gomez, Principal SW Test Engineer, Brocade
SDN controllers App Network elements has two components: OpenFlow client, forwarding hardware with flow tables. The SDN controller must implement the network.
OpenDaylight Clustering – What’s new in Boron
ODL Tutorial – Writing an Application in ODL
WEB SERVICES.
Author: Maros Marsalek (Honeycomb PTL)
Unit – 5 JAVA Web Services
ONOS Drake Release September 2015.
CS434/534: Topics in Networked (Networking) Systems Distributed Network OS Yang (Richard) Yang Computer Science Department Yale University 208A Watson.
ESIS Consulting LLC (C) ESIS Consulting LLC. All rights reserved
CS434/534: Topics in Network Systems High-Level Programming for Programmable Networks: Compiler and Network OS Yang (Richard) Yang Computer Science.
Presentation transcript:

Ed Warnicke – 2015-07-27 Note: Read with animations ODL Tutorial Ed Warnicke – 2015-07-27 Note: Read with animations

Environment Setup Grab a USB Key Copy the contents to the laptop (May take about 5-10 mins) Install VirtualBox for your platform Unzip ODLTutorial.zip Import the OVA into VirtualBox or VMWare Fusion(If you have it) Boot up the Virtual Machine and Login Login User/Password: ODL-Developer Wiki Page: Go to wiki.opendaylight.org Search for : “Application Development Tutorial” in the Search Box on the right IRC Channel for today: #opendaylight-tutorial

Cisco Live 2014 Goals 4/21/2017 This very hands on tutorial will walk you through writing a simple OpenDaylight application and SB Plugin. Along the way we will explore: Writing effective models Available design patterns for your application and protocol plugin How to achieve those patterns in your code Building applications from micro-services Getting along with other applications Clustering considerations Performance considerations Error handling  At the end of this tutorial you will have written a simple application and southbound plugin Using best practices and have an understanding of *why* it was written that way.

OSGi Framework (Equinox) ODL Technology Stack Java chosen as an enterprise-grade, cross-platform compatible language Java Interfaces are used for event listening, specifications and forming patterns Maven – build system for Java OSGi: Allows dynamically loading bundles Allows registering dependencies and services exported For exchanging information across bundles Karaf: Light-weight Runtime for loading modules/bundles OSGi based. Primary distribution mechanism since Helium FeatureA FeatureB SAL … Karaf OSGi Framework (Equinox) 23, 25 ABOUT KARAF ADD: DLUX / GUI SLIDE ON SOLVING HARD PROBLEMS VIA INDUSTRY VIA CODE VS PRODUCTS TALK ABOUT POLICY – DEBATE INTERNALLY IN CODE SECURITY AND TRIPLE AAA LOAD BALANCING AS A SERVICE ETC. ON 23-28

OpenDaylight: SDN Controller Architecture Network Applications Orchestration & Services Applications Controller NETCONF REST APIs Service Functions Base Network Functions Controller Platform Topology Exporter ... Inventory Manager Configuration Subsystem Statistics Manager Forwarding Rules Manager ... PCEP Topology Exporter Inventory Manager Topology Exporter Inventory Manager Service Adaptation Layer OpenFlow 1.0/1.3 BGP-LS PCEP Netconf Client OVSDB LISP Southbound Interfaces & Protocol Plugins Network Devices

OpenDaylight: Software Architecture Network Devices Applications Network Devices Applications Network Applications Orchestration & Services Network Devices Applications Controller NETCONF SERVER Protocol Plugin ... Protocol Plugin App/Service Plugin ... App/Service Plugin RESTCONF Plugins & Applications Config Subsystem Model-Driven SAL (MD-SAL) Controller Platform Messaging Data Store Clustering Remote Controller Instance Remote Controller Instance

Cisco Live 2014 4/21/2017 The Tools A text editor, preferably an IDE like IntelliJ IDEA or Eclipse YANG – Modeling language (see RFC 6020) Java 1.7 or 1.8 – Programming language Maven >= 3.2.3 – Build tool OSGi – technology for building modular systems Karaf – technology for deploying and managing OSGi bundles

Apache Karaf Container Modular (Deploy only the features/bundles you need) Hot Deployment Dynamic Configuration Powerful Extensible Shell Console + Remote Access Native OS Integration Logging Security Framework Supports any Component that can be wrapped as Jar f1 f2 A:bundle C:bundle B:bundle common X:bundle my-features.xml Y:bundle

The Service Development Process YANG Model (s) Service Implementation Karaf Feature Definition 1 3 4 Generate API Yang Tools Maven Build Tools Maven Build Tools OSGi API JAR OSGI IMPL JAR Features.xml Generated API OSGi IMPL JAR Karaf KAR 2 Maven Build Tools 5 Deploy Controller OSGi API JAR

Yangtools – What is Yang? Cisco Live 2015 4/21/2017 Yangtools – What is Yang? Yang is a modeling language Models semantics and data organization Models can be ‘augmented’ Can model: Config/Operational data as a tree RPCs Notifications Text base Simple Compact Standard based (RFC 6020)

Yangtools – What does Yangtools do? Cisco Live 2015 4/21/2017 Yangtools – What does Yangtools do? Generates Java code from Yang Provides ‘Codecs’ to convert Generated Java classes to DOM DOM to various formats XML JSON Etc ‘Codecs’ make possible automatic: RESTCONF Netconf Other bindings (AMQP expected this summer) Java code xml json exi

Cisco Live 2015 4/21/2017 Yang to Java benefits Consistent Data Transfer Objects (DTOs) everywhere Immutable: to avoid thread contention Strongly typed: reduce coding errors Consistent: reduce learning curve Improvable – generation can be improved and all DTOs get those improvements immediately system wide Automated Bindings: restconf – xml and json netconf amqp and xmpp – on the horizon Runtime Generatable

MD-SAL – 3 Brokers put publish store notify notify Data Broker Cisco Live 2015 4/21/2017 MD-SAL – 3 Brokers Data Broker notify put store RPC Broker call Notification Broker publish notify

RPCs – Unicast Messages Cisco Live 2015 4/21/2017 RPCs – Unicast Messages RPCs allow you to: Send a message Receive a response Asynchronously Without knowledge of provider of implementation RPCs come in two flavors: Global – One receiver Routed – One receiver per context Consumer MD-SAL Provider

RPCs – Sending a Message - Synchronous Cisco Live 2015 4/21/2017 RPCs – Sending a Message - Synchronous HelloService helloService= session.getRpcService(HelloService.class); Future<RpcResult<HelloWorldOutput>> future; future= helloService .helloWorld(helloWorldInput); HelloWorldOutput helloWorldOutput = future.get().getResult(); consumer future helloService MD-SAL getRpcService() return: helloService helloWorld(helloWorldInput) return: future get() set(helloOutput) return: RpcResult<HelloWorldOutput>

RPCs – Sending a Message - Asynchronous Cisco Live 2015 4/21/2017 RPCs – Sending a Message - Asynchronous HelloService helloService= session.getRpcService(HelloService.class); Future<RpcResult<HelloWorldOutput>> future; future= helloService .helloWorld(helloWorldInput); while(! future.isDone()) { /* Do other work */ } HelloWorldOutput helloWorldOutput = future.get().getResult(); consumer future helloService MD-SAL getRpcService() return: helloService helloWorld(helloWorldInput) return: future isDone() false set(helloOutput) isDone() true get() return: RpcResult<HelloWorldOutput>

Global RPCs – processing a message - Sync Cisco Live 2015 4/21/2017 Global RPCs – processing a message - Sync public class HelloWorldImpl implements HelloService { public HelloWorldImpl(ProviderContext session){ session.addRpcImplementation( HelloService.class, this); } @Override public Future<RpcResult<HelloWorldOutput>> helloWorld(HelloWorldInput input) { /* construct output */ return RpcResultBuilder .success(helloWorldOutput) .buildFuture(); MD-SAL helloWorldImpl addRpcImplementation(this) helloWorld(helloWorldInput) return: future

Global RPCs – processing a message - Sync Cisco Live 2015 4/21/2017 Global RPCs – processing a message - Sync public class HelloWorldImpl implements HelloService { public HelloWorldImpl(ProviderContext session){ session.addRpcImplementation( HelloService.class, this); } @Override public Future<RpcResult<HelloWorldOutput>> helloWorld(HelloWorldInput input) { /* construct output */ return RpcResultBuilder .success(helloWorldOutput) .buildFuture(); MD-SAL helloWorldImpl addRpcImplementation(this) helloWorld(helloWorldInput) return: future

Global RPCs – processing a message - ASync Cisco Live 2015 4/21/2017 Global RPCs – processing a message - ASync public class HelloWorldImpl implements HelloService { public HelloWorldImpl(ProviderContext session){ session.addRpcImplementation( HelloService.class, this); } @Override public Future<RpcResult<HelloWorldOutput>> helloWorld(HelloWorldInput input) { SettableFuture future = new SettableFuture(); process (input,future); return future; MD-SAL future helloWorldImpl addRpcImplementation(this) helloWorld(helloWorldInput) process(helloWorldInput,future) return: future

Global RPCs – processing a message - ASync Cisco Live 2015 4/21/2017 Global RPCs – processing a message - ASync public class HelloWorldImpl implements HelloService { /* * see previous slide for * calls to addRpcImplementation * and the helloWorld method */ private process(HelloWorldInput input, SettableFuture future) { /* process in new thread */ future.set(RpcResultBuilder .success(helloWorldOutput) .build()); } MD-SAL future helloWorldImpl addRpcImplementation(this) helloWorld(helloWorldInput) process(helloWorldInput,future) return: future set(helloOutput)

Routed RPCs – What are they? Cisco Live 2015 4/21/2017 Routed RPCs – What are they? A Unicast Message Well defined Input/Output Processor is context dependent Input includes ‘Context’ InstanceIdentifier Pointer to a place in the tree defining message context Consumer is unaware RPC is routed Registration includes ‘Context’ MD-SAL ‘routes’ to correct message processor for ‘Context’ Consumer MD-SAL Provider1 Provider2

Routed RPCs – processing a message - Sync Cisco Live 2015 4/21/2017 Routed RPCs – processing a message - Sync public class HelloWorldImpl1 implements HelloService { public HelloWorldImpl(ProviderContext session){ RoutedRpcRegistration<HelloService> reg1 = session.addRoutedRpcImplementation( HelloService.class, this); reg1.registerPath(MyContext.class,iid1); } /* helloWorld() implementation works as before */ MD-SAL reg2 helloWorldImpl2 reg1 helloWorldImpl1 addRoutedRpcImplementation(this) return: reg1 registerPath(…) addRoutedRpcImplementation(this) return: reg2 public class HelloWorldImpl2 implements HelloService { public HelloWorldImpl(ProviderContext session){ RoutedRpcRegistration<HelloService> reg2 = session.addRoutedRpcImplementation( HelloService.class, this); reg2.registerPath(MyContext.class,iid2); } /* helloWorld() implementation works as before */ registerPath(…) helloWorld(helloWorldInput1) return: future helloWorld(helloWorldInput2) return: future

Clustering - RPCs RPCs Routed across the cluster Node -1 Node -2 Cisco Live 2015 4/21/2017 Clustering - RPCs RPCs Routed across the cluster Node -1 Node -2 Consumer MD-SAL MD-SAL Provider

Cisco Live 2015 4/21/2017 Let Make a Deal If you don’t make me show you Routed RPC working Asynchronously I won’t make you sit through it  Nobody has to know

Datastore – key concepts Cisco Live 2015 4/21/2017 Datastore – key concepts Yang data is a tree Two Logical Data Stores config operational Unified View InstanceIdentifier: Pointer to a node OpenDaylight Platform NETCONF MD-SAL ... Flow-Capable Node Inventory Manager Model Statistics Manager OpenFlow Topology Exporter BGP-LS Topology Exporter /operational /config network-topo nodes Flow/2 of:1 of:2 Of:n ... Tables Meters Table/2 Table/n Flow/1 Flow/n Ports nc:1 nc:2 p1 p2 BGP-LS BGPv4 BGPv6 nodes links prefixes n1 n2 nx l2 l1 ... lx px OpenFlow Groups Table/1 Table-stats Flow-stats

Datastore – Transactions – Reading and Writing Cisco Live 2015 4/21/2017 Datastore – Transactions – Reading and Writing ReadWriteTransaction transaction = dataBroker.newReadWriteTransaction(); Optional<Node> nodeOptional; nodeOptional = transaction.read( LogicalDataStore.OPERATIONAL, n1InstanceIdentifier); transaction.put( LogicalDataStore.CONFIG, n2InstanceIdentifier, topologyNodeBuilder.build()); transaction.delete( n3InstanceIdentifier); CheckedFuture future; future = transaction.submit(); transaction Datastore /operational /config network-topo overlay1 BGPv4 nodes nodes n3 n2 n3 n1 n1

Datastore – Transactions – Merging Cisco Live 2015 4/21/2017 Datastore – Transactions – Merging WriteOnlyTransaction transaction = dataBroker.newWriteOnlyTransaction(); InstanceIdentifier<Node> path = InstanceIdentifier .create(NetworkTopology.class) .child(Topology.class, new TopologyKey( “overlay1”)); transaction.merge( LogicalDataStore.CONFIG, path, topologyBuilder.build()); CheckedFuture future; future = transaction.submit(); transaction Datastore /operational /config network-topo nodes n4 overlay1 overlay1 BGPv4 nodes nodes n4 n3 n1 n1

Datastore – Transactions – Merge vs Put Cisco Live 2015 4/21/2017 Datastore – Transactions – Merge vs Put WriteOnlyTransaction transaction = dataBroker.newWriteOnlyTransaction(); InstanceIdentifier<Node> path = InstanceIdentifier .create(NetworkTopology.class) .child(Topology.class, new TopologyKey( “overlay1”)); transaction.put( LogicalDataStore.CONFIG, path, topologyBuilder.build()); CheckedFuture future; future = transaction.submit(); transaction Datastore /operational /config network-topo nodes n4 overlay1 overlay1 BGPv4 nodes nodes n4 n3 n1 n1

DataChangeListeners – Finding out about change Cisco Live 2015 4/21/2017 DataChangeListeners – Finding out about change transaction Datastore dataBroker.registerDataChangeListener( LogicalDatastoreType.CONFIGURATION, myInstanceId, myDataChangeListener, DataChangeScope.SUBTREE); /operational /config network-topo nodes n4 overlay1 n4 overlay1 nodes overlay1 n3 nodes overlay1 BGPv4 nodes myDataChangeListener nodes n4 n3 n1 n1 n4 n3 AsyncDataChangeEvent created deleted updated original

Clustering - Datastore Cisco Live 2015 4/21/2017 Clustering - Datastore Datastore Sharded Replicated But not everywhere RAFT algorithm for consistency Node -1 Node -2 Node -3 /operational /config /operational /config /operational /config network-topo network-topo network-topo overlay1 overlay1 overlay1 BGPv4 BGPv4 BGPv4 nodes nodes nodes nodes nodes nodes n4 n3 n4 n3 n4 n3 n1 n1 n1 n1 n1 n1