IERG 4080 Building Scalable Internet-based Services

Size: px
Start display at page:

Download "IERG 4080 Building Scalable Internet-based Services"

Transcription

1 Department of Information Engineering, CUHK MScIE 2 nd Semester, 2015/16 IERG 4080 Building Scalable Internet-based Services Lecture 9 Web Sockets for Real-time Communications Lecturer: Albert C. M. Au Yeung 2 nd & 3 rd November, 2016

2 Push Technology 2

3 Pull and Push All of the examples we have gone through in network programming so far can be regarded as using the pull method Communication is always initiated by the client Client pulls data or services from the server when necessary (e.g. when the user launches the app, or presses a button) 1 Client requests to be served by the server Server responds with the data or service requested by the client 2 Application Server (E.g. Web server, server, translation server) 3

4 Pull and Push HTTP is a pull-based protocol Users browse the Web and actively decide which Website to browse, which link to follow A effective and economical way (every user chooses what he needs) However, if some resources are regularly requested, the pull model can put heavy load on the server 4

5 Pull and Push There are cases in which the server would like to initiate communication with the client(s) When new arrives When a peer sends a message to the user through the server When the app/data needs to be updated In these cases, the server needs to push data or services to the client 5

6 Implementing Push The World Wide Web, and in particular the HTTP protocol, is designed for pull, and additional engineering is required to implement push on the Web. Some ways to emulate push on the Web Polling (Periodic pull) The Comet model BOSH WebSockets 6

7 Implementing Push Polling The client polls the server periodically to check if new messages or updates are available Client Send request Server Advantages: 1. Easy to implement 2. No extra development on the server-side Disadvantages: 1. Unnecessary network traffic generated 2. Extra workload on the server Wait for 10 seconds Wait for 10 seconds Response Wait for 10 seconds 7

8 Implementing Push Polling Examples The Post-Office Protocol (POP) for clients using the POP3 protocol make regular requests to the mail server to check for new s RSS Feed Readers RSS resources are served by HTTP, and thus are all pull-based RSS feed readers poll the RSS servers regularly and check for new updates of the feeds Note: polling can place heavy workload on the server, the client and the network 8

9 Implementing Push The Comet Model Comet is a model for implementing Web applications that allow servers to push data to clients (browsers) Implementations of Comet applications fall into two major categories 1. Streaming 2. Long-polling Reference: 9

10 Implementing Push The Comet Model Streaming A persistent connection is established between the browser and the server Data is sent from the server a chunked block Events are incrementally sent to the browser (e.g. using <script> tags to execute JavaScript commands) Data is incrementally sent to the client (browser) Data sent from the server Another event happens, server sends another block... Reference:

11 Implementing Push The Comet Model Client Server Long-polling A request is sent to from the client to the server The server holds the connection until some events happen, then response is sent back to the client The client, on receiving a response, issue another request immediately to the server (Usually implemented using Ajax) Send request Response Send another request Response Send another request Connection is held until some data needs to be sent Reference:

12 Implementing Push BOSH BOSH stands for Bidirectional-streams over Synchronous HTTP It makes use of HTTP long-polling A single TCP connection is established to receive push data from server If no data needs to be pushed, server sends an empty <body/> message If client needs to send data to server, a second socket is used to send HTTP post requests The old and new connections will then switch roles (the new will be used for longpolling thereafter) Reference: 12

13 XMPP XMPP stands for Extensible Messaging and Presence Protocol Originally named Jabber, an open source project for real-time and instant messaging Using a client-server architecture (non-p2p) Decentralized and federated model: no central server, but servers for different domains Each user connects to a public XMPP server, which will relay his messages to other users in other domains 13

14 XMPP 14

15 WebSockets 15

16 WebSockets A protocol providing full-duplex communications channels between two computers over a TCP connection Designed to be implemented in Web browsers (clients) and Web servers HTTP is half-duplex: only one side can send data at a time, like walkie-talkie Communications are done over TCP port 80 (can be used in secured computing environments) Socket.io to be introduced later Reference:

17 WebSockets A persistent connections between a Web browser (or a mobile app) and a server Both sides can send out data to the other side at any time Why WebSocket? Lower latency (avoid TCP handshaking) Smaller overhead (only 2 bytes per message) Less unnecessary communication (data is only sent whenever needed) 17

18 WebSockets WebSocket is part of the HTML5 standard Supported in latest versions of major Web browsers Simple API in JavaScript Libraries also available on ios and Android var host = 'ws://localhost:8000/example'; var socket = new WebSocket(host); socket.onopen = function() { console.log('socket opened'); socket.send('hello server!'); } socket.onmessage = function(msg) { console.log(msg); } socket.onclose = function() { console.log('socket closed'); } Try the game at 18

19 WebSockets Particularly useful when you would like to develop applications such as: Real-time multiplayer games Chat rooms Real-time news feed Collaborative apps (e.g. consider something like Google Documents) Live commenting 19

20 WebSockets Design principles of WebSockets An additional layer on top of TCP Enable bi-directional communication between client and servers Support low-latency apps without HTTP overhead Web origin-based security model for browsers Support multiple server-side endpoints 20

21 WebSockets How does WebSockets work? 1. WebSocket handshake Client sends a regular HTTP request to the server with an upgrade header field GET ws://websocket.example.com/ HTTP/1.1 Origin: Connection: Upgrade Host: websocket.example.com Upgrade: websocket WebSockets uses the ws scheme (or the wss scheme for secure connections, equivalent to HTTPS) If server supports WebSockets, it sends back a response with the upgrade header field HTTP/ WebSocket Protocol Handshake Date: Wed, 16 Oct :07:34 GMT Connection: Upgrade Upgrade: WebSocket 21

