Network Protocol Tutorial

Total Page:16

File Type:pdf, Size:1020Kb

Network Protocol Tutorial Network Protocol Tutorial Target: Lightstreamer Generic Client Protocol v. 6.0.1 Last updated: 04/02/2015 Table of contents 1 INTRODUCTION................................................................................................................4 2 GENERAL WORKFLOW.........................................................................................................5 2.1 HTTP Requests................................................................................................5 2.1.1 HTTP vs. HTTPS...............................................................................................5 2.1.2 GET method vs. POST method..........................................................................5 2.1.3 Lightstreamer Server behind a Load Balancer.....................................................5 2.2 Subscriptions and unsubscriptions.....................................................................6 2.3 Stream Connection, Control Connections and Polling connections........................6 2.4 Data reception workflows.................................................................................7 2.4.1 Basic workflow.................................................................................................7 2.4.2 Double subscription..........................................................................................8 2.4.3 Field schema change........................................................................................9 2.5 Content-Length management..........................................................................10 2.6 External Snapshots.........................................................................................12 3 SUBSCRIPTION MANAGEMENT..............................................................................................15 3.1 Basic concepts...............................................................................................15 4 THE TEXT MODE PROTOCOL...............................................................................................16 4.1 Creating the Stream Connection......................................................................16 4.2 Binding to an existing Session.........................................................................18 4.3 Control connections........................................................................................20 4.3.1 Subscription Control Connections.....................................................................20 4.3.2 Item Groups and Field Schemas......................................................................22 4.3.3 Subscription reconfiguration Control Connections.............................................23 4.3.4 Session constraints Control Connections..........................................................23 4.3.5 Asynchronous request for session rebind Control Connections...........................24 4.3.6 Session asynchronous destroy Control Connections..........................................25 4.3.7 Batching of Control Requests..........................................................................25 4.4 Sending Messages..........................................................................................26 4.4.1 Synchronous version.......................................................................................26 4.4.2 Asynchronous version.....................................................................................26 4.5 Push Contents................................................................................................28 4.5.1 Update messages...........................................................................................28 4.5.2 End-of-Snapshot messages.............................................................................30 4.5.3 Overflow messages........................................................................................30 4.5.4 Asynchronous Send Message outcome messages.............................................30 4.5.5 Probe messages.............................................................................................31 4.5.6 End messages................................................................................................31 4.5.7 Loop messages..............................................................................................32 - 2 - 4.5.8 Push error messages......................................................................................32 5 TESTS AND EXAMPLES......................................................................................................33 5.1 Test environment...........................................................................................33 5.2 Table (i.e. Subscription) management..............................................................34 5.2.1 Basic workflow...............................................................................................35 5.2.2 Double subscription........................................................................................36 5.2.3 Field schema change......................................................................................38 5.2.4 Snapshot synchronization...............................................................................40 5.2.5 Multiple subscriptions of the same item...........................................................42 - 3 - 1 Introduction If you use a Client Library (e.g. SDK for JavaScript Clients, SDK for .NET Clients, etc.) to develop a Lightstreamer Client, then you don’t need to read this document. This document specifies the Lightstreamer network protocol that can be used to implement Lightstreamer Client at socket level. The described protocol is supported by the current version of Lightstreamer Server; see the SDK compatibility notes. Any older versions of the protocol are still supported; they should be considered as deprecated and are not included here. In order to receive realtime updates from Lightstreamer Server, a Lightstreamer Client should open an HTTP/HTTPS connection (called stream connection), through which it authenticates and waits for incoming realtime updates. The Lightstreamer Client could eventually open other HTTP/HTTPS connections (called control connections) through which it sends commands to the server in order to manage the contents of the stream connection (see section 2.3, Stream Connection, Control Connections). Basically, there are two different communication protocols that a client can use in order to communicate with Lightstreamer Server: The JavaScript mode, where realtime updates are packed into JavaScript commands (used by HTML Web clients and, in general, clients based on the JavaScript Client Library). The Text mode, where realtime updates are packed in a simple pipe-separated text protocol (usually used by application clients). The topic of this document is the Lightstreamer Server Text mode protocol. It will also be explained the general data subscription/unsubscription/reception workflow. - 4 - 2 General workflow In this chapter we will provide a quick overview of the general Lightstreamer Server behaviour, in order to give the reader the basic understanding of how the server works. 2.1 HTTP Requests All the requests that a client sends to Lightstreamer Server use the HTTP protocol over TCP. Lightstreamer Server also supports HTTP over SSL connections (HTTPS connections). There are two different HTTP methods that can be used for the requests to the server: the GET method and the POST method. In a production environment, a cluster of Lightstreamer Server can be placed behind a Load Balancer. All these cases will be discussed in this section. 2.1.1 HTTP vs. HTTPS The client developer has to choose between when normal HTTP connections should be used and when to use secure HTTP (HTTPS) connections; it is recommended to use the following policy: HTTPS should be used for stream connections when realtime data should be encrypted or the user authentication has critical security issues, because on these kinds of connections all user identification data (from the client to the server) and market data (from the server to the client) are sent. Otherwise HTTP is suitable for stream connections. HTTP should be used for control connections, because with these connections no sensitive data are sent. In this case it is possible to avoid the SSL server-side and client-side encryption and consequently optimize system performance. 2.1.2 GET method vs. POST method There are two different HTTP methods that can be used for requests: the GET method and the POST method. As a general rule, requests to Lightstreamer Server cause side effects on the Server behaviour, thus, according to HTTP specifications, they should always be issued through the POST method. This also avoids any issue with querystring length limits and is compliant with the Web Services standards. For testing purposes, however, it may be far easier to use the GET method. For instance, this would allow you to issue manual requests through the “telnet” utility without being annoyed by the content-length requirements. This would also allow you to issue manual requests through a browser address bar. Using the GET method, though not strictly compliant with HTTP specifications, will, in general, work as well. Just ensure that the user agent and any intermediate node don't try to leverage the properties of the HTTP GET method to issue duplicated requests, for any reason. 2.1.3 Lightstreamer Server behind a Load Balancer Every Lightstreamer Server maintains a
Recommended publications
  • Online User's Guide MFC-J775DW
    Online User's Guide MFC-J775DW © 2017 Brother Industries, Ltd. All rights reserved. Home > Table of Contents Table of Contents Before You Use Your Brother Machine ............................................................................................... 1 Applicable Models .......................................................................................................................................... 2 Definitions of Notes ........................................................................................................................................ 3 Notice - Disclaimer of Warranties (USA and Canada) ................................................................................... 4 Trademarks .................................................................................................................................................... 5 Important Note ............................................................................................................................................... 6 Introduction to Your Brother Machine................................................................................................. 7 Before Using Your Machine ........................................................................................................................... 8 Control Panel Overview ................................................................................................................................. 9 LCD Overview .............................................................................................................................................
    [Show full text]
  • Opera Mini Application for Android
    Opera Mini Application For Android Wat theologized his eternities goggling deathy, but quick-frozen Mohammed never hammer so unshakably. Fain and neverfringillid headline Tyrone sonever lambently. reapplied his proles! Tracie meows his bibulousness underdevelop someplace, but unrimed Ephrayim This application lies in early on this one knows of applications stored securely for example by that? Viber account to provide only be deactivated since then. Opera Mini is a super lightweight browser that loads web pages faster than what every other browser available. Opera Mini Browser Latest News Photos Videos on Opera. The Opera Mini for Android lets you do everything you any to online without wasting your fireplace plan It's stand fast safe mobile web browser that saves you tons of. Analysis of tomorrow with a few other. The mini application for opera android open multiple devices. Just with our site on a view flash drives against sim swap scammers? Thanks for better alternative software included in multitasking is passionate about how do you can browse, including sms charges may not part of mail and features. Other download option for opera mini Hospedajes Mirta. Activating it for you are you want. Opera mini 16 beta android app has a now released and before downloading the read or full review covering all the features here. It only you sign into your web page title is better your computer. The Opera Mini works the tender as tide original Opera for Android This app update features a similar appearance and functionality but thrive now displays Facebook. With google pixel exclusive skin smoothing makeover tool uses of your computer in total, control a light.
    [Show full text]
  • Erad Web Viewer
    eRAD Web Viewer Two View Modes Series View Mode Shows all the series within the study. Click on a series to display the images within that series in Series View Mode Image View Mode. Image View Mode Shows a single image at a time. Manipulate The Houston MRI eRAD image using location-sensitive controls. Click Web Viewer displays in the upper corners of the image to return to Series View Mode. images in a web browser. Basic tools are available to Image View Mode manipulate images including scrolling, window/ Toolbar Controls level, magnification, cross TOOLBAR sectional references, and linear measurements. View Report Toggle Pop-Up Help Close Click Icon Click Icon Click Icon Most features are Double-click the Help Icon to turn on/off pop-up help that “location-sensitive”— automatically shows available available only when you features where ever you hover click or drag on specific the cursor. edges or areas of the viewer. Image Area Controls Pan Zoom Window Level IMAGE AREA Click+Drag Left & Right- Right-Click + Drag Click + Drag Scroll Reset Image Invert Window Scroll Wheel or Double-Click Level Middle-Click + Drag Right-Double- Click Ruler Controls Place Endpoint Reset Ruler Quick Measure Click+Drag Terminal Double-Click Ruler Click Ruler, then Click + Drag RULER AT BOTTOM Portal Support © 2018 DRH & Assoc., Inc. www.HoustonMRI.com doctorportal.houstonmri.com All Rights Reserved. [email protected] November 2018 713.425.8100 eRAD Web Viewer Image View Mode: Edge and Corner Controls Return to Series Mode Rotate Flip Return to Series Mode Click Click+Drag Double-Click Click CORNER TOP EDGE CORNER Previous Series Next Series LEFT EDGE LEFT Click Click Scroll Scroll Click+Drag Click+Drag RIGHT EDGE RIGHT Flip Flip Double-Click Double-Click CORNER BOTTOM EDGE CORNER Show/Hide Localizer Select Localizer Rotate Flip Show/Hide Localizer Select Localizer Double-Click Click Click+Drag Double-Click Double-Click Click Browser Requirements The Web Viewer requires support for HTML5, WebGL, websockets and other web protocols.
    [Show full text]
  • Rapid Application Evolution and Integration Through Document Metamorphosis
    Rapid Application Evolution and Integration Through Document Metamorphosis Paul M. Aoki Ian E. Smith James D. Thornton Xerox Palo Alto Research Center 3333 Coyote Hill Road Palo Alto, CA 94304-1314 USA Abstract (J2EE) provides the JDBC and Enterprise JavaBeans (EJB) APIs for database access and the Java Message The Harland document management system Service (JMS) API for message queuing.1 Applications implements a data model in which document can use reliable storage and queuing as a means of (object) structure can be altered by mixin-style decoupling data producers from data consumers [37]. By multiple inheritance at any time. This kind of adding a layer of indirection, decoupling often contributes structural fluidity has long been supported by to both modularity and scalability. knowledge-base management systems, but its use Frameworks like J2EE, however, provide quite has primarily been in support of reasoning and distinct facilities for the communication of messages and inference. In this paper, we report our the general management of persistent data for an experiences building and supporting several non- application, despite the fact that messages will often trivial applications on top of this data model. concern and revolve around significant persistent data. Based on these experiences, we argue that They do not provide the flexibility to allow persistent structural fluidity is convenient for data-intensive records of application objects themselves to be the applications other than knowledge-base communication vehicles within decoupled applications. management. Specifically, we suggest that this In fact, many frameworks do not make any decoupling of flexible data model is a natural fit for the parts of applications convenient because they do not decoupled programming methodology that arises provide useful structuring facilities for (e.g.) message naturally when using enterprise component headers and metadata.
    [Show full text]
  • Using Properties for Uniform Interaction in the Presto Document System
    Using Properties for Uniform Interaction in the Presto Document System Paul Dourish, W. Keith Edwards, Anthony LaMarca and Michael Salisbury Computer Science Laboratory Xerox Palo Alto Research Center 3333 Coyote Hill Road Palo Alto CA 94304 USA {dourish,kedwards,lamarca,salisbury}@parc.xerox.com ABSTRACT riences reported by Marshall and Rogers [12] exploring the Most document or information management systems rely on use of structured hypertext systems, who also found that the hierarchies to organise documents (e.g. files, email messages rigid structures they offered were poorly suited to the more or web bookmarks). However, the rigid structures of hierar- fluid and informal ways in which people organised chical schemes do not mesh well with the more fluid nature information. of everyday document practices. This paper describes Our work explores opportunities for moving away from this Presto, a prototype system that allows users to organise their rigid approach. This paper describes ongoing research we are documents entirely in terms of the properties those docu- ments hold for users. Properties provide a uniform conducting into a new approach to document management that aims to provide users with new ways of organising, mechanism for managing, coding, searching, retrieving and structuring, managing and interacting with document collec- interacting with documents. We concentrate in particular on tions, while none the less retaining the level of integration the challenges that property-based approaches present and with file-based platforms that we all need to work in our the architecture we have developed to tackle them. everyday computational environments. Keywords Placeless Documents Document management, document properties, document The work reported here has been carried out under the aus- interfaces, interaction models.
    [Show full text]
  • A Technical Reference for the PRESTO Protocol
    PRotocole d’Echanges Standard et Ouvert A Technical Reference for the PRESTO protocol A Technical Reference for the PRESTO protocol Version 1.0 Working Draft Date: 2006/06/27 Abstract The “PRotocole d’Echanges Standard et Ouvert” 1.0 (aka PRESTO) specification consists of a set a Web services specifications, along with clarifications, amendments, and restrictions of those specifications that promote interoperability. This document provides a technical reference for the mechanisms implemented in the PRESTO protocol and the schemas employed by that profile. This document is intended to be read alongside the PRESTO Guide [PRESTO-Guide ] which provides a non-normative description of the overall PRESTO message exchanges model. Status of this document This document is version 1 the protocol based on the discussions held within the DGME- SDAE Working Group. Complementary features may be discussed in further work and a new version of the protocol may supersede the current version. Version 1.0 Page 1 of 33 PRotocole d’Echanges Standard et Ouvert A Technical Reference for the PRESTO protocol Notice This document is intended for architects, project leaders or any people that need to get a complete technical definition of PRESTO. People who read this document are supposed to be familiar with Web Service technology. Copyright © 2006 DGME – Ministère des Finances, 139 rue de Bercy, 75572 Paris cedex 12 France. Copy, diffusion without modification of PRESTO specifications is authorized. Modifications are not authorized. Version 1.0 Page 2 of 33 PRotocole d’Echanges Standard et Ouvert A Technical Reference for the PRESTO protocol Table of Contents 1. Introduction 1.1.
    [Show full text]
  • Adaptive Mobile Web Pages Using HTML5 and CSS for Engineering Faculty
    ASEE-NMWSC2013-0057 Adaptive Mobile Web Pages Using HTML5 and CSS for Engineering Faculty Wen-Chen Hu Naima Kaabouch Department of Computer Science Department of Electrical Engineering University of North Dakota University of North Dakota Grand Forks, ND 58202-9015 Grand Forks, ND 58202-7165 [email protected] [email protected] Hung-Jen Yang Hongyu Guo Department of Industrial Department of Computer Science Technology Education University of Houston – Victoria National Kaohsiung Normal Victoria, TX 77901 University [email protected] Kaohsiung City, Taiwan 80201 [email protected] Abstract Many engineering faculty members have their class materials like lecture slides and assignments posted on the Internet, so students can easily access them anytime. Nowadays students also like to access the online class materials anywhere via their mobile devices such as smartphones or tablet computers. However, traditional Web pages are distorted or become awkward to use when they are displayed on devices. Additionally, mobile features of handheld devices such as geolocation information, which could be useful for engineering education, are usually ignored. The introduction of HTML5 and the newest CSS have greatly solved this problem. This paper introduces the mobile features of HTML5 and CSS to engineering faculty for building adaptive mobile class Web pages. Introduction Using Web to deliver engineering education has been a trend. Many engineering students are used to do various things on the Web, e.g., printing class slides and assignments, checking the class announcements, posting questions, interactively discussing issues with fellow students, etc. On the other hand, IDC, a market research firm, predicted that more users would access the Internet wirelessly via a mobile device compared to the users using wired connection by 20154.
    [Show full text]
  • Presto: the Definitive Guide
    Presto The Definitive Guide SQL at Any Scale, on Any Storage, in Any Environment Compliments of Matt Fuller, Manfred Moser & Martin Traverso Virtual Book Tour Starburst presents Presto: The Definitive Guide Register Now! Starburst is hosting a virtual book tour series where attendees will: Meet the authors: • Meet the authors from the comfort of your own home Matt Fuller • Meet the Presto creators and participate in an Ask Me Anything (AMA) session with the book Manfred Moser authors + Presto creators • Meet special guest speakers from Martin your favorite podcasts who will Traverso moderate the AMA Register here to save your spot. Praise for Presto: The Definitive Guide This book provides a great introduction to Presto and teaches you everything you need to know to start your successful usage of Presto. —Dain Sundstrom and David Phillips, Creators of the Presto Projects and Founders of the Presto Software Foundation Presto plays a key role in enabling analysis at Pinterest. This book covers the Presto essentials, from use cases through how to run Presto at massive scale. —Ashish Kumar Singh, Tech Lead, Bigdata Query Processing Platform, Pinterest Presto has set the bar in both community-building and technical excellence for lightning- fast analytical processing on stored data in modern cloud architectures. This book is a must-read for companies looking to modernize their analytics stack. —Jay Kreps, Cocreator of Apache Kafka, Cofounder and CEO of Confluent Presto has saved us all—both in academia and industry—countless hours of work, allowing us all to avoid having to write code to manage distributed query processing.
    [Show full text]
  • Working with User Agent Strings in Stata: the Parseuas Command
    JSS Journal of Statistical Software February 2020, Volume 92, Code Snippet 1. doi: 10.18637/jss.v092.c01 Working with User Agent Strings in Stata: The parseuas Command Joss Roßmann Tobias Gummer Lars Kaczmirek GESIS – Leibniz Institute GESIS – Leibniz Institute University of Vienna for the Social Sciences for the Social Sciences Abstract With the rising popularity of web surveys and the increasing use of paradata by survey methodologists, assessing information stored in user agent strings becomes inevitable. These data contain meaningful information about the browser, operating system, and device that a survey respondent uses. This article provides an overview of user agent strings, their specific structure and history, how they can be obtained when conducting a web survey, as well as what kind of information can be extracted from the strings. Further, the user written command parseuas is introduced as an efficient means to gather detailed information from user agent strings. The application of parseuas is illustrated by an example that draws on a pooled data set consisting of 29 web surveys. Keywords: user agent string, web surveys, device detection, browser, paradata, Stata. 1. Introduction In recent years, web surveys have become an increasingly popular and important data collec- tion mode, and today, they account for a great share of the studies in the social sciences. Web surveys have been used to complement traditional offline surveys as a less expensive form of pre-test or a mode of choice for respondents who are not willing to use “traditional” modes, such as face-to-face or telephone interviews. Along with the rising popularity of web surveys, survey methodologists have taken an increas- ing interest in paradata, which are collected as a byproduct of the survey process (Couper 2000).
    [Show full text]
  • PRESTO–Lite How-To Guide Wisconsin’S Web-Based Application for Watershed Delineation and Characterization
    PRESTO–Lite How-to Guide Wisconsin’s Web-based Application for Watershed Delineation and Characterization Locate Click Delineate PRESTO-Lite Overview Summary: PRESTO-Lite summarizes upstream watershed characteristics including point and nonpoint phosphorus loads, landcover, modeled stream flow, and natural community type for any user- defined watershed. The application relies on existing DNR efforts including the Pollutant Load Ratio Estimation Tool (PRESTO) desktop program and the Wisconsin Hydrography Dataset Plus. z Delineated Watershed Report Watershed Watershed Effluent Pollutant Delineation Characteristics Aggregation Runoff Technology Requirements: Web browser (Chrome, Safari, Explorer, Firefox, etc.) with internet connectivity Questions: Contact [email protected] Access the WI DNR’s Watershed Restoration Map Viewer 1. Direct access: http://dnr.wi.gov/topic/surfacewater/restorationviewer/ or Visit WDNR (http://dnr.wi.gov/) and search “watershed restoration viewer” 2. Access PRESTO by clicking “Launch” on any of the themes. Access the WI DNR’s Watershed Restoration Map Viewer 3. Upon launching the WI DNR’s Watershed Restoration Viewer you can simplify or enhance your view by click on the Layers button in the lower left corner of the viewer and turn on/ off all layers Locate the resource to delineate watershed 4. Using the “Zoom In” button in the header ribbon, draw a box around an area from which you would like a watershed delineated Activate PRESTO-Lite Tool 5. Once you have zoomed into a specific area for watershed delineation, select the PRESTO-Lite Tool in the ribbon. Activate PRESTO-Lite Tool 6. Click on the PRESTO-Lite Icon Select location to being delineation process 7. Click on the desired point of delineation within the map from which to delineate a watershed PRESTO-Lite Results 8.
    [Show full text]
  • Presto Administrator Guide
    Presto 2.5 Administrator Guide 1 Table of Contents Overview 3 Installation 4 Presto Server 5 How It All Works 7 DNS Configuration 9 Configuration 15 Rules 16 Rule Configuration 18 Rule Conditions 21 Services 28 Editing Services 29 Adding Services 31 Users 33 Printing 33 Preferences 38 2 Overview Presto is a new category of enterprise software that brings unprecedented capability to system administrators in delivering network services to mobile users based on location, group membership, tags, and other criteria. Supported Systems: Server: Windows: Vista 7, 8, 10; Server 2008 R2; Server 2012 Mac: OS X 10.11 + Linux: Ubuntu 14.04 + Client: iOS: 8.0 + Android: 4.4.2 + Chrome OS: 44 + 3 Installation To install the Presto app, follow these three steps: ⦁ Download and run the Presto Server installer for either Windows or Mac OS X. ⦁ Run the Presto app. ⦁ Activate Presto by clicking the Activate button and filling in the required information. Presto Server Presto Server runs as three system services/daemons on Windows and Mac OS X. This allows Presto Server to service requests even if no one is logged in to the machine where Presto Server is installed. The system services bind to ports 53/5335/5352 (DNS) and 9629/9630/9631 (HTTP). They can be started and stopped using the following commands. Windows C:\> net start “Presto Master” C:\> net stop “Presto Master” C:\> net start “Presto Repeater” C:\> net stop “Presto Repeater” C:\> net start “Presto Agent” C:\> net stop “Presto Agent” Mac bash$ sudo launchctl load /Library/LaunchDaemons/com.collobos.prestod.master.plist
    [Show full text]
  • Introduction to the Web
    Introduction to the Web MPRI 2.26.2: Web Data Management Antoine Amarilli 1/25 POLL: World Wide Web creation The Web was invented... • A: About at the same as the Internet • B: 2 years after the Internet • C: 5 years after the Internet • D: More than 5 years after the Internet 2/25 POLL: World Wide Web creation The Web was invented... • A: About at the same as the Internet • B: 2 years after the Internet • C: 5 years after the Internet • D: More than 5 years after the Internet 2/25 The old days 1969 ARPANET (ancestor of the Internet) 1974 TCP 1990 The World Wide Web, HTTP, HTML 1994 Yahoo! was founded 1995 Amazon.com, Ebay, AltaVista are founded 1998 Google are founded 2001 Wikipedia is created 3/25 POLL: Number of Internet domains How many domain names exist on the Internet? • A: 3 million • B: 30 million • C: 300 million • D: 3 billion 4/25 POLL: Number of Internet domains How many domain names exist on the Internet? • A: 3 million • B: 30 million • C: 300 million • D: 3 billion 4/25 Statistics • Around 370 million domains, including 150 million in .com1 • 54% of content in English and 4% in French2 • Google knows over one trillion (1012) of unique URLs3 ! The same content can live in many dierent URLs ! Parts of the Web are not indexable: the hidden Web or deep Web 1https://www.verisign.com/en_US/domain-names/dnib/index.xhtml 2https://w3techs.com/technologies/overview/content_language/all 3https://googleblog.blogspot.fr/2008/07/we-knew-web-was-big.html 5/25 POLL: Internet users Which proportion of the world population is using the Internet
    [Show full text]