A Javascript Implementation of the Binary DIS Protocol Don McGregor, Don Brutzman, Curt Blais, MOVES Institute

Slides:



Advertisements
Similar presentations
Web 2.0 Programming 1 © Tongji University, Computer Science and Technology. Web Web Programming Technology 2012.
Advertisements

An Erlang Implementation of Restms. Why have messaging? Separates applications cheaply Feed information to the right applications cheaply Interpret feed.
1 How To Use a Browser A Module of the CYC Course – Computer Basics
Overview Environment for Internet database connectivity
The Internet and the World Wide Web. Una DooneySlide 2Internet and WWW What is the Internet? This is the physical infrastructure or backbone of computers,
The internet. Background Created in 1969, connected computers at UCLA, Stanford Research Institute, U. of Utah, and UC at Santa Barbara With an estimated.
Facts about Welcome to this video from Ozeki. In this video I will present what makes Ozeki Phone System XE the Worlds best on-site software PBX for Windows.
Information Systems Today: Managing in the Digital World
1 The phone in the cloud Utilizing resources hosted anywhere Claes Nilsson.
Developing downloadable mobile apps using HTML5 and PhoneGap Apache Callback Ron Perry, CTO, Worklight Inc.
Windows® Deployment Services
Fraunhofer Institute FOKUS
Fawaz Ghali AJAX: Web Programming's Toy.
Getting Familiar with Web Pages 1 2 The Internet Worldwide collection of interconnected computer networks that enables businesses, organizations, governments,
Intel Do-It-Yourself Challenge node.js
Java Network Programming Vishnuvardhan.M. Dept. of Computer Science - SSBN Java Overview Object-oriented Developed with the network in mind Built-in exception.
Internet of Things with Intel Edison Web controller
MeshCentral Technical Presentation
The Virtual World Framework: Implementing a Web Based Client Side Simulator Rob Chadwick, Katmai Government Services in support of ADL.
OPC WPFHMI.NET.
Client-server interactions in Mobile Applications.
Introduction to Streaming © Nanda Ganesan, Ph.D..
Social Media Apps Programming Min-Yuh Day, Ph.D. Assistant Professor Department of Information Management Tamkang University
© 2010 UEI, Inc. All Rights Reserved UEIPAC HMI.
Computer Concepts 2014 Chapter 7 The Web and .
WebSockets [intro].
Postacademic Interuniversity Course in Information Technology – Module C1p1 Contents Data Communications Applications –File & print serving –Mail –Domain.
Computing on the Cloud Jason Detchevery March 4 th 2009.
Node.js - What is Node.js? -
Asterisk based real-time social chat Advisor : Lian-Jou Tsai Student : Jhe-Yu Wu.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Outline Overview Video Format Conversion Connection with An authentication Streaming media Transferring media.
Web Engineering we define Web Engineering as follows: 1) Web Engineering is the application of systematic and proven approaches (concepts, methods, techniques,
MySQL and PHP Internet and WWW. Computer Basics A Single Computer.
Open-DIS Open Source Distributed Interactive Simulation Protocol in C++ and Java Don McGregor (mcgredo nps.edu)
Orbited Scaling Bi-directional web applications A presentation by Michael Carter
WebSocket Gateway Don McGregor Research Associate MOVES Institute
HTML5 AND THE FUTURE JAVASCRIPT PLATFORM Marcelo Lopez Ruiz Senior Software Design Engineer Microsoft Corporation.
Google Application Engine Introduction Jim Eng with thanks to Charles Severance
Contents : What is Silverlight? Silverlight Overview Silverlight Toolkit Overview Timeline & Packaging Silverlight V1.0 & V1.1 Properties of V1.0 Properties.
FCM Workflow using GCM.
Web Technologies Lecture 1 The Internet and HTTP.
Web Services Using Visual.NET By Kevin Tse. Agenda What are Web Services and Why are they Useful ? SOAP vs CORBA Goals of the Web Service Project Proposed.
WebRTC Don McGregor Research Associate MOVES Institute
Node.Js 1. 2 Contents About Node.Js Web requirement latest trends Introduction Simple web server creation in Node.Js Dynamic Web pages Dynamic web page.
INTERNET AND . WHAT IS INTERNET The Internet can be defined as the wired or wireless mode of communication through which one can receive, transmit.
® ® copyright © 2013 Open Geospatial Consortium What HTML5 and REST mean to the Geo community Raj Singh, PhD Open Geospatial Consortium
Week-6 (Lecture-1) Publishing and Browsing the Web: Publishing: 1. upload the following items on the web Google documents Spreadsheets Presentations drawings.
Keith Telle Lead Software Engineer Bit Wizards Behind the Magic: SignalR Demystified.
Simulation Networking Standards and the Web Don McGregor Research Associate MOVES Institute
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
Best Web Technologies for
Introduction to Node.js® Jitendra Kumar Patel Saturday, January 31, 2015.
SAFARI TEST AUTOMATION: NAVIGATING THROUGH THE JUNGLE BY KARAN KUMAR AND JAMES CHUONG.
Client Server Model. Server Applications (Software) Management and maintenance of Data including Management and maintenance of Data including User login.
Distributed Interactive Simulation 101: The Basics
WebSockets: TCP in Javascript
IoT Integration Patterns, REST, and CoAP
Brice Copy, Mirjam Labrenz
Simulation as a Service, Scalability, and Network Architectures
3 Things Everyone Knows About Node JS That You Don't
Building real-time web apps with WebSockets using IIS, ASP.NET and WCF
Parallel Programming in Contemporary Programming Languages (Part 2)
.NET and .NET Core Foot View of .NET Pan Wuming 2017.
03 | Building a Backend with Socket.IO and Mongo
Research Lesson 1 URLs & Hyperlinks How to access the World Wide Web.
Research Lesson 1 URLs & Hyperlinks How to access the World Wide Web.
WCF Data Services and Silverlight
Chengyu Sun California State University, Los Angeles
Presentation transcript:

A Javascript Implementation of the Binary DIS Protocol Don McGregor, Don Brutzman, Curt Blais, MOVES Institute

Javascript & Web Networking Javascript? That’s just a toy language, right? Not any more. Simulation applications can be written in Javascript, and there are significant advantages to doing so New Javascript networking standards (Websockets, WebRTC) allow low latency, high (ish) performance directly into the web page 2

Web Networking 3 Web Server Content: Javascript, 3D, images, graphing, Maps, mash-ups Websocket (Javascript TCP socket) WebRTC (Javascript UDP) Web Page: Internet Explorer Web Page: Firefox Mobile

Web Networking Websockets allow low latency TCP sockets between web page pages and servers in Javascript—no polling, not wrapped in HTTP WebRTC can allow low latency UDP Javascript messages directly between web pages Performance is not bad--~5K messages per second to desktop clients for websockets It’s all unicast—no broadcast or multicast, with all that implies 4

Why Do It? Compelling economic & system management advantages for web-based simulation –Distribute all applications from a central web server, where it can be easily upgraded –Cross-platform, including mobile –Moves at web speed—can mash up with maps, graphics, WebGL, Twitter, IM, … –Scale out on cloud, low barrier to entry. Cloud-side compute resources are effectively infinite –How many desktop apps do you use today, vs how many web based applications? That’s because the economics are that compelling 5

What Message Format? 66 These are the pipes; What format should we send state information such as position and orientation?

Message Format: JSON One option is to send messages in JSON format This is the approach taken by WebLVC But this requires you to specify the format of the JSON Lots of standards meetings 7

Message Format: DIS Classical Javascript wasn’t very good at handling binary More modern Javascript can use “ArrayBuffers” to manipulate binary data Support is good (~80% of current browsers in the wild, will only get better as old browsers are upgraded). See So why not use this to implement classic IEEE ? 8

DIS in Javascript Strong standards support, lots of gateway support for HLA, TENA, AIS, other protocols to DIS It’s already standardized DIS can be verbose and carries redundant information compared to HLA RPR-FOM, which is what WebLVC is based on Protocol issues such as heartbeat 9

Using Javascript DIS 10 // Receive and decode a message NetworkSingleton.prototype.onMessage = function(evt) { // convert from binary to javascript object var pduFactory = new dis.PduFactory(); var pdu = pduFactory.createPdu(evt.data); switch(pdu.pduType) { case 1: ….. // Convert to local (or lat/lon/alt) coordinates var localCoordinates = rangeCoordinates.ECEFtoENU(espdu.entityLocation.x, espdu.entityLocation.y, espdu.entityLocation.z); // Encode DIS var dataBuffer = new ArrayBuffer(1500); var os = new dis.OutputStream(dataBuffer); espdu.encodeToBinaryDIS(os); var trimmedData = dataBuffer.slice(0, os.currentPosition); websocketConnection.send(trimmedData);

Performance Compared to JSON Binary DIS vs JSON-encoded DIS, longer bars better Yellow JSON DIS, red binary DIS 11

Performance Notes See benchmark your own browser, or create new benchmarkshttp://jsperf.com/javascript-dis-native-vs-json/2 Both JSON and binary formats can be workable; depending on Javascript engine they can even be about the same Browsers and Javascript engines matter a lot! JSON can be as fast as binary on some browsers and Javascript engines (IE 11, for example) JSON can be faster on IE 11 than binary on Firefox I suspect in the long term results will converge towards the current Safari benchmarks as Javascript engines improve OK performance on mobile—and it works on mobile! OK for a few thousand messages per second into the web page (depending on lots of stuff) which puts about a 10% load on desktop CPU In general, the simulation implementation is more likely to be an issue than the networking overhead, particularly with 3D. 12

Binary Javascript DIS Vs WebLVC 13 WebLVC JSON update messages have less state information and can be parsed somewhat faster, but it’s in the same ballpark WebLVC can also avoid DIS heartbeats

Google Maps Example Application on server side listens for traditional native UDP DIS on the local ethernet network. In this case, AIS (real time commercial ship locations) is being translated into DIS by JBUS Web page receives forwarded DIS messages via websockets, decodes, does coordinate conversion to lat/lon, displays icon on map. Also sends DIS updates based on web browser geolocation Uses Google Maps Javascript API to implement a real-time mapping application. Works on modern browsers and mobile, including IOS and Android 14

Google Maps + DIS in Browser 15

Availability Free, BSD non-viral license open-dis-code/ –Includes server side code (to convert native UDP to websocket transport) and client code in languages/javascript directory NodeJS is a scalable server-side Javascript framework popular in Silicon Valley (used at linkedin, twitter, ebay, etc.) –NodeJS DIS javascript module available at 16

Future Work Open Street Map vs Google Maps to avoid proprietary vendor dependencies, requirement to have a Google Maps server inside classified areas Server side architecture for scalability: how much to put on client vs server? How to limit traffic to the client? Inherent unicast problems as the number of clients increase? Node.js transport gateways on the server side? Integration with voice, video in web browsers and DIS intercom PDUs Integrate with 17