22 WebSockets Once the handshake is completed: The initial HTTP connection will be replaced by the WebSockets connection (using the same underlying TCP/IP connection) Both the client and the server can now start sending data to the other side Data are transferred in frames Messages (payload) will be reconstructed once all frames are received Because of the established WebSockets connection, much less overhead will be incurred on the message being transmitted Check whether a browser supports WebSockets: 22

23 socket.io 23

24 socket.io A library based on node.js for real time, bi-directional communication between a server and one or multiple clients Using WebSocket to perform data communication (fall back to older solutions when WebSocket is not supported) Official Website: Originally written for node.js on the sever side and JavaScript on the client side, there are now libraries for Python, Android and ios 24

25 socket.io socket.io has two parts: 1) Server and 2) Client Client libraries are available in JavaScript (Web), Android and ios Allow you to build real-time apps across multiple platforms socket.io-client (JavaScript) socket.io (Server Side) socket.io-client (Android) socket.io-client (ios) 25

26 socket.io Event-driven Once connected, the server and client can communicate with each other by triggering or emitting events Create callback functions to carry out different actions whenever some events happens 26

27 socket.io Flow of creating a server-side program Create Socket.io Server Listen for incoming connections Wait for events to happen Handle events 27

28 socket.io Flow of creating a client-side program Connect to a Socke.io Server Wait for events to happen Handle events 28

29 Flask-SocketIO 29

30 Flask-SocketIO A module that allows you to use socket.io in Flask applications Install using the following command: $ pip install flask-socketio Note: install the concurrent networking library Eventlet as well: $ pip install eventlet 30

31 Flask-SocketIO Initialization You need to provide a secret key for Flask to encrypt data for user sessions from flask import Flask, render_template from flask_socketio import SocketIO app = Flask( name ) app.config['secret_key'] = secretkey socketio = SocketIO(app) if name == main : socketio.run(app) Setup the app to use functions of socket.io This is for debugging purpose, we will discuss how to deploy applications that using socket.io soon 31

32 Flask-SocketIO Remember we mentioned that in Socket.io all communications are based on events We will have to define handlers of events in our Flask application For def handle_message(message): # Actions to be performed when a message is received #... The name of the event (NOTE: some names cannot be used because they already represent some special events) 32

33 Events Both the server and the client can generate events, and if the other side has a handler of that event, the handler will be invoked to carry out some actions In Flask-SocketIO, there are several different types of evetns Special events ( connect, disconnect, join, leave ) Unnamed events ( message or json ) Custom events (a name of your choice, e.g. my event ) 33

34 Events Connection events # Will be invoked whenever a client is def connect_handler(): print "Client connected. # Will be invoked whenever a client is def disconnect_handler(): print "Client disconnected." 34

35 Events Unnamed events # Will be invoked whenever an unnamed event def message_handler(message): print "message received: %s" % message # Will be invoked whenever an unnamed event happens (with JSON def disconnect_handler(json): print "json received: %s" % str(json) 35

36 Events Custom events are events with custom-defined names # Will be invoked when the client emits an event of the type def event001_handler(json): print "json received: %s" % str(json) 36

