Reactive and Event-Based Mail Processing Based on Reactivex

Total Page:16

File Type:pdf, Size:1020Kb

Reactive and Event-Based Mail Processing Based on Reactivex Submitted by Christoph Gerstberger BSc. Submitted at Institute for System Software Supervisor a.Univ.-Prof. Dipl.-Ing. Reactive and Dr. Herbert Pr¨ahofer Event-based Mail September 2020 Processing based on ReactiveX Master Thesis to obtain the academic degree of Diplom-Ingenieur in the Master’s Program Computer Science JOHANNES KEPLER UNIVERSITY LINZ Altenberger Straße 69 4040 Linz, Osterreich¨ www.jku.at DVR 0093696 Statutory Declaration i Statutory Declaration I declare that I have authored this thesis independently, that I have not used other than the declared sources / resources, and that I have explicitly marked all material which has been quoted either literally or by content from the used sources. Location, Date Signature Eidesstattliche Erklärung ii Eidesstattliche Erklärung Ich erkläre an Eides statt, dass ich die vorliegende Masterarbeit selbstständig und ohne fremde Hilfe verfasst, andere als die angegebenen Quellen und Hilfsmittel nicht benutzt bzw. die wörtlich oder sinngemäß entnommenen Stellen als solche kenntlich gemacht habe. Die vorliegende Masterarbeit ist mit dem elektronisch übermittelten Textdokument identisch. Ort, Datum Unterschrift Acknowledgement iii Acknowledgement I would like to express the deepest appreciation to Alexander Fried, the founder of Swilox, that he made this thesis possible. He was the one who provided the idea for this project and more important who funded this project. He also supported me with his knowledge about Vert.x and ReactiveX whenever I had questions. Without his financial support and technical expertise, the thesis would not exist. Many thanks for that! Many thanks also go to my supervisor Herbert Prähofer, who established the communication be- tween Alexander Fried and me. He also supported me in many questions regarding the written thesis and reactive streams. Abstract iv Abstract This thesis describes an implementation of a mail server based on a reactive and event-based ap- proach using the ReactiveX library. Reactive programming means asynchronous event processing. For an asynchronous task, a handler can be registered which is called when the computation is completed. Thus, reactive task handling is asynchronous and non-blocking. ReactiveX is a library and API that provides reactive streams as an approach for reactive programming. With reactive streams, event-based, asynchronous computations can be defined in a functional way as chains of function applications. This style of programming is used in this thesis to build a mail server. Instead of fully loading the mails and processing them at once, the mails are handled in a reactive way, allowing to process the mails in small chunks. A mail usually consists of many lines where each line contributes certain information to the mail. When a mail is processed reactively, each line can be analyzed individu- ally, processed immediately, and possibly passed to the next processing step. This can have great advantages in respect to performance and throughput. The mail server consists of multiple components and communication between components is exclu- sively through events. The mail lines are received by the Mail Receiver which passes them to the Mail Parser. There the lines are parsed and further passed to other operating blocks, like the Mail Forward and Mail Sender block, which forward a mail, or the Mail Storage block, which stores the mail in the database. Performance measurements show that a significant improvement has been achieved compared to a conventional thread-based server implementation. A first experiment tested how many clients are able to connect to the server and still keep the connection alive. The classic mail server approach could handle only ca. 1200 clients, whereas with the reactive mail server approach ca. 22 000 clients could be handled. In a further experiment, the number of messages that can be handled by the server was tested. On a machine with two CPU cores and 4GB of memory, the reactive server was able to handle ca. 10 000 messages in less than 2 minutes. The thesis project has been conducted in cooperation with the start-up Swilox. The goal of the system provided by Swilox is to simplify registration and login services in web shops as well as shop-customer communication. A special mail system is used in the Swilox system for supporting shop-customer communication. A reactive mail server was needed to replace the existing mail server in the Swilox system, which was implemented with conventional technology and did not fulfill the demanding performance requirements. The reactive mail system developed in this thesis work was able to fulfill the requirements and therefore has been integrated in the production version of the Swilox system in the meantime. Kurzfassung v Kurzfassung Diese Arbeit beschreibt die Entwicklung eines reaktiven und ereignisbasierten Mailservers unter Verwendung von ReactiveX. Reaktive Programmierung bedeutet asynchrone Ereignisverarbeitung. Für eine asynchrone Berechnung kann ein Handler registriert werden, der aufgerufen wird, wenn die Berechnung abgeschlossen ist. Somit ist die Berechnung asynchron und nicht blockierend. Reac- tiveX ist eine Bibliothek und API, die reaktive Streams als Ansatz für eine reaktive Programmierung zur Verfügung stellt. Mit reaktiven Streams können ereignisbasierte, asynchrone Funktionen zu Funktionsketten zusammengehängt werden. Diese Art der Programmierung wird in dieser Arbeit zum Aufbau eines Mailservers verwendet. Anstatt die Mails komplett zu laden und als Ganzes zu prozessieren, werden die Mails reaktiv be- handelt, so dass sie in kleinen Blöcken verarbeitet werden können. Eine Mail besteht in der Regel aus vielen Zeilen, wobei jede Zeile bestimmte Informationen zur Mail beiträgt. Wenn eine Mail reaktiv verarbeitet wird, kann jede Zeile einzeln analysiert, sofort verarbeitet und eventuell an den nächsten Verarbeitungsschritt übergeben werden. Dies kann große Vorteile im Hinblick auf Leistung und Durchsatz haben. Der Mailserver besteht aus mehreren Komponenten. Die Kommunikation zwischen den Kompo- nenten erfolgt ausschließlich über Ereignisse. Die Zeilen der Mail werden von der Mail-Receiver Komponente empfangen, der sie an die Mail-Parser Komponente weiterleitet. Dort werden die Zeilen analysiert und an weitere Komponenten übergeben, wie z.B. die Mail-Forward und Mail- Sender Komponente, die eine Mail weiterleiten oder die Mail-Storage Komponente, die die Mail in der Datenbank speichert. Leistungsmessungen zeigen, dass im Vergleich zu einer konventionellen Thread-basierten Server- Implementierung eine erhebliche Verbesserung erreicht wurde. In einem ersten Experiment wurde getestet, wie viele Clients in der Lage sind, sich mit dem Server zu verbinden und die Verbindung aufrechtzuerhalten. Der klassische Mailserver konnte nur ca. 1200 Clients behandeln, während mit dem reaktiven Mailserver ca. 22 000 Clients behandelt werden konnten. In einem weiteren Exper- iment wurde die Anzahl der Nachrichten getestet, die vom Server verarbeitet werden können. Auf einem Server mit zwei CPU-Kernen und 4 GB Speicher war der reaktive Server in der Lage ca. 10 000 Nachrichten in weniger als 2 Minuten zu verarbeiten. Diese Diplomarbeit wurde in Zusammenarbeit mit dem Start-up Swilox durchgeführt. Ziel des von Swilox angebotenen Systems ist es, den Registrierungs- und Loginvorgang in Webshops sowie die Shop-Kunden-Kommunikation zu vereinfachen. Zur Unterstützung der Shop-Kunden-Kommunikation wird im Swilox-System ein spezielles Mailsystem eingesetzt. Ein reaktiver Mailserver wurde benötigt, um den bestehenden Mailserver im Swilox-System zu ersetzen, der mit konventionellen Technologien implementiert wurde und die hohen Leistungsanforderungen nicht erfüllte. Das in dieser Diplomar- beit entwickelte reaktive Mailsystem konnte die Anforderungen erfüllen und wurde deshalb inzwis- chen in die Produktionsversion des Swilox-Systems integriert. Table of Contents vi Table of Contents 1 Introduction 1 1.1 Industrial Context . .1 1.2 Challenges . .2 1.3 Chapter Preview . .3 2 Use Cases 4 2.1 Mail from online shop to user (in Swilox App) . .4 2.2 Reply to a mail (in Swilox App) . .5 2.3 Forward mail to external user mail address . .6 2.3.1 Manual forward . .6 2.3.2 Automatic forward . .6 2.4 Reply to mail (from external mail server) . .7 3 Technologies 8 3.1 ReactiveX . .8 3.1.1 Observable . .9 3.1.2 Flowable . 10 3.1.3 Processor . 11 3.1.4 Maybe . 11 3.1.5 Completable . 12 3.1.6 Operators . 13 3.1.7 Observable vs. Iterable . 16 3.1.8 Hot and Cold Observables . 16 3.2 Eclipse Vert.x . 16 3.2.1 Concepts . 17 3.2.2 Example . 18 4 Mail Theory 19 4.1 SMTP . 19 4.2 Internet Message Format . 20 4.3 MIME Mail . 21 4.3.1 MIME Structure . 21 5 Architecture 24 6 Implementation 26 6.1 SMTP In . 26 6.2 MailParser . 27 6.2.1 Block hierarchy . 28 6.2.2 ReactiveStorage . 29 6.2.3 MimeLines . 30 6.2.4 Parsing Process . 31 6.3 MailStream . 34 6.4 MailStreamFactory . 37 6.5 Processing Steps . 38 6.5.1 Receive mail . 38 6.5.2 Forward mail . 42 Table of Contents vii 7 Extended Libraries 44 7.1 Vertx-Mail-Client . 44 8 Tests and Measurements 46 8.1 Reactivity Test . 46 8.2 Memory Test . 48 8.2.1 Blueglacier MIME Parser . 49 8.2.2 MailParser and MailStream . 49 8.2.3 MailParser and MailStream with deletion . 49 8.2.4 Results . 50 8.3 Connections Test . 51 8.3.1 Classic server . 51 8.3.2 Vert.x server . 53 8.4 Load Test . 55 8.4.1 Localhost . 57 8.4.2 Server to Server . 59 9 Conclusion 62 Literature 64 1 Introduction 1 1 Introduction Reactive and event-based mail processing represents a strategy for processing emails and their mail parts iteratively and non-blocking. Usually emails are sent to the server in one piece before they are further processed. With the reactive and event-based approach, the server is able to read single lines from the mail and process them immediately. Therefore, reading and processing is interleaved and there is less blocking time. The reactive and event-based approach provides key advantages.
Recommended publications
  • Working with Unreliable Observers Using Reactive Extensions
    Master thesis WORKING WITH UNRELIABLE OBSERVERS USING REACTIVE EXTENSIONS November 10, 2016 Dorus Peelen (s4167821) Computing science Radboud University [email protected] — Supervisors: Radboud University: Rinus Plasmeijer Aia Software: Jeroen ter Hofstede Contents 1 Introduction 5 1.1 Overview of thesis . .7 2 Background 8 2.1 Aia Software . .8 2.2 Current situation . .8 2.3 The use case . .9 2.3.1 Technical details . 10 2.3.2 Potential problems . 11 2.4 Problem description . 11 2.5 Desired Properties of the new system . 11 3 Overview of Rx 13 3.1 Basic Ideas of Rx . 13 3.2 Observer and Observable . 15 3.3 Hot vs Cold observables . 15 3.4 Marble diagrams . 16 3.5 Transformations on Event Streams . 16 3.6 Schedulers . 16 3.7 Control process in Rx . 17 3.8 Interactive vs reactive . 18 3.9 Push-back and backpressure . 18 3.10 Operators with unbounded Queue . 19 3.11 Explanation and example of different operators in Rx . 19 3.11.1 Select .................................. 19 3.11.2 SelectMany ............................... 20 3.11.3 Where .................................. 20 3.11.4 Delay .................................. 20 3.11.5 Merge and Concat ........................... 21 3.11.6 Buffer and Window ........................... 21 3.11.7 GroupBy ................................. 21 3.11.8 Amb .................................... 21 3.11.9 Debounce, Sample and Throttle ................... 22 3.11.10 ObserveOn ................................ 22 3.12 Related work . 22 3.12.1 TPL . 23 3.12.2 iTasks . 23 4 The experiment 25 4.1 Important properties . 25 4.2 Test architecture . 26 4.2.1 Design . 26 2 4.2.2 Concepts .
    [Show full text]
  • Third Party Software Component List: Targeted Use: Briefcam® Fulfillment of License Obligation for All Open Sources: Yes
    Third Party Software Component List: Targeted use: BriefCam® Fulfillment of license obligation for all open sources: Yes Name Link and Copyright Notices Where Available License Type OpenCV https://opencv.org/license.html 3-Clause Copyright (C) 2000-2019, Intel Corporation, all BSD rights reserved. Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. Copyright (C) 2009-2016, NVIDIA Corporation, all rights reserved. Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. Copyright (C) 2015-2016, OpenCV Foundation, all rights reserved. Copyright (C) 2015-2016, Itseez Inc., all rights reserved. Apache Logging http://logging.apache.org/log4cxx/license.html Apache Copyright © 1999-2012 Apache Software Foundation License V2 Google Test https://github.com/abseil/googletest/blob/master/google BSD* test/LICENSE Copyright 2008, Google Inc. SAML 2.0 component for https://github.com/jitbit/AspNetSaml/blob/master/LICEN MIT ASP.NET SE Copyright 2018 Jitbit LP Nvidia Video Codec https://github.com/lu-zero/nvidia-video- MIT codec/blob/master/LICENSE Copyright (c) 2016 NVIDIA Corporation FFMpeg 4 https://www.ffmpeg.org/legal.html LesserGPL FFmpeg is a trademark of Fabrice Bellard, originator v2.1 of the FFmpeg project 7zip.exe https://www.7-zip.org/license.txt LesserGPL 7-Zip Copyright (C) 1999-2019 Igor Pavlov v2.1/3- Clause BSD Infralution.Localization.Wp http://www.codeproject.com/info/cpol10.aspx CPOL f Copyright (C) 2018 Infralution Pty Ltd directShowlib .net https://github.com/pauldotknopf/DirectShow.NET/blob/ LesserGPL
    [Show full text]
  • An Opinionated Guide to Technology Frontiers
    TECHNOLOGY RADAR An opinionated guide to technology frontiers Volume 24 #TWTechRadar thoughtworks.com/radar The Technology Advisory Board (TAB) is a group of 20 senior technologists at Thoughtworks. The TAB meets twice a year face-to-face and biweekly by phone. Its primary role is to be an advisory group for Thoughtworks CTO, Contributors Rebecca Parsons. The Technology Radar is prepared by the The TAB acts as a broad body that can look at topics that affect technology and technologists at Thoughtworks. With the ongoing global pandemic, we Thoughtworks Technology Advisory Board once again created this volume of the Technology Radar via a virtual event. Rebecca Martin Fowler Bharani Birgitta Brandon Camilla Cassie Parsons (CTO) (Chief Scientist) Subramaniam Böckeler Byars Crispim Shum Erik Evan Fausto Hao Ian James Lakshminarasimhan Dörnenburg Bottcher de la Torre Xu Cartwright Lewis Sudarshan Mike Neal Perla Rachel Scott Shangqi Zhamak Mason Ford Villarreal Laycock Shaw Liu Dehghani TECHNOLOGY RADAR | 2 © Thoughtworks, Inc. All Rights Reserved. About the Radar Thoughtworkers are passionate about technology. We build it, research it, test it, open source it, write about it and constantly aim to improve it — for everyone. Our mission is to champion software excellence and revolutionize IT. We create and share the Thoughtworks Technology Radar in support of that mission. The Thoughtworks Technology Advisory Board, a group of senior technology leaders at Thoughtworks, creates the Radar. They meet regularly to discuss the global technology strategy for Thoughtworks and the technology trends that significantly impact our industry. The Radar captures the output of the Technology Advisory Board’s discussions in a format that provides value to a wide range of stakeholders, from developers to CTOs.
    [Show full text]
  • Front-End Development with ASP.NET Core, Angular, And
    Table of Contents COVER TITLE PAGE FOREWORD INTRODUCTION WHY WEB DEVELOPMENT REQUIRES POLYGLOT DEVELOPERS WHO THIS BOOK IS FOR WHAT THIS BOOK COVERS HOW THIS BOOK IS STRUCTURED WHAT YOU NEED TO USE THIS BOOK CONVENTIONS SOURCE CODE ERRATA 1 What’s New in ASP.NET Core MVC GETTING THE NAMES RIGHT A BRIEF HISTORY OF THE MICROSOFT .NET WEB STACK .NET CORE INTRODUCING ASP.NET CORE NEW FUNDAMENTAL FEATURES OF ASP.NET CORE AN OVERVIEW OF SOME ASP.NET CORE MIDDLEWARE ASP.NET CORE MVC SUMMARY 2 The Front‐End Developer Toolset ADDITIONAL LANGUAGES YOU HAVE TO KNOW JAVASCRIPT FRAMEWORKS CSS FRAMEWORKS PACKAGE MANAGERS TASK RUNNERS SUMMARY 3 Angular in a Nutshell ANGULAR CONCEPTS THE LANGUAGE OF ANGULAR SETTING UP AN ANGULAR PROJECT THE STRUCTURE OF AN ANGULAR APP DATA BINDING DIRECTIVES SERVICES AND DEPENDECY INJECTION MULTIPLE COMPONENTS INPUT AND OUTPUT PROPERTIES TALKING TO THE BACK END USING ANGULAR WITH ASP.NET MVC VISUAL STUDIO 2017 SUPPORT FOR ANGULAR SUMMARY 4 Bootstrap in a Nutshell INTRODUCTION TO BOOTSTRAP BOOTSTRAP STYLES COMPONENTS JAVASCRIPT CUSTOMIZING BOOTSTRAP WITH LESS BOOTSTRAP SUPPORT IN VISUAL STUDIO 2017 AND ASP.NET CORE SUMMARY 5 Managing Dependencies with NuGet and Bower GENERAL CONCEPTS NUGET NPM (NODE.JS PACKAGE MANAGER) BOWER SUMMARY 6 Building Your Application with Gulp and webpack WHAT FRONT‐END BUILD SYSTEMS ARE FOR A DEEPER LOOK AT GULP INTRODUCTION TO WEBPACK VISUAL STUDIO 2017 AND BUILD SYSTEMS SUMMARY 7 Deploying ASP.NET Core THE NEW HOSTING MODEL OF ASP.NET CORE INSTALLING ON INTERNET INFORMATION SERVICES ON PREMISE
    [Show full text]
  • Rxada: an Ada Implementation of the Reactivex API - 1 PREVIOUSLY, in ADA-EUROPE 2007
    RxAda: An Ada implementation of the ReactiveX API Alejandro R. Mosteo 2017-jun-13 2017-jun-13 - RxAda: An Ada implementation of the ReactiveX API - 1 PREVIOUSLY, IN ADA-EUROPE 2007... SANCTA: An Ada 2005 General-Purpose Architecture for Mobile Robotics Research 2017-jun-13 - RxAda: An Ada implementation of the ReactiveX API - 2 ABOUT ME Robotics, Perception, and Real-Time group (RoPeRT) http://robots.unizar.es/ Universidad de Zaragoza, Spain 2017-jun-13 - RxAda: An Ada implementation of the ReactiveX API - 3 CONTENTS • Motivation • What is ReactiveX – Language agnostic – Java – Ada • RxAda – Design challenges/decisions – Current implementation status – Future steps 2017-jun-13 - RxAda: An Ada implementation of the ReactiveX API - 4 PERSONAL MOTIVATION • Android development – Questionable design decisions for background tasks that interact with the GUI • Found RxJava – Simpler, saner way of doing multitasking – Documented comprehensively – Very active community in the Rx world • Achievable in Ada? – Aiming for the RxJava simplicity of use 2017-jun-13 - RxAda: An Ada implementation of the ReactiveX API - 5 EVENT-DRIVEN / ASYNCHRONOUS SYSTEMS <User drags map> ↓ Find nearby items ↓⌛ Request images ↓⌛↓⌛↓⌛↓⌛ Crop/Process image ↓⌛ Update GUI markers 2017-jun-13 - RxAda: An Ada implementation of the ReactiveX API - 6 OVERVIEW Event-driven systems ↓ Reactive Programming (philosophy) ↓ ReactiveX / Rx (specification) ↓ Rx.Net, RxJava, RxJS, RxC++, … ↓ RxAda 2017-jun-13 - RxAda: An Ada implementation of the ReactiveX API - 7 REACTIVE MANIFESTO (2014-sep-16
    [Show full text]
  • Coverity Static Analysis
    Coverity Static Analysis Quickly find and fix Overview critical security and Coverity® gives you the speed, ease of use, accuracy, industry standards compliance, and quality issues as you scalability that you need to develop high-quality, secure applications. Coverity identifies code critical software quality defects and security vulnerabilities in code as it’s written, early in the development process when it’s least costly and easiest to fix. Precise actionable remediation advice and context-specific eLearning help your developers understand how to fix their prioritized issues quickly, without having to become security experts. Coverity Benefits seamlessly integrates automated security testing into your CI/CD pipelines and supports your existing development tools and workflows. Choose where and how to do your • Get improved visibility into development: on-premises or in the cloud with the Polaris Software Integrity Platform™ security risk. Cross-product (SaaS), a highly scalable, cloud-based application security platform. Coverity supports 22 reporting provides a holistic, more languages and over 70 frameworks and templates. complete view of a project’s risk using best-in-class AppSec tools. Coverity includes Rapid Scan, a fast, lightweight static analysis engine optimized • Deployment flexibility. You for cloud-native applications and Infrastructure-as-Code (IaC). Rapid Scan runs decide which set of projects to do automatically, without additional configuration, with every Coverity scan and can also AppSec testing for: on-premises be run as part of full CI builds with conventional scan completion times. Rapid Scan can or in the cloud. also be deployed as a standalone scan engine in Code Sight™ or via the command line • Shift security testing left.
    [Show full text]
  • Santiago Quintero Pabón –
    LIX - École Polytechnique Palaiseau Santiago Quintero France Æ +33 (0) 7 67 39 73 30 Pabón Q [email protected] Contact Information Last Name: Quintero Pabón Given Name: Santiago Birth Date: 21-oct-1994 Nationality: Colombian Education Pontificia Universidad Javeriana Cali, CO + Five years B.Sc. Degree in Computer Science and Engineering, (equivalent to a master degree) 2012-2017 École Polytechnique Palaiseau, FR + PhD in Computer Sciences, Thesis: "Foundational approach to computation in today’s systems" 2018-Current Supervisors: Catuscia Palamidessi, Frank Valencia. Work Experience COMETE at LIX, École Polytechnique Palaiseau, FR + PhD Student 2018-Current AVISPA research group at Pontificia Universidad Javeriana Cali, CO + Research Assistant 2018 PORTAL ACTUALICESE.COM S.A.S. Cali, CO + Development Analyst 2017-2018 COMETE research group at Inria-Saclay Palaiseau, FR + Research Intern November 2017 Pontificia Universidad Javeriana Cali, CO + Teaching Assistant 2014-2016 Teaching Assistant....................................................................................................... Courses: Introduction to Programming, Programming Fundamentals and Structures, Logic in Computer Science, Computability and Formal Languages, Introduction to Systems Modeling. Major Projects............................................................................................................. + October 2015 - June 2016: ’Financial inclusion for the emerging middle class in Colombia’ Designed, prototyped and developed a financial
    [Show full text]
  • Rxpy Documentation Release 3.1.1
    RxPY Documentation Release 3.1.1 Dag Brattli Jul 16, 2020 CONTENTS 1 Installation 3 2 Rationale 5 3 Get Started 7 3.1 Operators and Chaining.........................................8 3.2 Custom operator.............................................9 3.3 Concurrency............................................... 10 4 Migration 15 4.1 Pipe Based Operator Chaining...................................... 15 4.2 Removal Of The Result Mapper..................................... 16 4.3 Scheduler Parameter In Create Operator................................. 16 4.4 Removal Of List Of Observables.................................... 17 4.5 Blocking Observable........................................... 17 4.6 Back-Pressure.............................................. 18 4.7 Time Is In Seconds............................................ 18 4.8 Packages Renamed............................................ 18 5 Operators 19 5.1 Creating Observables........................................... 19 5.2 Transforming Observables........................................ 19 5.3 Filtering Observables........................................... 20 5.4 Combining Observables......................................... 20 5.5 Error Handling.............................................. 20 5.6 Utility Operators............................................. 21 5.7 Conditional and Boolean Operators................................... 21 5.8 Mathematical and Aggregate Operators................................. 21 5.9 Connectable Observable Operators..................................
    [Show full text]
  • ASP.NET Core 2 and Angular 5
    www.EBooksWorld.ir ASP.NET Core 2 and Angular 5 Full-stack web development with .NET Core and Angular Valerio De Sanctis BIRMINGHAM - MUMBAI ASP.NET Core 2 and Angular 5 Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: November 2017 Production reference: 1221117 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78829-360-0 www.packtpub.com Credits Author Copy Editor Valerio De Sanctis Shaila Kusanale Reviewers Project Coordinator Ramchandra Vellanki Devanshi Doshi Juergen Gutsch Commissioning Editor Proofreader Ashwin Nair Safis Editing Acquisition Editor Indexer Reshma Raman Rekha Nair Content Development Editor Graphics Onkar Wani Jason Monteiro Technical Editor Production Coordinator Akhil Nair Aparna Bhagat About the Author Valerio De Sanctis is a skilled IT professional with over 12 years of experience in lead programming, web-based development, and project management using ASP.NET, PHP, and Java.
    [Show full text]
  • Learning Objectives in This Part of the Module
    Applying Key Methods in the Single Class (Part 3) Douglas C. Schmidt [email protected] www.dre.vanderbilt.edu/~schmidt Professor of Computer Science Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA Learning Objectives in this Part of the Lesson • Recognize key methods in the Random random = new Random(); Single class & how they are applied in the case studies Single<BigFraction> m1 = makeBigFraction(random); • Case study ex1 Single<BigFraction> m2 = • Case study ex2 makeBigFraction(random); • Case study ex3 return m1 .zipWith(m2, return Single BigFraction::add) .just(BigFractionUtils .makeBigFraction(...) .doOnSuccess .multiply(sBigReducedFrac)) (mixedFractionPrinter) .subscribeOn .then(); (Schedulers.parallel()); See github.com/douglascraigschmidt/LiveLessons/tree/master/Reactive/Single/ex32 Applying Key Methods in the Single Class in ex3 3 Applying Key Methods in the Single Class in ex3 • ex3 shows how to apply RxJava Random random = new Random(); features asynchronously to perform various Single operations Single<BigFraction> m1 = makeBigFraction(random); • e.g., subscribeOn(), doOnSuccess(), Single<BigFraction> m2 = ignoreElement(), just(), zipWith(), & makeBigFraction(random); Schedulers.computation() return m1 return Single .zipWith(m2, .just(BigFractionUtils BigFraction::add) .makeBigFraction(...) .multiply(sReducedFrac)) .doOnSuccess .doOnSuccess(fractionPrinter) (mixedFractionPrinter) .subscribeOn (Schedulers.computation()); .ignoreElement(); See github.com/douglascraigschmidt/LiveLessons/tree/master/Reactive/Single/ex34
    [Show full text]
  • Interactive Development Environment for Probabilistic Programming
    Maria I. Gorinova Interactive Development Environment for Probabilistic Programming Computer Science Tripos, Part II Clare College May 14, 2015 Proforma Name and College: Maria I. Gorinova, Clare College Project Title: Interactive Development Environment for Probabilistic Programming Examination: Computer Science Tripos Part II, 2015 Word Count: 119021 Project Originator: Alan Blackwell and Advait Sarkar Supervisor: Advait Sarkar Original Aims of the Project To implement an interactive development environment, which allows the pro- grammer to use the probabilistic programming framework Infer.NET. The en- vironment must support visualisations of the graphical models described by the source code, as well as of the probability density functions of random variables that have been declared. In addition, the environment must be live, meaning it provides run-time feedback about the execution of the source code. Update must be edit-triggered, meaning that re-compilation occurs when the code is changed, without the compiler having to be explicitly invoked by the user. Work Completed The work outlined in the original project proposal was successfully implemented, resulting in an IDE which meets all success criteria. In addition, several small features such as text highlighting and code navigation were added to the user interface. A user study was conducted to evaluate the usability of the software. The environment proves to significantly improve users' experience by reducing the probabilistic programming tasks completion time and the level of confusion
    [Show full text]
  • Reactive Stream Processing for Data-Centric Publish/Subscribe
    Reactive Stream Processing for Data-centric Publish/Subscribe Shweta Khare, Kyoungho An, Aniruddha Gokhale Sumant Tambe, Ashish Meena Dept of EECS, Vanderbilt University Real-Time Innovations Nashville, TN 37212, USA Sunnyvale, CA 94089, USA {shweta.p.khare,kyoungho.an,a.gokhale}@vanderbilt.edu {sumant,ashish}@rti.com ABSTRACT 1. INTRODUCTION The Internet of Things (IoT) paradigm has given rise to The Internet of Things (IoT) is a significant expansion of a new class of applications wherein complex data analytics the Internet to include physical devices; thereby bridging the must be performed in real-time on large volumes of fast- divide between the physical world and cyberspace. These moving and heterogeneous sensor-generated data. Such data devices or \things" are uniquely identifiable, fitted with sen- streams are often unbounded and must be processed in a sors and actuators, which enable them to gather informa- distributed and parallel manner to ensure timely process- tion about their environment and respond intelligently [8]. ing and delivery to interested subscribers. Dataflow archi- The Industrial IoT (IIoT){distinct from consumer IoT{will tectures based on event-based design have served well in help realize critical infrastructures, such as smart-grids, in- such applications because events support asynchrony, loose telligent transportation systems, advanced manufacturing, coupling, and helps build resilient, responsive and scalable health-care tele-monitoring, etc. Industrial IoT are also applications. However, a unified programming model for called Cyber-Physical Systems (CPSs). They share sev- event processing and distribution that can naturally com- eral key cross-cutting aspects. First, they are often large- pose the processing stages in a dataflow while exploiting the scale, distributed systems comprising several, potentially inherent parallelism available in the environment and com- mobile, publishers of information that produce large volumes putation is still lacking.
    [Show full text]