Transcript
  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    1/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 1of191 Copyright 2015, the Members of the SmartenIT Consortium

    Socially-aware Management of

    New Overlay Application Traffic withEnergy Efficiency in the Internet

    European Seventh Framework Project FP7-2012-ICT- 317846-STREP

    Deliverable D3.4Prototype Implementation, Validation and

    Selected Application

    The SmartenIT Consortium

    Universitt Zrich, UZH, SwitzerlandAthens University of Economics and Business - Research Center, AUEB, GreeceJulius-Maximilians Universitt Wrzburg, UniWue, GermanyTechnische Universitt Darmstadt, TUD, Germany

    Akademia Gorniczo-Hutnicza im. Stanislawa Staszica w Krakowie, AGH, PolandIntracom SA Telecom Solutions, ICOM, Greece

    Alcatel Lucent Bell Labs, ALBLF, FranceInstytut Chemii Bioorganicznej PAN, PSNC, PolandInteroute S.P.A, IRT, ItalyTelekom Deutschland GmbH, TDG, Germany

    Copyright 2015, the Members of the SmartenIT Consortium

    For more information on this document or the SmartenIT project, please contact:

    Prof. Dr. Burkhard StillerUniversitt Zrich, CSG@IFIBinzmhlestrasse 14CH8050 ZrichSwitzerland

    Phone: +41 44 635 4331Fax: +41 44 635 6809

    E-mail: [email protected]

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    2/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 2of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    Document Control

    Title: Prototype Implementation, Validation and Selected ApplicationType: Public

    Editor: George Petropoulos

    E-mail: [email protected]

    Author(s): George Petropoulos , Sergios Soursos, Jakub Gutkowski, ukaszopatowski, Grzegorz Rzym, Piotr Wydrych, Andri Lareida, Daniel Dnni,Thomas Bocek, Fabian Kaup, Matthias Wichtlhuber, Sabine Randriamasy,Zbigniew Duliski, Rafa Stankiewicz, Krzysztof Wajda, Ioanna Papafili,Paolo Cruschelli, Burkhard Stiller

    Doc ID: D3.4-v1.0.doc

    Amendment History

    Version Date Author Description/Comments

    v0.1 January 30, 2015 George Table of contents

    v0.2 March 31, 2015 George Updated table of contents

    v0.3 April 15, 2015 George, Fabian, Lukasz, Jakub,Grzegorz, Sabine, Andri, Daniel

    Integrated input to chapters 4, 5, 6 and 7.

    v0.4 April 21, 2015 George, Sergios, Matthias, Lukasz,Jakub, Grzegorz, Daniel, Piotr

    Integrated input to all chapters.

    v0.5 April 24, 2015 Ioanna, Paolo, Burkhard Internal review

    v1.0 April 30, 2015 George, Sergios, Lukasz, Grzegorz,Matthias, Daniel, Sabine, Thomas

    Final version

    Legal NoticesThe information in this document is subject to change without notice.The Members of the SmartenIT Consortium make no warranty of any kind with regard to this document,including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. TheMembers of the SmatenIT Consortium shall not be held liable for errors contained herein or direct, indirect,special, incidental or consequential damages in connection with the furnishing, performance, or use of thismaterial.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    3/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 3of191 Copyright 2015, the Members of the SmartenIT Consortium

    Table of Contents

    1 Executive Summary 5

    2

    Introduction 6

    2.1

    Purpose of Deliverable 3.4 6

    2.2 Document Outline 7

    3 Architecture Overview 83.1 Overview 83.2 Entities/Components/Interfaces 93.3

    System Deployment 11

    4 Implementation Framework 144.1

    Tools 14

    4.1.1 Specification Language 144.1.2

    Programming Languages 14

    4.1.3

    Libraries 154.1.4 Tool chain 16

    4.1.5

    Testbed 16

    4.1.6

    Version Control 16

    4.1.7 Issue Tracking 164.1.8 Continuous Integration Server 17

    4.2

    Procedures 17

    4.2.1 System Release Process 174.2.2 Development Process 184.2.3

    Roles 18

    4.2.4

    Meetings 19

    4.3 System tree layout 194.4 Open-Source releases 22

    4.5

    Deployment Instructions 22

    5 The Dynamic Traffic Management (DTM) mechanism 245.1 SBox 24

    5.1.1 Quality of Service Analyzer 245.1.2

    Network Traffic Manager 37

    5.1.3 Economic Analyzer 575.1.4 Inter-SBox Communication Service 645.1.5 SBox-SDN Communication Service 645.1.6

    Database 64

    5.1.7 User Interface 695.2 SDN Controller 78

    5.2.1

    Interfaces 78

    5.2.2

    Floodlight 80

    6 The Replicating Balanced Tracker - Home Router Sharing based on Trust (RB-

    HORST) mechanism 906.1 uNaDa 90

    6.1.1

    Cloud Traffic Manager 90

    6.1.2 Overlay Manager 996.1.3 Topology Proximity Monitor 1036.1.4

    Social Monitor 106

    6.1.5 Social Analyzer 1076.1.6 uNaDa-End-User Interface 1096.1.7 Database 1116.1.8

    User Interface 119

    6.2

    End-User 128

    7 The Multi-Criteria Application End-Point Selection (MUCAPS) mechanism 134

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    4/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 4of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    7.1 Mapping to the SmartenIT Architecture 1347.1.1 Required SmartenIT components and entities 1357.1.2

    Embedding MUCAPS on the SmartenIT architecture 136

    7.2

    Implementation and Deployment 137

    7.2.1

    Description of the MACAO related functional blocks 137

    7.2.2

    MUCAPS implementation and execution: entities and interfaces 140

    7.2.3

    In-network transparent deployment 145

    8 The Virtual Incentives (vINCENT) mechanism 1478.1

    Mapping to the SmartenIT Architecture 147

    8.2 Implementation and Deployment 148

    9 The Mobile Network Assistant (MoNA) mechanism 1519.1 Mapping to the SmartenIT Architecture 1519.2

    Implementation and Deployment 152

    10 The SDN-based DC selection (SDNDC) mechanism 15510.1 Mapping to the SmartenIT Architecture 155

    10.2

    Implementation and Deployment 15710.2.1

    Implementation Environment Description 157

    10.2.2 Implementation 158

    11 System Releases 16211.1 Release v1.1 163

    11.1.1 Features 16311.1.2

    Tests 163

    11.1.3

    Issues 163

    11.2 Release v1.2 16311.2.1 Features 16311.2.2

    Tests 164

    11.2.3 Issues 165

    11.3

    Release v2.0 16611.3.1

    Features 166

    11.3.2 Tests 16711.3.3 Issues 172

    11.4

    Release v2.1 172

    11.4.1 Features 17211.4.2 Tests 17311.4.3 Issues 174

    11.5

    Release v3.0 174

    11.5.1 Features 17511.5.2 Tests 17511.5.3

    Issues 176

    11.6 Release v3.1 177

    11.6.1

    Features 17711.6.2

    Tests 177

    11.6.3 Issues 179

    12 Summary 180

    13 SMART Objectives Addressed 182

    14 References 184

    15 Abbreviations 186

    16 Acknowledgements 188

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    5/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 5of191 Copyright 2015, the Members of the SmartenIT Consortium

    1 Executive Summary

    The aim of Deliverable 3.4 Prototype Implementation, Validation and Selected

    Application is to document the final release of the SmartenIT prototype, with respect tothe implementation framework, the design and the implementation of the SmartenITsystem. Moreover, D3.4 also documents any standalone implementations that were madeby SmartenIT partners but were not integrated to the core system.

    D3.4 is the outcome of four WP3 tasks, namely T3.2 Technology Scouting and Definitionof Implementation Framework, T3.3 Development of Prototype Components, T3.4Implementation of Selected Application and T3.5 Integration of Prototype andValidation. Hence, this deliverable covers all SmartenIT prototype implementationaspects. Additionally, D3.4 provides an overview of the standalone implementationscarried out throughout the duration of the project.

    D3.4 is the last deliverable of WP3 Architecture Design and Engineering and with itssubmission, the activities of WP3 are concluded. Thus, this deliverable provides the finaldocumentation of the SmartenIT prototype and can be used by third parties to extend thesoftware. For this reason, the SmartenIT consortium has already published the sourcecode of the prototype as Open Source, under the Apache License v2, available at[39].

    The objectives and outcomes of D3.4 are summarized below:

    A detailed description of the technologies and libraries used in the SmartenITprototype, along with the implementation framework (i.e., processes, tools, roles).

    Detailed instructions on how to build the source code and deploy the artifacts onthe recommended hardware.

    Detailed documentation of the two main mechanisms implemented by theSmartenIT prototype, namely the Dynamic Traffic Management (DTM) and theReplicating Balanced tracker & Home Router Sharing based on Trust (RB-HORST) mechanisms. The documentation includes a per-component breakdown ofall the involved classes and interfaces, thus providing a full explanation of thestructure of the code, the functionality implemented, as well as the accompanyingtests for the validation of the components.

    Documentation of the standalone implementation of certain SmartenITmechanisms which were not however integrated to the core prototype, due to either

    their low maturity or the different direction decided to be taken by the SmartenITconsortium. The documentation includes a description of the functionalityimplemented, a mapping to the SmartenIT architecture and details of theimplementation and deployment. The mechanisms that fall under this category areMUlti-Criteria Application endPoint Selection (MUCAPS), the Virtual Incentive(vINCENT), the Mobile Network Assistant (MoNA) and the SDN-based DCselection mechanisms.

    A complete list of all the SmartenIT prototype releases, with the implementedfunctionality in each of them, along with the respective integration tests.

    To summarize, this deliverable stands as the engineering and implementation

    documentation of the final release of the SmartenIT prototype and standaloneimplementations and concludes the works of WP3.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    6/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 6of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    2 Introduction

    The focus of the SmartenIT project is to devise management mechanisms for traffic

    generated by applications running on the Cloud and/or forming overlays. The main axesaround which such solutions evolve are: i) social awareness, ii) incentive compatibility, iii)energy efficiency, and iv) QoE awareness. In this context, WP2 Theory and Modelinghas described a number of traffic management mechanisms that deal with certainaspects. In the most recent deliverable of WP2, D2.4 Report on Final Specification ofTraffic Management Mechanisms and Evaluation Results [26], the final list of thosemechanisms is included, where each one of them is specified and evaluated. Incollaboration with WP3, WP2 has selected some of those mechanisms to be implementedinto a SmartenIT prototype according to the procedure described in [26]. The selectedmechanisms are specified in full details in [26] and comprise the core Dynamic TrafficManagement (DTM) mechanism, along with certain extensions so as to be combined with

    the Inter-Cloud Communication (ICC) mechanism, as well as the Replicating Balancedtracker & Home Router Sharing based on Trust (RB-HORST) mechanism. For moredetails on these mechanisms, please consult[26].

    WP3 on the other hand, has defined a modular architecture that can encompass any ofthe functionality required for the SmartenIT prototype. In this sense, in the context of Task3.1, Deliverable D3.3 Final Report on System Architecture [3] has documented all thedetails of the SmartenIT architecture and has provided a mapping of all the identifiedmechanisms to it. In the meantime, WP3 (through Tasks 3.3, 3.4 and 3.5) has startedimplementing the first release of the SmartenIT prototype, which mainly involved theimplementation of the DTM mechanism. The details of this first release were documentedin D3.2 Technologies, Implementation Framework, and Initial Prototype[2].

    With the next releases, WP3 started incorporating additional functionality andmechanisms into the prototype system. In parallel, certain standalone implementationswere pursued by partners with focus on specific aspects of functionality that were notaddressed by the core system.

    2.1 Purp ose of Deliverable 3.4

    The purpose of this deliverable is to fully document all the implementation work performedby the consortium, by describing the final status of the SmartenIT prototype. Morespecifically, D3.4 aims at:

    describing in full detail the technologies and libraries used in the SmartenITprototype, along with the implementation framework (i.e., processes, tools, roles).

    providing detailed instructions on how to build the source code and deploy theartifacts on the recommended hardware.

    documenting the mechanisms implemented by the SmartenIT prototype, includinga per-component breakdown of all the involved classes and interfaces, along withthe respective class and sequence diagrams, as well as the accompanying tests forthe validation of the components.

    providing documentation of any standalone implementations of certain SmartenITmechanisms, not however integrated to the core prototype.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    7/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 7of191 Copyright 2015, the Members of the SmartenIT Consortium

    providing a complete list of all the SmartenIT prototype releases, with theimplemented functionality in each one of them, along with the respective integrationtests.

    2.2 Docum ent Outl ine

    Chapter 3 briefly reminds to the reader the entire SmartenIT architecture, as documentedin D3.3 [3], including the entities, components and interfaces required to encompass theenvisioned functionality.

    Chapter 4 is the outcome of Task 3.2, which includes all the technologies and tools usedto support the development and deployment of the selected traffic managementmechanisms. The generated system tree and build instructions are also included.

    Chapter 5 presents the implementation details of the DTM mechanism and its extensions,

    describe per entity and per component, and including description of the functionality, theinterfaces, the design and the related tests.

    Chapter 6 provides the same details for the RB-HORST mechanism.

    Chapter 7 documents the standalone implementation of the MUlti -Criteria ApplicationendPoint Selection (MUCAPS) mechanism, by describing the functionality implemented,a mapping to the SmartenIT architecture and details of the implementation anddeployment.

    Chapter 8 provides the same information for the Virtual Incentive (vINCENT)mechanism.

    Chapter 9 does the same for the Mobile Network Assistant (MoNA) mechanism, and sodoes Chapter 10 for the SDN-based DC selection (SDNDC) mechanism.

    Chapter 11 provides the list of the different system releases for the DTM and RB-HORSTmechanisms, by identifying the functionality implemented in each release (in the form offeatures addressed), the respective integration tests and the remaining issues to beaddressed by next releases.

    Chapter 12 provides a brief summary of the deliverables conclusions, including the finalimplementation framework, the implemented components of the DTM and RB-HORSTmechanisms and the list of standalone implementations.

    Finally, the SMART objectives, which are defined in the Description of Work [31], areaddressed in Chapter 13.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    8/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 8of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    3 Architecture Overview

    The SmartenIT architecture was finalized in D3.3 [3], hence this chapter presents a

    synopsis of the most relevant aspects of the SmartenIT architecture that is necessary tounderstand D3.4. Initially, a brief overview of the final SmartenIT architecture is given inSection3.1,presenting all components and interfaces, as well as their grouping to entities.Sections 3.2 and 3.3 illustrate the mapping of the two integrated mechanisms to thegeneric SmartenIT architecture and their deployment diagrams, respectively.

    3.1 Overview

    The component diagram in Figure 1 shows all the components of the SmartenITarchitecture together with an overview of main interfaces. The color-coding of thecomponents denotes whether a component already exists in external systems (white

    components) or is already implemented by SmartenIT (blue components).

    E.g. ALTO

    E.g. inter-ALTO

    E.g. OpenFlowE.g. SNMP,

    BGP, Netflow

    Inter DC/Cloud/NaDacommunication

    Datacenter/NaDa/Cloud Manager

    WorkflowManager

    LoadBalancer

    TrafficRedirector

    Hypervisor

    OverlayManager

    Social Analyzer

    EconomicsAnalyzer

    QoS/QoE

    Analyzer

    Energy

    Analyzer

    Network

    Analyzer

    Traffic Manager

    Cloud Traffic Manager

    Fixed/MobileNetwork Traffic Manager

    Inter-domaincommunication

    QoE Monitor QoS MonitorSwitching/Forwarding

    Energy MonitorTopology/ProximityMonitor

    Social Monitor

    Billing/Accounting

    OnlineSocial Networks

    (e.g. Facebook)

    SDN Controller

    E.g. FacebookAPI

    ContentPortals (e.g.

    Vimeo)

    E.g. REST

    E.g. Vimeo API

    Figure 1: The SmartenIT component diagram.

    Moreover, the components may coexist on a number of entities. The mapping ofcomponents to entities is presented in Figure 2. In this figure, the grey boxes denote

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    9/191

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    10/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 10of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    Network Traffic Manager

    SDN Controller SDN Controller, Interfaces Section5.2

    Network Entity

    S-Box

    Economics

    Analyzer

    Fixed/Mobile Network

    Traffic Manager

    DB

    ISCS

    QoS Analyzer

    QoS Monitor

    Switching/

    Forwarding

    snmp

    db

    ntm1

    eca1

    ntm2

    Sbox-SDN

    ssdn

    ui

    UI

    iscs2 ntm3

    iscs1

    SDN Controller

    SDN

    Controller

    Interfaces

    openflow

    sdn1

    sdn2

    netconf

    ui

    Figure 3: The DTM mechanism entities/components/interfaces diagram.

    On the other hand, the RB-HORST mechanism uses the entities and components,presented inFigure 4 and also summarized inTable 3-2.

    Table 3-2: List of Entities for RB-HORST implementation

    Entity Components Reference

    uNaDa Cloud Traffic Manager (CTM), OverlayManager (OM), Social Monitor (SM),Social Analyzer (SA), TopologyProximity Monitor (TPM), Database(DB), User Interface (UI), uNaDa-End-user interface, Proxy

    Section6.1

    End-User entity Traffic Manager, DB, UI Section6.2

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    11/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 11of191 Copyright 2015, the Members of the SmartenIT Consortium

    uNaDa

    Overlay

    ManagerSocial Analyzer

    Cloud Traffic Manager

    Topology

    Proximity

    Monitor

    DB

    UI

    End-User Entity

    UI DB

    Mobile Network

    Traffic Manager

    om3

    Social Monitor

    om1 sa1

    FacebookVimeo

    facebookvimeo

    db1

    ctm1

    om2

    ui1

    Proxy

    ctm2

    Figure 4: The RB-HORST entities/components/interfaces diagram

    3.3 System Deployment

    In this section, the deployment diagrams of the two integrated and released prototypes,DTM and RB-HORST, are presented, including the required hardware, processes,artifacts and protocols.

    Diagram in Figure 5 presents the devices, processes and artifacts used, to deploy aninstantiation of the final version of the DTM mechanism.

    More specifically, the SBox is deployed on an x64 server with Ubuntu 14.04[32] installed,and requires the installation of Java [6] and the Jetty Web server [13], in which thesbox.war artifact is deployed. The sbox.war contains all the required components (UI andDB) for the SBox Web application, exposing an HTTP/HTTPS Web interface, accessible

    by any Web browser from the administrators PC. In addition, the sbox.jar is the mainexecutable of the SBox, including all components implementing DTM mechanismsfunctionalities. It uses the JBoss Netty NIO framework[33] to expose the ISCS (Inter-SBoxCommunication Service) interfaces using a custom SmartenIT-protocol over TCP, andaccess the SDN Controllers REST API over HTTP. The Sqlite [14] is also used as theSBoxs database.

    The SDN Controller also requires an x64 server, with Ubuntu 14.04 [32] as its operatingsystem, requiring Java[6] to be installed. The sdn.jar executes all the Floodlight[23] SDNControllers processes, extended with DTM functionalities, and the Interfaces component,which provides the SBox-SDN communication over HTTP.

    Finally, the DTM mechanism requires also network devices, which, depending on thelocalization in the network, must be Openflow-compatible [35], support SNMP [34] and

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    12/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 12of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    NETCONF [19]. QoS Analyzer of SBox retrieves SNMP measurements via SNMP.NETCONF is used by the Network Traffic Manager to enforce configuration related withdelay tolerant traffic management. The network device also interacts with the exposedFloodlight SDN Controllers interface using the OpenFlow protocol.

    SDN Controller (Server)SBox (Server)

    sbox.jar

    sqlite sdn.jarHTTP(JSON)

    Jetty Container

    DB

    EconomicAnalyzer

    Network Device

    Inter-SBoxCommunicationService

    QoSAnalyzer

    Traffic Manager

    OpenFlow

    sbox.warjdbc

    SNMP

    NETCONF

    HTTP

    TCP

    Floodlight0.90

    Figure 5: DTM deployment diagram.

    For the RB-HORST mechanism, the presented system architecture is mapped onto thedeployment diagram of Figure 6,which presents the hardware, processes and artifacts

    used to deploy an instantiation of the RB-HORST entities, as well as the interfaces andprotocols between entities and external systems.

    For the reference implementation of RB-HORST, the Raspberry Pi [30] was selected asthe home gateway hardware. It is a low cost credit-card-sized single-board computer thatcan be used for various purposes in a home environment, and specifically in ourimplementation with the addition of an external WiFi dongle, it plays the role of an access-point. Any hardware setup including a low-cost computer with minimum RAM of 256 MB, aWiFi dongle that supports 2 SSIDs, and an SD-card with a light Linux flavor installed, canhost the uNaDa software. More details on the hardware setup can be found in D4.1 [4].Raspbian OS is selected since it is optimized for the Raspberry Pi hardware and includes

    thousands of packages and utilities, which ease development and optimize userexperience.

    The uNaDa software is a Java 7[6] Web application, which is packaged as a war file andis deployed in the Jetty Web server [13], running the social and overlay predictionalgorithms, and managing system's cache. The mitmproxy software [17] acts as thesystem's proxy, intercepting end-users' requests, caching watched videos and rewritingend-user requests when the requested video exists in the local cache. An additional Webserver, lighttpd [16], is used to serve cached contents to connected end-user devices,while h2 [15] is the system's database. Two additional services, hostapd and dhcpd, areinstalled to provide the 2 SSIDs and DHCP capabilities, so that Raspberry Pi can act as

    an access-point. On the contrary, the end-user entity is implemented as an Android [7]application, packaged as an apk file and is installed in any Android smartphone or tablet.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    13/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 13of191 Copyright 2015, the Members of the SmartenIT Consortium

    Figure 6: RB-HORST deployment diagram.

    Each uNaDa advertises and/or asks other overlay peers for content, location or othermetadata, using TomP2P [29] library, a distributed hash table which provides adecentralized key-value infrastructure for distributed applications. The Facebook[27] andVimeo [28] APIs are periodically queried over HTTP by the Social Monitor, aiming to

    retrieve and store social information. In addition, each uNaDa exposes a Web userinterface, accessible through any Web browser, where end-users can login with theirFacebook credentials, and manage their local cache and access-point. Finally, a RESTAPI is exposed and triggered by the RB-HORST Android application, used for end-users'authentication in remote uNaDas, which returns private SSID credentials using JSON.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    14/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 14of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    4 Implementation Framework

    The implementation framework of the SmartenIT project includes all required tools to

    design, develop, test and deploy the created software, and the necessary methods andsupport platforms to organize and support the implementation process. These tools areused by the SmartenIT implementation team to implement their respective components,as well as by prototype integrators to produce a coherent, integrated system. The initialimplementation framework was briefly described in D3.2 [2], mainly involving all therequired tools and technologies used in the DTM prototype development and release. Thischapter presents the final implementation framework for the two integrated and releasedprototypes, DTM and RB-HORST, including the tools used, and the final system treelayout and deployment instructions. Standalone mechanisms implementation frameworkwill be presented in their respective chapters.

    4.1 Tools

    The implementation framework tools consist of a specification language for designing theSmartenIT system, programming languages used to develop components, the librariesused to support the software development, the tool chain for compiling and building thesource code, the version control platform for archiving source code, the issue trackingsystem for organizing and planning the implementation work, as well as tracking andresolving found bugs and issues, the continuous integration server for automaticallybuilding systems components and the validation testbed created to validate eachreleases features and functionalities.

    4.1.1 Specification Language

    The SmartenIT system is designed and modeled using UML specification language. Asalso indicated in D3.2 [2], Microsoft Visio [5] is the key tool for the sequence, class,architecture and deployment diagrams presented throughout this document.

    4.1.2 Programming Languages

    The selected programming languages for the SmartenIT entities are presented in Table4-1.

    Table 4-1: Entities programming languages.

    Entity ProgrammingLanguage(s)

    Development Kit

    SBox Java Oracle JDK 1.7.0_51[6]

    SDN Controller Java Oracle JDK 1.7.0_51[6]

    uNaDa Java Oracle JDK 1.7.0_51[6]

    End-User Java Android SDK API 14[7]

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    15/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 15of191 Copyright 2015, the Members of the SmartenIT Consortium

    4.1.3 Libraries

    The external dependencies of each component are presented inTable 4-2.

    Table 4-2: Components libraries.

    Entity Component Libraries

    SBox

    Database

    sqlite-jdbc-3.7.2

    jdbi 2.53

    jackson-annotations 2.3.3

    Interfaces

    (Inter-SBox and SBox-SDN)

    netty 4.0.21.Final

    jackson-databind 2.2.3

    wiremock 1.46

    User Interface javax.servlet 3.0jsf-api, jsf-impl 2.2.6

    QoS Analyzer snmp4j 2.2.5

    Economic Analyzer commons-math3 3.0

    Network Traffic Manager netconf-java 1.0.1

    Commons

    slf4j 1.7.7

    logback 1.1.2

    commons-configuration 1.10

    commons-logging 1.1.3

    SDN

    Controller

    Floodlight

    org.restlet, org.restlet.ext.jackson, org.restlet.ext.simple,org.restlet.ext.slf4j 2.1-RC1

    org.simpleframework 4.1.21

    netty 3.2.6.Final

    args4j 2.0.16

    concurrentlinkedhashmap-lru 1.2

    jython-standalone 2.5.2

    libthrift 0.7.0

    easymock3.1jsonassert 1.2.3

    logback 1.0.0

    slf4j 1.6.4

    Interfacesjackson-databind 2.2.3

    jsonassert 1.2.3

    uNaDa

    Databaseh2 1.4.184

    jdbi 2.53

    User Interface

    javax.servlet 3.0

    jsf-api, jsf-impl 2.2.6

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    16/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 16of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    Social Monitor

    restfb 1.6.16

    httpclient 4.3.5

    simplelatlng RELEASE

    Overlay Manager

    tomp2p-all 5.0-Alpha24

    jackson-databind 2.2.3

    com.maxmind.geoip2 2.1.0

    Topology Proximity Monitor netty 4.0.21.Final

    Cache Manager vget 1.1.23

    uNaDa-end-user intefacejersey-media-json-jackson, jersey-test-framework-provider-jetty 2.12

    Commons

    slf4j 1.7.7

    logback 1.1.2

    commons-configuration 1.10

    commons-logging 1.1.3

    End-User App

    gson 2.3.1

    android 4.1.1.4

    facebook-sdk

    support-v4 r7

    4.1.4 Tool chain

    Apache Maven[8] is used as the dependency management and build automation tool forthe SmartenIT prototype, as also defined in D3.2 [2]. The projects system tree,dependencies and build/execution commands are presented in Section4.3.

    4.1.5 Testbed

    For the validation of both integration prototypes, the basic testbed design and extensionswere used. The initial design was defined in D3.2 [2] and further details on the basictestbeds design and configuration are provided in the D4.1[4].

    4.1.6 Version ControlApache Subversion [9] is used as the version control system of SmartenIT. TheSubversion server is hosted and administrated by PSNC.

    In addition to the internal SVN repository, the project consortium has setup a Github [10]account and created a Github repository, to host and release the projects source code asopen-source. The SmartenIT Github repository will be later presented in Section4.4 and isavailable at[39].

    4.1.7 Issue Tracking

    Atlassian Jira[11] is a software implementation management and issue-tracking tool, usedto organize and plan the work of developers and the integrator. The Atlassian Jira serveris hosted and administrated by PSNC.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    17/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 17of191 Copyright 2015, the Members of the SmartenIT Consortium

    4.1.8 Continuous Integration Server

    Jenkins[12] is a continuous integration tool, used to automatically and frequently build oursystem. The Jenkins server is hosted and administrated by PSNC.

    4.2 Procedures

    A set of common software prototype development procedures was defined and agreed onby the involved partners in order to assure a smooth and efficient prototype developmentprocess and successful delivery of software in incremental releases.

    This section includes information about the system release and development processes(both represented in form of cycles) implemented in the project. Project partners playedspecific roles in these processes. Specific types of meetings where organized throughoutthe development process.

    4.2.1 System Release Process

    The SmartenIT system release process followed the agile development model and wasdivided into (approximately) 2 month release cycles. Each release cycle (Figure 7)consisted of:

    Feature planning, where the consortium identified and prioritized features and tasksfor next release;

    Development of the required features by the responsible partners;

    Integration of the developed components and basic sanity tests;

    System validation, where the developed system was tested in the testbed for therequired release features;

    System release and preparation of system release report.

    Figure 7: System release cycle.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    18/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 18of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    4.2.2 Development Process

    The SmartenIT development process utilized the concept of continuous integration, inwhich developers commit frequently (daily if possible) their code, aiming to prevent

    integration problems and identify issues rapidly. This process was supported byautomated tools such as Jenkins (see Section4.1.8).

    The implementation process (Figure 8)comprised 4 phases:

    Developers write code and tests,

    Perform unit tests locally,

    If tests pass, then commit their code to the repository, and

    In case the build fails they are notified to fix the issue, otherwise continue theirdevelopment work.

    Figure 8: Development process.

    4.2.3 Roles

    A set of roles involved in the overall implementation process was decided that wouldsupport processes that are described above. Each role was assigned a list ofresponsibilities and responsible project partner. Those roles and related assignments are

    presented inTable 4-3.

    Table 4-3: Defined roles in the development process.

    Role ResponsibilitiesResponsible

    PartnerResponsible

    Person

    Product Manager Sets the high-levelrequirements and features ofeach release.

    ICOM Spiros Spirou

    Tools

    Administrator

    Manages and maintains

    implementation frameworktools.

    PSNC

    (&ICOM)

    Jakub Gutkowski

    ukasz opatowski

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    19/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 19of191 Copyright 2015, the Members of the SmartenIT Consortium

    Provides access to tools. George Petropoulos

    Release Master Facilitates the system releaseprocess.

    Contact point of theimplementation team.

    ICOM(&PSNC)

    George Petropoulos

    ukasz opatowski

    ImplementationTeam

    Consists of all the people,responsible for the design,development, integration,testing and deployment of theSmartenIT prototype.

    UZH, TUD,AGH, ICOM,ALBLF,PSNC

    As appointed byeach Partner.

    4.2.4 Meetings

    In each release cycle defined in Section 4.2.1, three types of the meetings took place:feature planning meeting, weekly meeting and release review meeting. For more detailsplease see Section 5.2.4 in D3.2[2].

    4.3 System tree layout

    D3.2 [2] presented the initial system tree layout of the SmartenIT source code, includingonly the DTM entities and components. This section will define the final system treelayout, including the RB-HORST entities and components.

    The SmartenIT source code is organized as a Maven[8] multi-module project. Each entity

    (sbox, sdn, unada, enduser, network, dist) is also a Maven multi-module project,which can be packaged as a single jar with the use of a certain maven plug-in (maven-assembly-plugin). Each entitys component (e.g. main, interfaces) is a Maven module,which may be divided into further maven modules or packages, based on componentowners preferences. In the defined system tree, certain components were divided intosub-modules to isolate developers work, as well as avoid possible dependenciesconflicts.

    The final SmartenIT system tree is presented below. Parentheses define the type ofpackaging, indicating whether a module either consists of other sub-modules (pompackaging), or is packaged as a (a) Java archive (jar), which aggregates all classes and

    configuration files into one single executable, (b) a Web application archive (war) whichcompresses all classes, Web pages, and resources into one executable which can bedeployed to any Web server, (c) an Android library (aar), (d) an Android archive (apk),which compresses all classes, resources and files, which can be installed in an Androiddevice.

    smartenit (pom)

    o sbox (pom)

    main (jar)

    interfaces (pom)

    inter-sbox (pom)

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    20/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 20of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    o client (jar)

    o server (jar)

    sbox-sdn (jar)

    db (pom)

    dao (jar)

    dto (jar)

    web (war)

    ntm (jar)

    qoa (jar)

    eca (jar)

    commons (jar)

    o sdn (pom)

    floodlight-0.90 (jar)

    interfaces (pom)

    sbox-sdn (jar)

    o unada (pom)

    interfaces (pom)

    unada-enduser (jar) db

    dao (jar)

    dto (jar)

    ctm (pom)

    cache (jar)

    tpm (jar)

    om (jar)

    sa (jar)

    web (war)

    sm (jar)

    commons (jar)

    o enduser (pom)

    app (pom)

    facebook (aar)

    SIT (apk)

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    21/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 21of191 Copyright 2015, the Members of the SmartenIT Consortium

    SIT-TEST (apk)

    o network (pom)

    o dist (pom)

    The system can be built with the use of the following command at the smartenit basedirectory:

    mvn clean install

    The aforementioned command, cleans all previously generated artifacts, compiles,packages and installs all modules, as well as runs all test cases. To avoid executing alltest cases, the user may execute the following command:

    mvn clean install -DskipTests

    All the aforementioned commands also generate the SmartenIT software release artifact,which is the smartenit-${project.version}.zip, created at the dist/targetdirectory.

    The final release which implements the two integrated and released prototypes, DTM andRB-HORST, the zip file contains the following executables and configuration files perentity:

    sbox

    o main.jar: The main executable of the SBox application, which initializes allmodules, and executes the DTM mechanism.

    o web.war: Its the war file, deployed to the Jetty Web server.o sbox.properties: It includes all the required SBox configuration

    parameters.

    o logback.xml: It defines the logging level of the SBox application.

    o realm.properties, jetty.xml: Configuration files that override defaultJetty configuration.

    sdn

    o floodlight-0.90.jar: The executable of the Floodlight SDN controller,extended with SmartenIT functionality.

    unada

    o unada.war: The executable of the uNaDa software, which is deployed inthe Jetty Web server and executes the RB-HORST mechanism.

    o unada.sh: A script that automatically starts the uNaDa processes.

    o vimeo_proxy.py: A script used during initialization of mitmproxy softwarefor proxying and filtering end-user requests.

    enduser:

    osit-app.apk

    : The HORST Android application, which will be deployed inan Android smartphone or tablet.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    22/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 22of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    4.4 Open-Sou rce releases

    The SmartenIT consortium has decided to release its major releases as open-source, inorder to be accessible by academic and research communities. For that purpose, a Github

    [10] account and a repository were created (see Figure 9), available at [39].The sourcecode is available under Apache v2 license[18].

    Figure 9: SmartenIT Github repository.

    Each time the integrated prototype was tested and internally released, the integrationteam was also pushing the source code to the Github repository. Therefore, releases 1.1,1.2, 2.1 and 3.0 were committed to the Github repository, while it is planned that finalversion 3.1 will be also released to the general public.

    4.5 Deployment Instru ct ion s

    This section will provide the instructions to deploy the DTM and RB-HORST executablesto the targeted hardware.

    The prerequisites to deploy and run the DTM executables are:

    Oracle JDK 7 update 51 (Configure JAVA_HOMEand PATH)[6],

    Jetty 9.2.3.v20140905 (Configure JETTY_HOMEand PATH)[13],

    Sqlite 3[14].To deploy and run the SBox entity, check the following instructions:

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    23/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 23of191 Copyright 2015, the Members of the SmartenIT Consortium

    1. Copy (and replace) the jetty.xml and realm.properties included in jetty-conf folder tothe $JETTY_HOME/etc directory: cp sbox/web/jetty-conf/jetty.xml$JETTY_HOME/etc/jetty.xml; cp sbox/web/jetty-conf/realm.properties $JETTY_HOME/etc/realm.properties

    2. Copy the provided sbox.war file to the $JETTY_HOME/webapps directory: cpsbox/web/sbox.war $JETTY_HOME/webapps/sbox.war

    3. Initialize jetty ($JETTY_HOME/ directory): java -jar start.jar --module=https

    4. Open a Web browser and browse at https:///sbox/admin orhttp://:8080/sbox/admin, where is theSBox's ip address (or localhost). Signin with admin/admincredentials.

    5. Edit the sbox.properties file with the correct path to the smartenit.db file, and therest of required parameters.

    6. To run the main SBox application: java -jar sbox.jar

    To deploy and run the SDN Controller:

    1. To run the extended SDN Controller: java -jar sdn.jar

    The prerequisite software to deploy and run the RB-HORST mechanism entities are:

    Oracle JDK 7 update 51 (Configure JAVA_HOMEand PATH)[6],

    Jetty 9.2.3.v20140905 (Configure JETTY_HOMEand PATH)[13],

    h2[15],

    lighttpd (Modify "server.document-root" of /etc/lighttpd/lighttpd.conf file to be equalto $HOME directory, e.g. server.document-root = "/home/pi")[16],

    mitmproxy (pip install mitmproxy)[17].

    To deploy and run the uNaDa entity:

    1. Copy vimeo_proxy.py to $HOME directory: cp vimeo_proxy.py~/vimeo_proxy.py

    2. Start the mitmproxy software ($HOME/ directory): mitmdump -T --host -svimeo_proxy.py

    3. Copy the unada.war to $JETTY_HOME/webapps/: cp unada.war$JETTY_HOME/webapps/unada.war

    4. Add a relevant iptables rule to proxy all HTTPs requests to the mitmproxy: sudoiptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 443 -jREDIRECT --to-port 8080

    5. Initialize Jetty ($JETTY_HOME/ directory): java -jar start.jaretc/jetty.xml -Djetty.port=8181

    6. uNaDa Web interface is available at: http://192.168.40.1:8181/unada. If you are theowner of the uNaDa you must login with your Facebook credentials.

    To install the end-user entity:1. Copy the sit-app.apkto the Android device, accept permissions and install it.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    24/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 24of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    5 The Dynamic Traffic Management (DTM) mechanism

    DTM is used to manage traffic exchanged between domains in which a Cloud or Data

    Center (DC) is located. It is deployed by network operators on servers on both sides of aninter-DC communication, since operators need to cooperate to achieve traffic transfer costreduction.

    DTM functionalities, as defined in Deliverable D2.4 [26], map onto two architectureentities, namely SBox and SDN Controller. Subsequent sections provide detaileddescriptions of the implemented software components being part of the respective entities.

    Moreover the DTM specification defines two types of ISP network elements which areinvolved in the network configuration which enables the DTM operations:

    Data center Attachment point (DA): A point (router or switch) where DC inboundand outbound traffic is passed to an ISP network;

    Border Router (BG): An ISP border router on which inter-domain links areterminated.

    These devices are configured accordingly to the DTM specification however no SmartenITsoftware is running on them.

    5.1 SBox

    SBox main functionalities comprise retrieving and aggregating SNMP measurements fromthe network entities, calculating and distributing compensation and reference vectors,

    delay-tolerant traffic management and finally, configuring the remote SDN Controller.It includes certain components that are required to store and access DTM parameters(Database and User Interface), retrieve and aggregate monitoring data from the networkdevices (Quality of Service Analyzer), perform necessary calculations (Network TrafficManager, Economic Analyzer) and also interact with remote SBoxes and the SDNController (Inter-SBox and SBox-SDN Communication Services).

    Each components functionality, interfaces, design and finally unit tests are furtherdescribed in the following sections.

    5.1.1 Quality of Service Analyzer

    The Quality of Service (QoS) Analyzer component is responsible for periodical executionof the following actions:

    collection of incoming traffic counter values from all inter-domain links from a set ofconfigured BG routers;

    collection of incoming traffic counter values from all tunnels from a set of configuredDA or BG routers (depending on which router given tunnel is terminated);

    calculation of link traffic vector (X vector) and a list of tunnel traffic vectors (Zvector) for each local AS;

    distribution of information about new traffic vectors to Economic Analyzer andNetwork Traffic Manager components;

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    25/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 25of191 Copyright 2015, the Members of the SmartenIT Consortium

    archiving of traffic statistics in form of a text file.

    The QoS Analyzer component supports two traffic charging rules defined in the system,namely the total traffic volume based rule and the 95th percentile rule. Certain rule can be

    enabled in the SBox user interface presented in Section5.1.7 on the DTM settings page.The above listed actions are executed at intervals specific to the used charging rule. In thecase of total traffic volume based rule, the calculation of vectors and the distribution ofinformation is performed at intervals defined by the length of the so called reportingperiod. When the latter rule is enabled two different intervals are used, i.e. DTM reportingperiod (X vector calculated and sent to NTM) and EA reporting period (X and Z vectorssent to EA).

    Counter values collection from network devices is performed by means of SNMP.

    In order to improve performance and ensure that counters from all routers are read almostexactly at the same moment, counters are read in multiple parallel threads (one thread perrouter).

    5.1.1.1 Int erfac es

    The QoS Analyzer does not provide any methods to be called by other SBox components.

    5.1.1.2 Desi gn

    The QoS Analyzer consists of 23 classes organized into two packages:

    eu.smartenit.sbox.qoamain package;

    eu.smartenit.sbox.qoa.experiment extension to the QoS Analyzercomponent added in order to support experimenters from WP4 with the ability tostore traffic statistics in form of a text file.

    Following is the description of the most important classes from the main package of QoSAnalyzer component (seeFigure 10). Please note that only public methods are listed.

    DTMQosAnalyzer: Main class of the QoS Analyzer component. Communicateswith Economic Analyzer (EconomicAnalyzer class) and Network Traffic Manager(DTMTrafficManager class).

    o public DTMQosAnalyzer(DTMTrafficManager trafficManager,

    EconomicAnalyzer economicAnalyzer): The constructor witharguments: instances of DTM external interface classes of Network TrafficManager and Economic Analyzer;

    o public void initialize(): Initializes SNMPTrafficCollector class andstarts scheduled traffic counters values collection tasks according toconfigured time schedule parameters;

    o public void updateXVector(XVector xVector): Updates NetworkTraffic Manager (DTMTrafficManager class) with link traffic vector calculatedafter reporting period (or DTM reporting period);

    o public void updateXZVectors(XVector xVector,

    List zVectors): Updates Economic Analyzer with link traffic

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    26/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 26of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    vector and a list of tunnel traffic vectors calculated after reporting period (orEA reporting period).

    SNMPTrafficCollector: Class used to schedule traffic counter collection tasks

    and calculating traffic vectors once all counters are read after each reporting period(or DTM reporting period). Calculated vectors are provided to DTMQosAnalyzer forfurther distribution.

    o public SNMPTrafficCollector(DTMQosAnalyzer analyzer): Theconstructor with argument: instance of the DTMQosAnalyzer which shouldbe updated with calculated traffic vectors;

    o public void configure(List systems,List communications): Populates helperdata structures with links and tunnels that will be monitored. Triggerscollection of SNMP OID numbers for links and tunnels counters;

    o public void scheduleMonitoringTasks(): Schedules countersvalues collection tasks according to configured time schedule parameters;

    o public void notifyNewCounterValues(int asNumber,CounterValues counterValues): Calls MonitoringDataProcessor tocalculate new link traffic vectors with data fetched from counters. UpdatesDTMQosAnalyzer with the new link and tunnel traffic vectors;

    o public MonitoredLinksInventory getMonitoredLinks(): Gettermethod for monitored links inventory;

    o public MonitoredTunnelsInventory getMonitoredTunnels():

    Getter method for monitored tunnels inventory.

    TrafficCollectorTask: Task class responsible for collecting counter valuesfrom BG and DA routers. Implements Runnableinterface.

    o public TrafficCollectorTask(SNMPTrafficCollectortrafficCollector, int asNumber): The constructor with arguments:instance of the SNMPTrafficCollector from which information aboutmonitored links and tunnels will be read and which will be notified once allcounters are read; and number of the AS for which this task is launched(relevant if SBox manages more than one AS);

    o public void run(): Method launched when thread is started.Responsible for fetching data from router counters and updatingSNMPTrafficCollector with collected data.

    CounterCollectorThread: Thread class responsible for collecting countervalues from specific interfaces of a given router. Implements Callableinterface.

    o public CounterCollectorThread(List links,List tunnels, BGRouter bgRouter): The constructorwith arguments to be used when monitoring a BG router;

    o public CounterCollectorThread(List tunnels,DARouter daRouter): The constructor with arguments to be used whenmonitoring a DA router;

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    27/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 27of191 Copyright 2015, the Members of the SmartenIT Consortium

    o public CounterValues call() throws Exception: Thread's mainmethod responsible for fetching data from counters on given router andupdating TrafficCollectorTask.

    SNMPWrapper: Wrapper class for the snmp4j library.o public String snmpGet(OID oid, Target target): Triggers

    snmpget command on given router specified by target argument andgiven OID (object identifier). Returns the response received from the SNMPagent;

    o public List snmpWalk(OID oid, Target target):Triggers snmpwalk command on given router specified by targetargument and given OID. Returns the response received from the SNMPagent;

    o public void startClient() throws IOException: Starts SNMPclient;

    o public void stopClient() throws IOException: Stops SNMPclient;

    o public Target prepareTarget(String routerAddress, StringsnmpCommunity): Prepares Target class instance with router address andSNMP community to be used in snmpGet and snmpWalk method calls;

    o public OID prepareOID(String oid): Prepares OID class instanceto be used in snmpGet and snmpWalk method calls.

    SNMPOIDCollector: Helper class for preparing SNMP OID numbers for link andtunnel counters.

    o public SNMPOIDCollector(MonitoredLinksInventory links,MonitoredTunnelsInventory tunnels): The constructor with twoarguments: links and tunnels to be monitored;

    o public void collectOIDsForLinks() throws IOException:Triggers OID information collection for all link counters from all BG routers;

    o public void collectOIDsForTunnels() throws IOException:Triggers OID information collection for all tunnel counters from all DA and

    BG routers.MonitoringDataProcessor: Used to handle monitoring data (i.e. countervalues) and calculating link traffic vector and tunnel traffic vectors by means ofXVectorCalculator class and ZVectorCalculator class, respectively.

    o public MonitoringDataProcessor(MonitoredLinksInventorymonitoredLinks, MonitoredTunnelsInventory

    monitoredTunnels): The constructor with two arguments: all monitoredlinks and tunnels;

    o public XVector calculateXVector(int asNumber,CounterValues lastValues, CounterValues newValues):

    Calculates link traffic vector by means of XVectorCalculator class based onprovided counter values for inter-domain links of given AS;

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    28/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 28of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    o public List calculateZVectors(int asNumber,CounterValues lastValues, CounterValues newValues):Calculates a list of tunnel traffic vectors by means of ZVectorCalculator classbased on counter values for tunnels in given AS.

    o public ZVector aggregateZVectors(List zVectors):Aggregates vector values from given tunnel traffic vectors and returns asingle Z vector.

    VectorCalculator: Base abstract class for traffic vector calculators comprisingdata structure used to store counter values from previous reporting periods.

    o protected CounterValues getOrCreateLatestVectorValues(int asNumber): Returns stored instance of CounterValues for given AS ifexists. If not, creates and returns new instance.

    XVectorCalculator: Implements link traffic vector calculation based on currentcounter values collected from links in given AS and previous values of thosecounters. Extends VectorCalculator class.

    o public XVector calculateXVector(int asNumber,CounterValues lastValues, CounterValues newValues): Methodcalculates new link traffic vector for given AS. It should be launched aftereach reporting period.

    ZVectorCalculator: Implements tunnel traffic vector calculation based oncurrent counter values collected from tunnels in given AS and previous values ofthose counters. Extends VectorCalculator class.

    o public ZVectorCalculator(MonitoredTunnelsInventorymonitoredTunnels): The constructor with all monitored tunnels as anargument;

    o public List calculateZVectors(int asNumber,CounterValues lastValues, CounterValues newValues): Methodcalculates new set of tunnel traffic vectors for given AS. Each ZVector classobject corresponds to a single DC2DCCommunication. It should be launchedafter each reporting period.

    CounterValues: Data container class used to store counter values (as 64bitnumbers) on per LinkID and per TunnelID basis.

    o public void storeCounterValue(LinkID linkID, longcounterValue): Stores counter value for given link in the structure;

    o public void storeCounterValue(TunnelID tunnelID, longcounterValue): Stores counter value for given tunnel in the structure;

    o public void addLinksAndTunnels(CounterValuescounterValues): Populates the local structure with provided links andtunnels counters data;

    o public void addCounterValue(LinkID linkID, longcounterValue): Adds counter value to existing entry in the structure or

    creates a new entry.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    29/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 29of191 Copyright 2015, the Members of the SmartenIT Consortium

    o public Map getLinkCounterValues(): Retrievescounter values for all links stored in the structure;

    o public Map getTunnelCounterValues():

    Retrieves counter values for all tunnels stored in the structure;o public Set getAllLinkIds(): Retrieves identifiers of all

    links stored in the structure;

    o public Set getAllTunnelsIds(): Retrieves identifiers ofall tunnels stored in the structure;

    o public Long getCounterValue(LinkID linkID): Retrieves 64-bitcounter value for given link from the structure;

    o public Long getCounterValue(TunnelID tunnelID): Retrieves 64-bit counter value for given tunnel from the structure.

    o public List toLocalVectorValues():Returns new list of LocalVectorValue based on stored counter values forlinks.

    MonitoredLinksInventory: Data container class used to store informationabout routers and monitored links on per AS number basis. Provides specific querymethods to retrieve information.

    o public void populate(List systems): Method to be called topopulate inventory with monitored link information that is obtained from list oflocal Autonomous Systems;

    o public List getLinks(int asNumber): Retrieves all inter-domain links for given local AS;

    o public List getLinks(BGRouter bgRouter): Retrieves alllinks from given BG router;

    o public List getBGRouters(): Retrieves all BG routersstored in the structure;

    o public List getBGRoutersByAsNumber(intasNumber): Retrieves all BG routers from given local AS;

    o public int getAsNumber(BGRouter bgRouter): Returns number ofthe AS to which given BG router belongs;

    o public Set getAllAsNumbers(): Returns numbers of alllocal ASs stored in the structure.

    MonitoredTunnelsInventory: Data container class used to store informationabout DA routers and monitored tunnels. Provides specific query methods toretrieve information.

    o public void populate(Listcommunications): Method to be called to populate inventory withmonitored tunnels information that is obtained from list of

    DC2DCCommunications terminated in local ASs.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    30/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 30of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    o public List getTunnels(int asNumber): Retrieves allmonitored tunnels from given local AS;

    o public Tunnel getTunnel(TunnelID tunnelID, int asNumber):

    Retrieves Tunnel instance for given TunnelID;o public List getTunnels(DARouter daRouter):

    Retrieves all monitored tunnels from given DA router;

    o public List getTunnels(BGRouter bgRouter):Retrieves all monitored tunnels from given BG router;

    o public List getTunnels(DC2DCCommunicationID id):Retrieves all tunnels from inter-DC communication with given identifier;

    o public List getDARouters(): Retrieves all DA routersstored in the inventory;

    o public List getDARoutersByAsNumber(intasNumber): Retrieves all DA routers from given local AS;

    o p. List getAllDC2DCCommunicationIDs(int asNumber): Retrieves identifiers of all inter-DC communicationsterminating in given local AS;

    o public Set getAllAsNumbers(): Retrieves numbers of alllocal ASs stored in the inventory.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    31/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 31of191 Copyright 2015, the Members of the SmartenIT Consortium

    Figure 10: Quality of Service Analyzer class diagram.

    The classes contained in the eu.smartenit.sbox.qoa.experimentpackage of QoSAnalyzer are described below (seeFigure 11):

    ExtendedSNMPTrafficCollector: Extends SNMPTrafficCollector class to

    enable writing traffic details to file.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    32/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 32of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    o public ExtendedSNMPTrafficCollector(DTMQosAnalyzeranalyzer): The constructor with arguments;

    o public boolean configure(List systems,

    List communications): Populates helperdata structures with links and tunnels that will be monitored. Triggerscollection of SNMP OID numbers for links and tunnels counters;

    o public void scheduleMonitoringTasks(): Schedules countersvalues collection task according to configured time schedule parameters;

    o public void notifyNewCounterValues(int asNumber,CounterValues counterValues): Calls MonitoringDataProcessor classto calculate new link traffic vectors with data fetched from counters. UpdatesDTMQosAnalyzer class with the new link and tunnel traffic vectors. Extendedto enable writing traffic details to file.

    ExtendedTrafficCollectorTask: Extends TrafficCollectorTask class toenable writing traffic details to file.

    o public void run(): Scheduled task responsible for fetching data fromrouter counters and updating SNMPTrafficCollector class with collected data.

    ExtendedCounterCollectorThread: Extends CounterCollectorThread class toenable writing traffic details to file.

    o public ExtendedCounterCollectorThread(List links,List tunnels, BGRouter bgRouter): The constructor witharguments to be used when monitoring BG router;

    o public ExtendedCounterCollectorThread(ListtunnelsByDARouter, DARouter daRouter): The constructor witharguments to be used when monitoring DA router.

    ExtendedCounterValues: Extends CounterValues class to enable writing trafficdetails to file.

    o public void storeReceivedPackets(LinkID linkID,ReceivedPackets packetsInfo): Method used to store the number ofreceived packets on link;

    o public void storeReceivedPackets(TunnelID tunnelID,

    ReceivedPackets packetsInfo): Method used to store the number ofreceived packets on tunnel;

    o public ExtendedCounterValues calculateDifference(ExtendedCounterValues toBeSubtracted): Method used tocalculate difference between stored and provided values for all links andtunnels;

    o pMap getLinkReceivedPackets():Returns map with number of packets for all links;

    o public Map

    getTunnelReceivedPackets(): Returns map with number of packets forall tunnels.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    33/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 33of191 Copyright 2015, the Members of the SmartenIT Consortium

    ReceivedPackets: Data container class used to store information about thenumber of three types of packets.

    o public ReceivedPackets(long unicast, long multicast,

    long broadcast): The constructor with arguments;o public long aggregate(): Method used to calculate packets sum;

    o public ReceivedPackets calculateDifference(ReceivedPackets toBeSubtracted): Method used to calculatedifference between stored and provided values;

    o public long getUnicast(): Returns amount of unicast packets;

    o public long getMulticast(): Returns amount of multicast packets;

    o public long getBroadcast(): Returns amount of broadcast packets.

    ExtendedSNMPOIDCollector: Extends SNMPOIDCollector class to enablewriting traffic details to file.

    o public ExtendedSNMPOIDCollector(MonitoredLinksInventorylinks, MonitoredTunnelsInventory tunnels): The constructorwith arguments.

    FileManager: File manager class created to enable writing traffic details to file.

    o public void updateFile(String path, String fileName,String newRecord): Method used to update file with new record.

    Figure 11: Class diagram for extension to Quality of Service Analyzer.

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    34/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 34of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    Sequence diagram in Figure 12 presents how the Quality of Service Analyzer interactswith other SBox components, i.e. the Economic Analyzer and Network Traffic Manager.After the TrafficCollectorTaskfinishes its execution, meaning that all counter valuesare read from monitored routers, it passes new counter values to theSNMPTrafficCollector which in turn instructs MonitoringDataProcessor tocalculate new X and Z vectors. Later on the QoSAnalyzer is used to pass informationabout those new vectors to proper EconomicAnalyzer and DTMTrafficManagerinstances.

    Figure 12: Quality of Service Analyzer sequence diagram.

    5.1.1.3 Tests

    In order to test the functionality of the Quality of Service Analyzer a set of 22 test classeswas implemented comprising JUnit [19] tests for not only particular single methods orgroup of methods but also simple workflows internal to QoS Analyzer component. Mockitolibrary[21] was used in several cases to mock components external to QoS Analyzer, e.g.Database, Economic Analyzer and Network Traffic Manager.

    The implemented test classes with test methods are listed below (please note that allprovided names of test methods are preceded with public voidin the source code):

    DTMQosAnalyzerTest contains test methods for DTMQosAnalyzer classworkflow launched after each reporting period including: new counter valuescollection from routers, traffic vectors calculation and Economic Analyzer andNetwork Traffic Manager updates:

    o shouldUpdateXAndZVectors()

    o shouldReturnFalseForInitialization()

    SNMPTrafficCollectorTest contains following test methods for

    SNMPTrafficCollector class:o shouldCalculatXVextor()

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    35/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 35of191 Copyright 2015, the Members of the SmartenIT Consortium

    o shouldCalculaZXVextors()

    o shouldUpdateXVector()

    o shouldUpdateZVectors()

    o shouldTriggerFiveScheduledTasks()

    o shouldPrepareLogForScheduleMonitoringTasks()

    o shouldPrepareErrorForAsNumbersValidation()

    o shouldCalculateInitialDelay()

    TrafficCollectorTaskTest contains following test method forTrafficCollectorTask class:

    o shouldNotifyNewCounterValues()

    TrafficCollectorTaskFailureScenarioTestcontains following test method

    for TrafficCollectorTask class:

    o shouldMaxFetchingTimeExpire()

    BGRouterCounterCollectorThreadTest contains following test methods forcollecting counter values from specific interfaces of BG routers:

    o shouldParseCounter()

    o shouldThrowExceptionForParseCounter()

    o shouldThrowExceptionBecauseOfLackOfBGRouter()

    o shouldThrowExceptionBecauseOfLackOfLinks()

    o shouldCalculateCounterValues()

    DARouterCounterCollectorThreadTest contains following test methods forcollecting counter values from specific interfaces of DA routers:

    o shouldParseCounter()

    o shouldThrowExceptionForParseCounter()

    o shouldThrowExceptionBecauseOfLackOfDARouter()

    o shouldThrowExceptionBecauseOfLackOfTunnels()

    o shouldCalculateCounterValues()

    SNMPWrapperTest contains following test methods for SNMP4J library wrapperclass named SNMPWrapper:

    o shouldThrowExceptionForTimedOutForSnmpget()

    o shouldThrowExceptionForNullResonseForSnmpget()

    o shouldThrowExceptionBecauseOfErrorForSnmpget()

    o shouldStarClient()

    o shouldStopClient()

    o shouldNotStopClient()

    o shouldPrepareTargetForTheAddressWithPort()

    o shouldThrowExceptionBecauseOfSnmpSendException()

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    36/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 36of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    o shouldThrowExceptionBecauseOfLackOfSnmpClient()

    SNMPOIDCollectorTestcontains following test methods for SNMPOIDCollectorclass:

    o shouldParseInterfaceNumber()

    o shouldSetOutboundInterfaceCounterOID()

    o shouldSetInboundInterfaceCounterOID()

    o shouldCollectOIDsForLinks()

    o shouldCollectOIDsForTunnels()

    o shouldThrowExceptionBecauseOfLackOfSnmpWalkResponse()

    o shouldThrowExceptionBecauseOfLackOfPhysicalInterfaceName()

    XVectorCalculationTestcontains following test methods for link traffic vectorcalculation logic implemented by XVectorCalculator class and triggered byMonitoringDataProcessor class:

    o shouldCalculateFirstXVector()

    o shouldCalculateSecondXVector()

    o shouldCalculateLaterXVector()

    o shouldCalculateXVectorEvenIfCounterValueIsLessThanZero()

    o shouldCalculateXVectorWithLastXVector()

    ZVectorCalculationTest contains following test methods for tunnel trafficvector calculation logic implemented by ZVectorCalculator class and triggered byMonitoringDataProcessor class:

    o shouldCalculateFirstZVectors()

    o shouldCalculateSecondRoundOfZVectors()

    o shouldCalculateZVectorsWithLastZVectors()

    ZVectorsAggregationTest contains following test method for Z vectoraggregation:

    o shouldAggregateZVectors()

    CounterValuesTest contains following test methods for store and get methodsof CounterValue class:

    o shouldStoreOneLinkAndTunnelEntry()

    o shouldStoreTwoEntries()

    o shouldReplaceOneOfTwoEntries()

    o shouldValidateTwoCounterValueInstancesAsEqual()

    o shouldAddCounterValueToExistingEntry()

    o shouldCreateNewEntryWhenAddingCounterValue()

    o shouldConverToListOfLocalVectorValues()

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    37/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 37of191 Copyright 2015, the Members of the SmartenIT Consortium

    MonitoredLinksInventoryTest contains following test method for populationand data retrieval methods of MonitoredLinksInventory data container class:

    o shouldPopulateInventory()

    MonitoredTunnelsInventoryTest contains following test methods forpopulation and data retrieval methods of MonitoredTunnelsInventory data containerclass:

    o shouldPopulateInventoryAndExecuteQueries()

    o shouldPopulateInventoryWithSomeTunnelsAtBGRouters()

    BGRouterTunnelTest contains following test method for tunnels terminated atBG routers:

    o shouldFetchDataForTunnels()

    QoaLogicTest contains following test method for analyzing Quality of ServiceAnalyzer component logic:

    o shouldSendProperXAndZVectors()

    SNMPTrafficCollectorSupportFor95thPercentileTest containsfollowing test method for 95th percentile charging rule:

    o shoulNotifyNewCounterValuesFor95thPercentile()

    ExtendedCounterValuesTest contains following test methods forExtendedCounterValues class:

    o shouldStoreOneLinkAndTunnelEntry()

    o shouldReplaceOneOfTwoEntries()

    o shouldCalculateDifference()

    FileManagerTest contains following test method for operations allowing fileupdates:

    o shouldCreateFile()

    LogToFileTest contains following test method for traffic details log generationand storage to file:

    o shouldLogToFile()

    LogToFileWithBGRouterTunnelsTest contains following test method fortraffic details log generation in case when tunnels are terminated at BG routers:

    o shouldLogToFile()

    TrafficDetailsWriteToFileTest contains following test method for trafficdetails log generation:

    o shouldWriteTrafficDetailsToFile()

    5.1.2 Network Traffic Manager

    The main functionalities provided by the Network Traffic Manager (NTM) can be groupedinto two sets. When NTM is running on SBox deployed in AS that receives data traffic

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    38/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 38of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    generated by one or multiple inter-DC communications, NTM provides the followingfunctionalities:

    periodically receives information about link traffic vectors from QoS Analyzer

    calculated after each reporting period and about reference vectors calculated byEconomic Analyzer after each accounting period;

    calculates a new compensation vector after each link traffic or reference vectorupdate using the algorithm specified in Section5.1.2.2.1;

    sends the compensation vector (with the reference vector after accounting period)to remote SBox instances that are deployed in ASs from which the received datatraffic originated;

    (if delay tolerant traffic management is enabled) at the beginning of new accountingperiod configures policers on the underlying BG routers with bandwidth limits for

    each link;when informed by the Economic Analyzer during an accounting period that onsome links the reference vector has been already achieved undertakes appropriateactions: calculates next compensation vectors according to the algorithm specifiedin Section 5.1.2.2.2 and (if delay tolerant traffic management is enabled)deactivates filters on given links on BG routers till the end of current accountingperiod.

    When considering SBox located at the data traffic sender end of an inter-DCcommunication, the NTM is responsible for:

    initial configuration of the underlying SDN controllers (by means of SBox-SDNClient) with information about tunnels established between local and remote DCs,corresponding DA router ports and remote DC prefixes;

    receive compensation and reference vectors from the Inter-SBox CommunicationService server and distributing them to the SDN controllers that will distribute theoutgoing traffic among all configured tunnels accordingly.

    The NTM component supports two traffic charging rules defined in the system, namely thetotal traffic volume based rule and the 95th percentile rule.

    In a general case, the SBox and therefore the NTM supports both ends of inter-DCcommunication since DCs in a local AS will most likely both receive and send traffic

    from/to remote ASs at the same time.

    5.1.2.1 Int erfac es

    The Network Traffic Manager provides in total 5 methods to be called by other SBoxcomponents. Three of them are implemented by DTMTrafficManager class:

    public void updateXVector(XVector xVector) throws

    IllegalArgumentException: Method called by QoS Analyzer to updateinformation about link traffic vector calculated every reporting period.

    o Input parameters:

    xVector: New link traffic vector

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    39/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 39of191 Copyright 2015, the Members of the SmartenIT Consortium

    o Thrown exceptions:

    IllegalArgumentException when given xVector argument is invalid

    public void updateRVector(LocalRVector rVector) throws

    IllegalArgumentException: Method called by Economic Analyzer to updateinformation about reference vector calculated every accounting period.

    o Input parameters:

    rVector: New reference vector

    o Thrown exceptions:

    IllegalArgumentException when given rVector argument is invalid

    public void updateLinksWithRVectorAchieved(int asNumber,

    List links) throws IllegalArgumentException: Method

    called by Economic Analyzer to update information about inter-domain links ingiven AS for which the reference vector has been already achieved in the currentaccounting period.

    o Input parameters:

    asNumber: Number of the AS to which provided links belong

    links: List of inter-domain links

    o Thrown exceptions:

    IllegalArgumentException when provided list is null or empty

    The remaining two interface methods are implemented byDTMRemoteVectorsReceiver class and are called by Inter-SBox CommunicationService server component.

    public void receive(CVector cVector) throws

    IllegalArgumentException: Method called to update information aboutcompensation vector calculated every reporting period in remote SBox.

    o Input parameters:

    cVector: Compensation vector calculated in remote SBox

    o Thrown exceptions:

    IllegalArgumentException when given cVector argument is invalid

    public void receive(CVector cVector, RVector rVector) throws

    IllegalArgumentException: Method called to update information aboutcompensation and reference vectors calculated every reporting and accountingperiod, respectively in remote SBox.

    o Input parameters:

    cVector: Compensation vector calculated in remote SBox

    rVector: Reference vector calculated in remote SBoxo Thrown exceptions:

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    40/191

    D3.4Prototype Implementation, Validationand Selected Application Seventh Framework STREP No. 317846

    Commercial in Confidence

    Page 40of191 Version 1.0 Copyright 2015, the Members of the SmartenITConsortium

    IllegalArgumentException when either of given vector arguments isinvalid

    5.1.2.2 Desi gnThe NTM component implementation consists of 25 classes. Its main functionalities fallinto two areas related with reacting on incoming traffic volumes by providing compensationand reference vectors to remote SBoxes and adapting BG routers configuration for delaytolerant traffic handling as well as outgoing traffic distribution by means of SDN based onreceived compensation and reference vectors. These functionalities are implemented bydisjoint sets of classes depicted inFigure 14 andFigure 19,respectively.

    InFigure 13 a top level view on the NTM design is presented with classes that are used byother components of the SBox:

    NetworkTrafficManager: Main class of the Network Traffic Manager

    component. Represents an entry point for the NTM component common for all theimplemented traffic management mechanisms. Manages the lifecycle of the majorNTM internal objects that implement traffic management mechanisms interfacesand logic.

    o public void initialize():Method that should be called in order toinitialize the NTM component (e.g. read required data from data base) indefault DTM mode.

    o public void initialize(NetworkTrafficManagerDTMModemode): Method that should be called in order to initialize the component inprovided NetworkTrafficManagerDTMMode mode.

    o public DTMTrafficManager getDtmTrafficManager():Returns aninstance of DTMTrafficManager class that should be used by QoS Analyzerand Economic Analyzer to provide updated vectors to DTM logicimplemented as part of the Network Traffic Manager.

    o public DTMRemoteVectorsReceiver getDtmVectorsReceiver():Returns an instance of DTMRemoteVectorsReceiver class that should beused by Inter-SBox Communication Service server to provide receivedremote vectors to DTM logic implemented as part of the Network TrafficManager.

    NetworkTrafficManagerDTMMode: Enumeration class that represents threeDTM running modes:

    o TRAFFIC_SENDER: DTM instance is run on SBox that manages AS(s) thatonly sends traffic to remote ASs. In this case some of the modules do notneed to be initialized.

    o TRAFFIC_RECEIVER: DTM instance is run on SBox that manages AS(s)that only receives traffic from remote ASs. In this case some of the modulesdo not need to be initialized.

    o TRAFFIC_SENDER_AND_RECEIVER: General case enabled by default.

    DTMTrafficManager: Implements DTM external interface methods that are usedby QoS Analyzer and Economic Analyzer to update information about link traffic

  • 7/24/2019 Deliverable D3.4 - Prototype Implementation, Validation and Selected Application Final Version

    41/191

    Seventh Framework STREP No. 317846 D3.4Prototype Implementation,Validation and Selected Application

    Commercial in Confidence

    Version 1.0 Page 41of191 Copyright 2015, the Members of the SmartenIT Consortium

    and reference vectors calculated every reporting and accounting period,respectively. Additionally Economic Analyzer may inform DTM that for some linksthe reference vector is already achieved in current accounting period what triggersappropriate operations.

    o public void initialize(): Method that should be invoked duringcomponent initialization to set initial values to control variables, populateinternal structures with data loaded from the Database as well as load adefault reference vector from file (if such exists).

    o public void updateXVector(XVector xVector) throwsIllegalArgumentException: DTM external interface method used toupdate information about link traffic vector calculated every reporting period.Traffic vector values are accumulated from the beginning of accountingperiod (reception of updated R vector). Triggers subsequent actions in a new

    thread.o public void updateRVector(LocalRVector rVector) throws

    IllegalArgumentException: DTM external interface method used toupdate information about reference vector calculated every accountingperiod. Link traffic vector value for given AS is reset. Also, if delay toleranttraffic management is enabled, policer limits are configured on BG routersfor the next accounting period. Triggers subsequent actions in a new thread.

    o public void updateLinksWithRVectorAchieved(int asNumber,List links) throws IllegalArgumentException: DTMexternal interface method used to update the list of inter-domain links for

    which the number of collected 95th percentile traffic samples with valuesless than the reference vector value calculated for that link is greater than95% of the number of all samples collected during a single accountingperiod. For those links any configured bandwidth limits should be disabled tillthe end of current accounting period since the reference vector is alreadyguaranteed to be achieved. Also compensation vector calculation algorithmis adapted to current situation.

    DTMRemoteVectorsReceiver: Implements DTM external interface methods thatare used by Inter-SBox Communication Service server side component to updateinformation about reference and compensation vectors calculated in remoteSBoxes.

    o public void initialize(): Method th


Top Related