37 Events The server can send message to clients by creating events using the send() function or the emit() function The send() function is for sending unnamed events The emit() function is for sending custom named events from flask_socketio import send, def handle_message(message): def handle_json(json): send(json, def handle_my_custom_event(json): emit('event001', json) 37

38 Broadcasting Normally, send and emit only send message to Broadcasting allows you to send a message to all clients who are connected to the server For example, in a multi-player game, one user performs an action, and you want this to be known to all other def handle_event001(data): emit('event001', data, broadcast=true) Set broadcast=true when emitting a message 38

39 Rooms In some applications, users may interact with only a subset of other users Examples: Chat application with multiple rooms Multiplayer games (multiple game boards, game rooms, etc.) from flask_socketio import join_room, def on_join(data): username = data['username'] room = data['room'] join_room(room) send('user_join', '%s joined' % username, def on_leave(data): username = data['username'] room = data['room'] leave_room(room) send('user_leave', '%s left' % username, room=room) 39

40 Deploying Flask-SocketIO If you have eventlet installed, you can use the embedded server which is production-ready Invoked by socketio.run(app, host=" ", port=5000) Sample supervisor configuration files: [program:ierg4080] command = python app.py directory = /home/albert/ierg4080 user = albert autostart = true autorestart = true stdout_logfile = /home/albert/ierg4080/app.log redirect_stderr = true 40

41 Deploying Flask-SocketIO If you would like to deploy a single Flask app including both your APIs and the socket.io event handlers, use Gunicorn. For example: [program:iems5722] command = gunicorn --worker-class eventlet -w 1 app:app b localhost:8000 directory = /home/albert/ierg4080 user = albert autostart = true autorestart = true stdout_logfile = /home/albert/ierg4080/app.log redirect_stderr = true 41

42 What can you do with socket.io? Real-time chat rooms Real-time multiplayer games Real-time event broadcasting (e.g. real-time results of a competition or an event) And a snake game across multiple screens! ( 42

43 Scaling Socket.io Applications 43

44 Scaling Socket.io Applications Horizontal scaling must be applied when there is a large number of concurrent users How can we scale socket.io applications? What are the requirements of scaling socket.io apps? Socket.io App Clients Socket.io App Load Balancer Socket.io App 44

45 Scaling Socket.io Applications Requirement 1 The same client must be served by the same worker (aka sticky sessions) If we use Nginx, we can use the ip_hash algorithm for load balancing The same client will have the same IP address, and thus will be routed to the same host/worker http { upstream myservers { ip_hash; server s1.myserver.com; server s2.myserver.com; server s3.myserver.com; } } server { listen 80; } location / { proxy_pass } 45

46 Scaling Socket.io Applications Requirement 2 If there are multiple hosts/workers running the same socket.io app, only a subset of the clients will be served by each worker Problem: how does the server application emit events to all connected clients? Solution: a message queue! 46

47 Scaling Socket.io Applications Requirement 2 If there are multiple hosts/workers running the same socket.io app, only a subset of the clients will be served by each worker Problem: how does the server application emit events to all connected clients? Solution? 47

48 Scaling Socket.io Applications Solution: using a message queue! When emitting an event, send it to its own clients, as well as submitting the event to the message queue, such that other hosts will be notified. Clients 1 Clients 2 Message Queue Clients 3 48

49 Scaling Socket.io Applications You can specify a message queue (Redis or RabbitMQ) when you create the Socket.io object in your Flask app For example: socketio = SocketIO(app, message_queue='redis://localhost:6379//') or socketio = SocketIO(app, message_queue='amqp://guest:guest@localhost:5672//') 49

50 Scaling Socket.io Applications With the message queue set up, you can actually emit events from any other processes (e.g. another Python program, an asynchronous task worker, etc.) Example:... socketio = SocketIO(message_queue='amqp://...') socketio.emit('event001', {'data': 123'})... 50

51 End of Lecture 11 51

IEMS 5722 Mobile Network Programming and Distributed Server Architecture

IEMS 5722 Mobile Network Programming and Distributed Server Architecture Department of Information Engineering, CUHK MScIE 2 nd Semester, 2016/17 IEMS 5722 Mobile Network Programming and Distributed Server Architecture Lecture 10 Web Sockets for Real-time Communications Lecturer:

More information

IEMS 5722 Mobile Network Programming and Distributed Server Architecture

IEMS 5722 Mobile Network Programming and Distributed Server Architecture Department of Information Engineering, CUHK MScIE 2 nd Semester, 2016/17 IEMS 5722 Mobile Network Programming and Distributed Server Architecture Lecture 7 Instant Messaging & Google Cloud Messaging Lecturer:

More information

IEMS 5722 Mobile Network Programming and Distributed Server Architecture Semester 2

IEMS 5722 Mobile Network Programming and Distributed Server Architecture Semester 2 IEMS 5722 Mobile Network Programming and Distributed Server Architecture 2016-2017 Semester 2 Assignment 3: Developing a Server Application Due Date: 10 th March, 2017 Notes: i.) Read carefully the instructions

More information

CSC443: Web Programming 2

CSC443: Web Programming 2 CSC443: Web Programming Lecture 20: Web Sockets Haidar M. Harmanani HTML5 WebSocket Standardized by IETF in 2011. Supported by most major browsers including Google Chrome, Internet Explorer, Firefox, Safari

More information

Module 6 Node.js and Socket.IO

Module 6 Node.js and Socket.IO Module 6 Node.js and Socket.IO Module 6 Contains 2 components Individual Assignment and Group Assignment Both are due on Wednesday November 15 th Read the WIKI before starting Portions of today s slides

More information

Kaazing. Connect. Everything. WebSocket The Web Communication Revolution

Kaazing. Connect. Everything. WebSocket The Web Communication Revolution Kaazing. Connect. Everything. WebSocket The Web Communication Revolution 1 Copyright 2011 Kaazing Corporation Speaker Bio John Fallows Co-Founder: Kaazing, At the Heart of the Living Web Co-Author: Pro

More information

Enabling Full-Duplex Communications in APEX

Enabling Full-Duplex Communications in APEX Enabling Full-Duplex Communications in APEX Me Curt Workman - workmancw@ldschurch.org Education University of Utah Work Micron Electronics Evans&Sutherland The Church of Jesus Christ of Latter-Day Saints

More information

IEMS 5722 Mobile Network Programming and Distributed Server Architecture

IEMS 5722 Mobile Network Programming and Distributed Server Architecture Department of Information Engineering, CUHK MScIE 2 nd Semester, 2016/17 IEMS 5722 Mobile Network Programming and Distributed Server Architecture Lecture 9 Asynchronous Tasks & Message Queues Lecturer:

More information

IERG 4080 Building Scalable Internet-based Services

IERG 4080 Building Scalable Internet-based Services Department of Information Engineering, CUHK Term 1, 2016/17 IERG 4080 Building Scalable Internet-based Services Lecture 7 Asynchronous Tasks and Message Queues Lecturer: Albert C. M. Au Yeung 20 th & 21

More information

Real-time video chat XPage application using websocket and WebRTC technologies AD-1077

Real-time video chat XPage application using websocket and WebRTC technologies AD-1077 Real-time video chat XPage application using websocket and WebRTC technologies AD-1077 Dr Csaba Kiss 02/03/2016 LA-UR-16-20047 Credentials Over 25 years experience in molecular biology Began Xpage application

More information

COMET, HTML5 WEBSOCKETS OVERVIEW OF WEB BASED SERVER PUSH TECHNOLOGIES. Comet HTML5 WebSockets. Peter R. Egli INDIGOO.COM. indigoo.com. 1/18 Rev. 2.

COMET, HTML5 WEBSOCKETS OVERVIEW OF WEB BASED SERVER PUSH TECHNOLOGIES. Comet HTML5 WebSockets. Peter R. Egli INDIGOO.COM. indigoo.com. 1/18 Rev. 2. COMET, HTML5 WEBSOCKETS OVERVIEW OF WEB BASED SERVER PUSH TECHNOLOGIES Peter R. Egli INDIGOO.COM 1/18 Contents 1. Server push technologies 2. HTML5 server events 3. WebSockets 4. Reverse HTTP 5. HTML5

More information

Harnessing the Power of HTML5 WebSocket to Create Scalable Real-time Applications. Brian Albers & Peter Lubbers, Kaazing

Harnessing the Power of HTML5 WebSocket to Create Scalable Real-time Applications. Brian Albers & Peter Lubbers, Kaazing Harnessing the Power of HTML5 WebSocket to Create Scalable Real-time Applications Brian Albers & Peter Lubbers, Kaazing 1 About Peter Lubbers Director of Documentation and Training, Kaazing Co-Founder

More information

Kaazing Gateway: An Open Source

Kaazing Gateway: An Open Source Kaazing Gateway: An Open Source HTML 5 Websocket Server Speaker Jonas Jacobi Co-Founder: Kaazing Co-Author: Pro JSF and Ajax, Apress Agenda Real-Time Web? Why Do I Care? Scalability and Performance Concerns

More information

Kaazing Gateway. Open Source HTML 5 Web Socket Server

Kaazing Gateway. Open Source HTML 5 Web Socket Server Kaazing Gateway Open Source HTML 5 Web Socket Server Speaker John Fallows Co-Founder: Kaazing Co-Author: Pro JSF and Ajax, Apress Participant: HTML 5 Community Agenda Networking Review HTML 5 Communication

More information

Building a Real-time Notification System

Building a Real-time Notification System Building a Real-time Notification System September 2015, Geneva Author: Jorge Vicente Cantero Supervisor: Jiri Kuncar CERN openlab Summer Student Report 2015 Project Specification Configurable Notification

More information

Send me up to 5 good questions in your opinion, I ll use top ones Via direct message at slack. Can be a group effort. Try to add some explanation.

Send me up to 5 good questions in your opinion, I ll use top ones Via direct message at slack. Can be a group effort. Try to add some explanation. Notes Midterm reminder Second midterm next week (04/03), regular class time 20 points, more questions than midterm 1 non-comprehensive exam: no need to study modules before midterm 1 Online testing like

More information

IEMS 5722 Mobile Network Programming and Distributed Server Architecture

IEMS 5722 Mobile Network Programming and Distributed Server Architecture Department of Information Engineering, CUHK MScIE 2 nd Semester, 2016/17 IEMS 5722 Mobile Network Programming and Distributed Server Architecture Lecture 1 Course Introduction Lecturer: Albert C. M. Au

More information

IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services

IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services Lecture 11 - Asynchronous Tasks and Message Queues Albert Au Yeung 22nd November, 2018 1 / 53 Asynchronous Tasks 2 / 53 Client

More information

Building next-gen Web Apps with WebSocket. Copyright Kaazing Corporation. All rights reserved.

Building next-gen Web Apps with WebSocket. Copyright Kaazing Corporation. All rights reserved. Building next-gen Web Apps with WebSocket Copyright 2011 - Kaazing Corporation. All rights reserved. Who am I? Graham Gear Solution Architect, with Kaazing, purveyors of HTML5 enabling tech Based in London,

More information

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary INTERNET ENGINEERING HTTP Protocol Sadegh Aliakbary Agenda HTTP Protocol HTTP Methods HTTP Request and Response State in HTTP Internet Engineering 2 HTTP HTTP Hyper-Text Transfer Protocol (HTTP) The fundamental

More information

Networking & The Web. HCID 520 User Interface Software & Technology

Networking & The Web. HCID 520 User Interface Software & Technology Networking & The Web HCID 520 User Interface Software & Technology Uniform Resource Locator (URL) http://info.cern.ch:80/ 1991 HTTP v0.9 Uniform Resource Locator (URL) http://info.cern.ch:80/ Scheme/Protocol

More information

Tutorial 8 Build resilient, responsive and scalable web applications with SocketPro

Tutorial 8 Build resilient, responsive and scalable web applications with SocketPro Tutorial 8 Build resilient, responsive and scalable web applications with SocketPro Contents: Introduction SocketPro ways for resilient, responsive and scalable web applications Vertical scalability o

More information

Lecture 18. WebSocket

Lecture 18. WebSocket Lecture 18. WebSocket 1. What is WebSocket? 2. Why WebSocket? 3. WebSocket protocols 4. WebSocket client side 5. WebSocket on server side 1. Case study, WebSocket on nose.js 2. Case study, WebSocket on

More information

Corey Clark PhD Daniel Montgomery

Corey Clark PhD Daniel Montgomery Corey Clark PhD Daniel Montgomery Web Dev Platform Cross Platform Cross Browser WebGL HTML5 Web Socket Web Worker Hardware Acceleration Optimized Communication Channel Parallel Processing JaHOVA OS Kernel

More information

State of the real-time web with Django

State of the real-time web with Django State of the real-time web with Django Aymeric Augustin - @aymericaugustin DjangoCon US - September 5th, 2013 1 What are we talking about? 2 Real-time 1. Systems responding within deadlines 2. Simulations

More information

RailsConf Europe 2008 Juggernaut Realtime Rails. Alex MacCaw and Stuart Eccles

RailsConf Europe 2008 Juggernaut Realtime Rails. Alex MacCaw and Stuart Eccles RailsConf Europe 2008 Juggernaut Realtime Rails Alex MacCaw and Stuart Eccles RailsConf Europe 2008 Juggernaut Realtime Rails Alex MacCaw and Stuart Eccles http://www.madebymany.co.uk/ server push HTTP

More information

FIREFLY ARCHITECTURE: CO-BROWSING AT SCALE FOR THE ENTERPRISE

FIREFLY ARCHITECTURE: CO-BROWSING AT SCALE FOR THE ENTERPRISE FIREFLY ARCHITECTURE: CO-BROWSING AT SCALE FOR THE ENTERPRISE Table of Contents Introduction... 2 Architecture Overview... 2 Supported Browser Versions and Technologies... 3 Firewalls and Login Sessions...

More information

Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios

Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios Comet and WebSocket Web Applications How to Scale Server-Side Event-Driven Scenarios Simone Bordet sbordet@intalio.com 1 Agenda What are Comet web applications? Impacts of Comet web applications WebSocket

More information

Web application Architecture

Web application Architecture 1 / 37 AJAX Prof. Cesare Pautasso http://www.pautasso.info cesare.pautasso@usi.ch @pautasso Web application Architecture 5 / 37 Client Server Backend Response Database File System 2013 Cesare Pautasso

More information

Data Communication & Computer Networks MCQ S

Data Communication & Computer Networks MCQ S Data Communication & Computer Networks MCQ S 1. The translates internet domain and host names to IP address. a) domain name system b) routing information protocol c) network time protocol d) internet relay

More information

Harnessing the Power of HTML5 WebSocket to Create Scalable Real-Time Applications. Peter Lubbers Kaazing

Harnessing the Power of HTML5 WebSocket to Create Scalable Real-Time Applications. Peter Lubbers Kaazing Harnessing the Power of HTML5 WebSocket to Create Scalable Real-Time Applications Peter Lubbers Kaazing Wer ist dieser Kerl? > Director of Documentation and Training, Kaazing > Co-Founder San Francisco

More information

Zero Latency HTTP The comet Technique

Zero Latency HTTP The comet Technique Zero Latency HTTP The comet Technique Filip Hanik SpringSource Inc Keystone, Colorado, 2008 Slide 1 Who am I bla bla fhanik@apache.org Tomcat Committer / ASF member Co-designed the Comet implementation

More information

Joseph Faber Wonderful Talking Machine (1845)

Joseph Faber Wonderful Talking Machine (1845) Joseph Faber Wonderful Talking Machine (1845) Connected World Human-to-Human communication Human-Machine interaction Machine-to-Machine communication (M2M) Internet-of-Things (IOT) Internet of Things How

More information

Lightstreamer. The Streaming-Ajax Revolution. Product Insight

Lightstreamer. The Streaming-Ajax Revolution. Product Insight Lightstreamer The Streaming-Ajax Revolution Product Insight 1 Agenda Paradigms for the Real-Time Web (four models explained) Requirements for a Good Comet Solution Introduction to Lightstreamer Lightstreamer

More information

Jackalope Documentation

Jackalope Documentation Jackalope Documentation Release 0.2.0 Bryson Tyrrell May 23, 2017 Getting Started 1 Create the Slack App for Your Team 3 2 Deploying the Slack App 5 2.1 Run from application.py.........................................

More information

Copyright 2013, Oracle and/or its affiliates. All rights reserved. CON-7777, JMS and WebSocket for Lightweight and Efficient Messaging

Copyright 2013, Oracle and/or its affiliates. All rights reserved. CON-7777, JMS and WebSocket for Lightweight and Efficient Messaging 1 JMS and WebSocket for Lightweight and Efficient Messaging Ed Bratt Senior Development Manager, Oracle Amy Kang Consulting Member Technical Staff, Oracle Safe Harbor Statement please note The following

More information

The Future of the Web: HTML 5, WebSockets, Comet and Server Sent Events

The Future of the Web: HTML 5, WebSockets, Comet and Server Sent Events The Future of the Web: HTML 5, WebSockets, Comet and Server Sent Events Sidda Eraiah Director of Management Services Kaazing Corporation Agenda Web Applications, where are they going? Real time data for

More information

Real-Time GIS: Leveraging Stream Services

Real-Time GIS: Leveraging Stream Services Real-Time GIS: Leveraging Stream Services Mark Bramer Senior Technical Analyst Esri Professional Services mbramer@esri.com RJ Sunderman Product Engineer GeoEvent Extension Product Team rsunderman@esri.com

More information

Junction: A Decentralized Platform for Ad Hoc Social and Mobile Applications. Ben Dodson, Monica Lam, Chanh Nguyen, Te-Yuan Huang

Junction: A Decentralized Platform for Ad Hoc Social and Mobile Applications. Ben Dodson, Monica Lam, Chanh Nguyen, Te-Yuan Huang Junction: A Decentralized Platform for Ad Hoc Social and Mobile Applications Ben Dodson, Monica Lam, Chanh Nguyen, Te-Yuan Huang Motivation Motivation Ad Hoc Bring together devices with no previous contact

More information

EWD Lite. Rob Tweed M/Gateway Developments Ltd. Tuesday, 16 July 13

EWD Lite. Rob Tweed M/Gateway Developments Ltd.   Tuesday, 16 July 13 EWD Lite Rob Tweed M/Gateway Developments Ltd Twitter: @rtweed Email: rtweed@mgateway.com 1 EWD Lite Background, History and Aims Underlying Technology & Architecture Comparison with classic EWD Benefits

More information

CS 498RK FALL RESTFUL APIs

CS 498RK FALL RESTFUL APIs CS 498RK FALL 2017 RESTFUL APIs Designing Restful Apis blog.mwaysolutions.com/2014/06/05/10-best-practices-for-better-restful-api/ www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api Resources

More information

Networking & The Web. HCID 520 User Interface Software & Technology

Networking & The Web. HCID 520 User Interface Software & Technology Networking & The HCID 520 User Interface Software & Technology Uniform Resource Locator (URL) http://info.cern.ch:80/ 1991 HTTP v0.9 Uniform Resource Locator (URL) http://info.cern.ch:80/ Scheme/Protocol

More information

AWS Lambda + nodejs Hands-On Training

AWS Lambda + nodejs Hands-On Training AWS Lambda + nodejs Hands-On Training (4 Days) Course Description & High Level Contents AWS Lambda is changing the way that we build systems in the cloud. This new compute service in the cloud runs your

More information

CS50 Quiz Review. November 13, 2017

CS50 Quiz Review. November 13, 2017 CS50 Quiz Review November 13, 2017 Info http://docs.cs50.net/2017/fall/quiz/about.html 48-hour window in which to take the quiz. You should require much less than that; expect an appropriately-scaled down

More information

Real Time Apps Using SignalR

Real Time Apps Using SignalR Real Time Apps Using SignalR Anurag Choudhry Solution Architect,Banking Technology Group,Tata Consultancy Services,New Delhi, India Anshu Premchand Lead, Presales & Solutions,Banking Technology Group,Tata

More information

Websocket file transfer example

Websocket file transfer example Websocket file transfer example The Problem: Low Latency Client-Server and Server-Client Connections. The Problem: Low Latency Client-Server and Server-Client Connections. // File has seen in the webkit

More information

Building Real-time Data in Web Applications with Node.js

Building Real-time Data in Web Applications with Node.js Building Real-time Data in Web Applications with Node.js Dan McGhan Oracle Developer Advocate JavaScript and HTML5 March, 2017 Copyright 2017, Oracle and/or its affiliates. All rights reserved. Safe Harbor

More information

NODE.JS MOCK TEST NODE.JS MOCK TEST I

NODE.JS MOCK TEST NODE.JS MOCK TEST I http://www.tutorialspoint.com NODE.JS MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Node.js Framework. You can download these sample mock tests at

More information

Different Layers Lecture 21

Different Layers Lecture 21 Different Layers Lecture 21 10/17/2003 Jian Ren 1 The Transport Layer 10/17/2003 Jian Ren 2 Transport Services and Protocols Provide logical communication between app processes running on different hosts

More information

IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services

IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services IEMS 5780 / IERG 4080 Building and Deploying Scalable Machine Learning Services Lecture 7 - Network Programming Albert Au Yeung 18th October, 2018 1 / 48 Computer Networking 2 / 48 Data Communication Exchange

More information

Aaron Bartell Director of IBM i Innovation

Aaron Bartell Director of IBM i Innovation Watson IBM i WebSockets Aaron Bartell Director of IBM i Innovation albartell@krengeltech.com Copyright 2015 Aaron Bartell This session brought to you by... Consulting - Jumpstart your open source pursuit.

More information

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes AJAX Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11 Sérgio Nunes Server calls from web pages using JavaScript call HTTP data Motivation The traditional request-response cycle in web applications

More information

Smashing Node.JS: JavaScript Everywhere

Smashing Node.JS: JavaScript Everywhere Smashing Node.JS: JavaScript Everywhere Rauch, Guillermo ISBN-13: 9781119962595 Table of Contents PART I: GETTING STARTED: SETUP AND CONCEPTS 5 Chapter 1: The Setup 7 Installing on Windows 8 Installing

More information

Programming WebSockets. Sean Sullivan OSCON July 22, 2010

Programming WebSockets. Sean Sullivan OSCON July 22, 2010 Programming WebSockets Sean Sullivan OSCON July 22, 2010 About me Web application developers HTML 5! improved JavaScript implementations! WebSockets! WebSockets? WebSockets a technology that enables

More information

HTML5 - INTERVIEW QUESTIONS

HTML5 - INTERVIEW QUESTIONS HTML5 - INTERVIEW QUESTIONS http://www.tutorialspoint.com/html5/html5_interview_questions.htm Copyright tutorialspoint.com Dear readers, these HTML5 Interview Questions have been designed specially to

More information

Real-Time SignalR. Overview

Real-Time SignalR. Overview Real-Time SignalR Overview Real-time Web applications feature the ability to push server-side content to the connected clients as it happens, in real-time. For ASP.NET developers, ASP.NET SignalR is a

More information

Brad Drysdale. HTML5 WebSockets - the Web Communication revolution, making the impossible, possible. Main sponsor

Brad Drysdale. HTML5 WebSockets - the Web Communication revolution, making the impossible, possible. Main sponsor Main sponsor HTML5 WebSockets - the Web Communication revolution, making the impossible, possible Brad Drysdale Picasso Matejko + Canale1o Malczewski + Chelmonski State of Scala Venkat Subramaniam Don't

More information

Keep Learning with Oracle University

Keep Learning with Oracle University Keep Learning with Oracle University Classroom Training Learning SubscripFon Live Virtual Class Training On Demand Cloud Technology ApplicaFons Industries educa7on.oracle.com 3 Session Surveys Help us

More information

Eduardo

Eduardo Eduardo Silva @edsiper eduardo@treasure-data.com About Me Eduardo Silva Github & Twitter Personal Blog @edsiper http://edsiper.linuxchile.cl Treasure Data Open Source Engineer Fluentd / Fluent Bit http://github.com/fluent

More information

Middleware and Web Services Lecture 3: Application Server

Middleware and Web Services Lecture 3: Application Server Middleware and Web Services Lecture : Application Server doc. Ing. Tomáš Vitvar, Ph.D. tomas@vitvar.com @TomasVitvar http://vitvar.com Czech Technical University in Prague Faculty of Information Technologies

More information

Internet Connectivity with

Internet Connectivity with Internet Connectivity with Introduction The purpose of this workshop is to help you g et acquainted with the basics of internet connectivity by leveraging ARM mbed tools. If you are not already familiar

More information

CSE 115. Introduction to Computer Science I

CSE 115. Introduction to Computer Science I CSE 115 Introduction to Computer Science I Road map Review JSON Chat App - Part 1 AJAX Chat App - Part 2 Front End JavaScript first Web Page my content

More information

Introduction of Golang, WebSocket and Angular 2

Introduction of Golang, WebSocket and Angular 2 As we know Golang is a powerful programming language introduced by Google and we can use this to implement the real-time applications. So, here we are going to use this to implement a Real-Time Chat Application,

More information

MigratoryData Server Architecture Guide. Version 5.0 November 13, 2018

MigratoryData Server Architecture Guide. Version 5.0 November 13, 2018 MigratoryData Server Architecture Guide Version 5.0 November 13, 2018 Copyright Information Copyright c 2007-2018 Migratory Data Systems. ALL RIGHTS RESERVED. THIS DOCUMENT IS PROVIDED AS IS WITHOUT WARRANTY

More information

High performance and scalable architectures

High performance and scalable architectures High performance and scalable architectures A practical introduction to CQRS and Axon Framework Allard Buijze allard.buijze@trifork.nl Allard Buijze Software Architect at Trifork Organizers of GOTO & QCON

More information

The chat application is able to display the text in two languages, English and Portuguese.

The chat application is able to display the text in two languages, English and Portuguese. Appendix Here you will find topics that do not fit perfectly into the main content of this book. Resource Bundle The chat application is able to display the text in two languages, English and Portuguese.

More information

LECTURE 15. Web Servers

LECTURE 15. Web Servers LECTURE 15 Web Servers DEPLOYMENT So, we ve created a little web application which can let users search for information about a country they may be visiting. The steps we ve taken so far: 1. Writing the

More information

Web Robots Platform. Web Robots Chrome Extension. Web Robots Portal. Web Robots Cloud

Web Robots Platform. Web Robots Chrome Extension. Web Robots Portal. Web Robots Cloud Features 2016-10-14 Table of Contents Web Robots Platform... 3 Web Robots Chrome Extension... 3 Web Robots Portal...3 Web Robots Cloud... 4 Web Robots Functionality...4 Robot Data Extraction... 4 Robot

More information

Developing Microsoft Azure Solutions (70-532) Syllabus

Developing Microsoft Azure Solutions (70-532) Syllabus Developing Microsoft Azure Solutions (70-532) Syllabus Cloud Computing Introduction What is Cloud Computing Cloud Characteristics Cloud Computing Service Models Deployment Models in Cloud Computing Advantages

More information

From the event loop to the distributed system. Martyn 3rd November, 2011

From the event loop to the distributed system. Martyn 3rd November, 2011 From the event loop to the distributed system Martyn Loughran martyn@pusher.com @mloughran 3rd November, 2011 From the event loop to the distributed system From the event loop to the distributed system

More information

AWS Lambda. 1.1 What is AWS Lambda?

AWS Lambda. 1.1 What is AWS Lambda? Objectives Key objectives of this chapter Lambda Functions Use cases The programming model Lambda blueprints AWS Lambda 1.1 What is AWS Lambda? AWS Lambda lets you run your code written in a number of

More information

Hands-On Lab. Worker Role Communication. Lab version: Last updated: 11/16/2010. Page 1

Hands-On Lab. Worker Role Communication. Lab version: Last updated: 11/16/2010. Page 1 Hands-On Lab Worker Role Communication Lab version: 2.0.0 Last updated: 11/16/2010 Page 1 CONTENTS OVERVIEW... 3 EXERCISE 1: USING WORKER ROLE EXTERNAL ENDPOINTS... 8 Task 1 Exploring the AzureTalk Solution...

More information

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 07 Tutorial 2 Part 1 Facebook API Hi everyone, welcome to the

More information

86% of websites has at least 1 vulnerability and an average of 56 per website WhiteHat Security Statistics Report 2013

86% of websites has at least 1 vulnerability and an average of 56 per website WhiteHat Security Statistics Report 2013 Vulnerabilities help make Web application attacks amongst the leading causes of data breaches +7 Million Exploitable Vulnerabilities challenge organizations today 86% of websites has at least 1 vulnerability

More information

November 2017 WebRTC for Live Media and Broadcast Second screen and CDN traffic optimization. Author: Jesús Oliva Founder & Media Lead Architect

November 2017 WebRTC for Live Media and Broadcast Second screen and CDN traffic optimization. Author: Jesús Oliva Founder & Media Lead Architect November 2017 WebRTC for Live Media and Broadcast Second screen and CDN traffic optimization Author: Jesús Oliva Founder & Media Lead Architect Introduction It is not a surprise if we say browsers are

More information

Python web frameworks

Python web frameworks Flask Python web frameworks Django Roughly follows MVC pattern Steeper learning curve. Flask Initially an April Fools joke Micro -framework: minimal approach. Smaller learning curve http://flask.pocoo.org/docs/0.12/quickstart/#a-minimalapplication

More information

DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER PROJECT

DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER PROJECT DESIGN AND IMPLEMENTATION OF SAGE DISPLAY CONTROLLER BY Javid M. Alimohideen Meerasa M.S., University of Illinois at Chicago, 2003 PROJECT Submitted as partial fulfillment of the requirements for the degree

More information

CSE 115. Introduction to Computer Science I

CSE 115. Introduction to Computer Science I CSE 115 Introduction to Computer Science I Midterm Midterm will be returned no later than Monday. We may make midterm pickup available before then. Stay tuned. Midterm results Module 1 Module 2 Overall

More information

4.0.1 CHAPTER INTRODUCTION

4.0.1 CHAPTER INTRODUCTION 4.0.1 CHAPTER INTRODUCTION Data networks and the Internet support the human network by supplying seamless, reliable communication between people - both locally and around the globe. On a single device,

More information

The realtime web: HTTP/1.1 to WebSocket, SPDY and beyond. Guillermo QCon. November 2012.

The realtime web: HTTP/1.1 to WebSocket, SPDY and beyond. Guillermo QCon. November 2012. The realtime web: HTTP/1.1 to WebSocket, SPDY and beyond Guillermo Rauch @ QCon. November 2012. Guillermo. CTO and co-founder at LearnBoost. Creator of socket.io and engine.io. @rauchg on twitter http://devthought.com

More information

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016 TRANSMISSION CONTROL PROTOCOL ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016 ETI 2506 - TELECOMMUNICATION SYLLABUS Principles of Telecom (IP Telephony and IP TV) - Key Issues to remember 1.

More information

Streaming API Developer Guide

Streaming API Developer Guide Streaming API Developer Guide Version 43.0, Summer 18 @salesforcedocs Last updated: August 2, 2018 Copyright 2000 2018 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark of

More information

EIE4432 Web Systems and Technologies Project Report. Project Name: Draw & Guess GROUP 21. WatermarkPDF. shenxialin shen

EIE4432 Web Systems and Technologies Project Report. Project Name: Draw & Guess GROUP 21. WatermarkPDF. shenxialin shen EIE4432 Web Systems and Technologies Project Report s e Project Name: Draw & Guess GROUP 21 SHEN Xialin (Spark) 12131888D Introduction XUE Peng (Raymond) 12134614D This is a multi-player draw and guess

More information

RKN 2015 Application Layer Short Summary

RKN 2015 Application Layer Short Summary RKN 2015 Application Layer Short Summary HTTP standard version now: 1.1 (former 1.0 HTTP /2.0 in draft form, already used HTTP Requests Headers and body counterpart: answer Safe methods (requests): GET,

More information

HTTP, WebSocket, SPDY, HTTP/2.0

HTTP, WebSocket, SPDY, HTTP/2.0 HTTP, WebSocket, SPDY, HTTP/2.0 Evolution of Web Protocols Thomas Becker tbecker@intalio.com 1 Intalio Intalio Jetty Services, Training and Support for Jetty and CometD Intalio BPMS Business Process Management

More information

Cisco Plug and Play Feature Guide Cisco Services. Cisco Plug and Play Feature Guide Cisco and/or its affiliates.

Cisco Plug and Play Feature Guide Cisco Services. Cisco Plug and Play Feature Guide Cisco and/or its affiliates. Cisco Services TABLE OF CONTENTS Configuring Cisco Plug and Play... 14 Contents Introduction... 3 Cisco Plug and Play Components... 3 Plug-n-Play Agent... 3 Key Benefits... 4 Plug and Play Server... 4

More information

Computer Networking. Chapter #1. Dr. Abdulrhaman Alameer

Computer Networking. Chapter #1. Dr. Abdulrhaman Alameer Computer Networking Chapter #1 Dr. Abdulrhaman Alameer What is Computer Network? It is a collection of computers and devices interconnected by communications channels that facilitate communications among

More information

Port Utilization in SocialMiner

Port Utilization in SocialMiner Utilization in Utilization Table Columns, page 1 Utilization, page 2 Utilization Table Columns The columns in the port utilization tables in this document describe the following: A value representing the

More information

Nirvana A Technical Introduction

Nirvana A Technical Introduction Nirvana A Technical Introduction Cyril PODER, ingénieur avant-vente June 18, 2013 2 Agenda Product Overview Client Delivery Modes Realm Features Management and Administration Clustering & HA Scalability

More information

Signaling for Different Applications. Matt Krebs Kelcor, Inc.

Signaling for Different Applications. Matt Krebs Kelcor, Inc. Signaling for Different Applications Matt Krebs Kelcor, Inc. Workshop Leaders John Riordan OnSIP, Founder and CEO Dr. Thomas Sheffler SightCall, Oleg Levy Eyeball Networks, Rod Apeldoorn Priologic, EasyRTC

More information

Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error

Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error The request returns http 200 OK, but the xhr status is 0, error. jquery Ajax Request to get JSON data fires error event to make an ajax

More information

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data ELEX 4550 : Wide Area Networks 2015 Winter Session UDP and TCP is lecture describes the two most common transport-layer protocols used by IP networks: the User Datagram Protocol (UDP) and the Transmission

More information

Force.com Streaming API Developer Guide

Force.com Streaming API Developer Guide Force.com Streaming API Developer Guide Version 41.0, Winter 18 @salesforcedocs Last updated: December 8, 2017 Copyright 2000 2017 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark

More information

Public Wallet Interface for Ripple

Public Wallet Interface for Ripple CS 795 Blockchain Technologies CS 795 Authors: May 15, 2017 Contents 1 Abstract 2 2 Introduction 3 3 Program Design Architecture 6 4 Functionality 7 5 Preview 10 6 In-comparison with other wallets 13 7

More information

Ajax Enabled Web Application Model with Comet Programming

Ajax Enabled Web Application Model with Comet Programming International Journal of Engineering and Technology Volume 2. 7, July, 2012 Ajax Enabled Web Application Model with Comet Programming Rajendra Kachhwaha 1, Priyadarshi Patni 2 1 Department of I.T., Faculty

More information

The paper shows how to realize write-once-run-anywhere for such apps, and what are important lessons learned from our experience.

The paper shows how to realize write-once-run-anywhere for such apps, and what are important lessons learned from our experience. Paper title: Developing WebRTC-based team apps with a cross-platform mobile framework. Speaker: John Buford. Track: Mobile and Wearable Devices, Services, and Applications. Hello everyone. My name is John

More information

The Applications and Gaming Tab - Port Range Forward

The Applications and Gaming Tab - Port Range Forward The Applications and Gaming Tab - Port Range Forward The Applications and Gaming Tab allows you to set up public services on your network, such as web servers, ftp servers, e-mail servers, or other specialized

More information

Lab 4: create a Facebook Messenger bot and connect it to the Watson Conversation service

Lab 4: create a Facebook Messenger bot and connect it to the Watson Conversation service Lab 4: create a Facebook Messenger bot and connect it to the Watson Conversation service Overview In this lab, you'll create advanced Node-RED flows that: Connect the Watson Conversation service to Facebook

More information

Controller/server communication

Controller/server communication Controller/server communication Mendel Rosenblum Controller's role in Model, View, Controller Controller's job to fetch model for the view May have other server communication needs as well (e.g. authentication

More information

Realtime PHP with web sockets

Realtime PHP with web sockets Realtime PHP with web sockets Jeff Kolesnikowicz Thanks Allied Health Media! http://alliedhealthmedia.com Really realtime Real-time communications (RTC) is a term used to refer to any live telecommunications

More information