21
Building Real Time Web Applications with GeoEvent Processor Ken Gorton, Esri

Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Building Real Time Web Applications with GeoEvent Processor

Ken Gorton, Esri

Page 2: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Agenda

• An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful GEP outputs (Feature Service, Web Sockets using JSON)

• Some web app components to consume them (FeatureLayer – with or without refresh, Stream Layer)

Page 3: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

How real-time streaming GIS data will save humanity and prevent the downfall of civilization as we know it

Demo

Page 4: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

GIS Data

Credit: iStockphoto/chris_lemmens

• GIS data typically represents state at a specific moment in time: “historic”, “current”, or “future”.

Page 5: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Real-time GIS data • Real-time GIS data is a continuous stream of events flowing from

sensors where each event represents the latest state of the sensor. - Emergency Response - Utility Networks and Warehouses - Environmental

Web Desktop Runtime

Mobile

Applications

Features Challenge #1

Police Person

Ambulance

Police Car

110°

Storm Wind

Temperature

Earthquake Wild Fire

Network Sensor Warehouse Item

Page 6: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Analyzing real-time GIS data • Are my field personnel working within the designated project area?

Web Desktop Runtime

Mobile

Applications Features Equipment

Alert

Challenge #2

Continuous Analysis

Outside Boundary

Page 7: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Analyzing real-time GIS data • Tell customer when their delivery truck is 15 minutes away.

Continuous Analysis

Web Desktop Runtime

Mobile

Applications Features Delivery Vehicle

Notification Enter Customer Area

Challenge #3

Page 8: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

ArcGIS GeoEvent Processor for Server • Receives real-time streaming data • Performs continuous processing and analysis • Sends updates and alerts to those who need it where they need it

Continuous Processing and Analysis

Connectors

Connectors

im

ws://

Alerts

Real-Time Data Features

Web Desktop Runtime

Mobile

Applications ArcGIS Server

GeoEvent Processor

Page 9: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Web Desktop Runtime

Mobile

im

ws://

GeoEvent Services Performing continuous processing and analysis

• A GeoEvent Service configures the flow of GeoEvents, - the Filtering and GeoEvent Processing steps to perform, - what input(s) to apply them to, - and what outputs(s) to send the results to.

ArcGIS for Server

GeoEvent Processor

Real-time data

Twitter Input Add Tweet Feature Geolocated Filter

Write Tweets to Hadoop

Twitter Monitor (GeoEvent Service)

Page 10: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

You can add your own connectors. Location Calculator Buffer Generator Speed Calculator Proximity Detector

Processors Types of continuous processing and analysis

• Modify a geoevent: Field Enricher, Field Reducer • Calculate new fields on a geoevent: Field Calculator, GeoTagger • Derive a new geoevent: Field Mapper, Incident Detector, Track Gap Detector, Idle Detector*

GeoEvent Service

Field Enricher

Field Reducer

Field Calculator

Geotagger

Field Mapper

Incident Detector

Input 1 Output 1

ArcGIS Server with GeoEvent Processor

Track Gap Detector

Idle Detector *coming soon

Page 11: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

You can add your own connectors.

Receiving real-time data Input connectors

• You can easily integrate real-time data with ArcGIS by using a connector that meets your needs.

Real-time data

ArcGIS for Server

GeoEvent Processor

Receive NMEA

Receive Sierra Wireless

Receive Tweets

Receive Instagram

Receive Trimble

Receive GPX

NMEA

GPX Receive Vessels

Receive Geomessages

Receive Air Traffic Control

Receive Cursor-on-Target

Receive VMF

CoT

VMF

Message Geo

Watch a folder for new Files

Receive RSS

Receive from a Socket

Receive from a Web Socket

Receive on a REST Endpoint

Poll an ArcGIS Server

Poll an external website

ws://

http://

http://

Receive RSS

Receive from a Socket

Receive from a Web Socket

Receive on a REST Endpoint

ws://

http://

Receive from a Socket

Receive from a Web Socket ws://

Page 12: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Sending real-time data Output connectors

• You can easily send resulting streams to those who need it where they need it using a connector.

Web Desktop Runtime

Mobile ArcGIS for Server

GeoEvent Processor

Real-time data

You can add your

own connectors

Send to RabbitMQ

Send to ActiveMQ

Send to HornetQ

Write to Hadoop

Write to MongoDB

Send a Tweet

Send to CESIUM

im

ws://

Send an Instant Message

Send an email

Update a Feature

Add a Feature

Send to Tracking Analyst

Send a Text Message

Publish to REST Endpoint

Send to a Web Socket

Send to a Socket

Write to a File

im

ws://

Page 13: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Your Applications

Web APIs JavaScript

Flex

Silverlight/WPF

Mobile GIS iOS

Android

Windows Phone

Runtimes Windows Store

Mac OS X

Java

Qt

ArcGIS Online / Portal

operation view

web map

Sending real-time data to feature services

ArcGIS for Server feature layers

GeoEvent Processor

ArcGIS for Server

Filters Processors

Inpu

ts

Out

puts

GeoEvent Services

Update a Feature

Add a Feature

Operations Dashboard for ArcGIS

Your Dashboards

Real-time data

Page 14: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

From GeoEvent Processor to Web App via Feature Service

• Set up the output from GeoEvent Processor - ‘Update a Feature’ Connector

- FeatureService Transport - JSON Adapter

Page 15: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

From GeoEvent Processor to Web App via Feature Service

• Use FeatureLayer in your app - Configure Url, Renderer, Popup Content, etc

var southCarolinaCounties = new esri.layers.FeatureLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3", { mode: esri.layers.FeatureLayer.MODE_SNAPSHOT, outFields: ["NAME", "POP2000", "POP2007", "POP00_SQMI", "POP07_SQMI"] }); southCarolinaCounties.setDefinitionExpression("STATE_NAME = 'South Carolina'");

Page 16: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

What’s a Stream Layer?

• ArcGIS API for JavaScript layer type • Inherits from FeatureLayer • No stateless http requests to get snapshots of data • Persistent connection via Web Sockets • Receives data through pushes

Hint: It has nothing to do with hydrology maps

Page 17: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Stream Layer - Advantages

• More efficient transfer of data. - Only negotiate a connection once. - Messages sent without extra headers

• Avoids need to poll for data updates

Feature Layer

Server Web App

Stream Layer

Server Web App

Request Response

We’re done

Request Response

We’re done

Establish Connection

Close Connection

Data Updates

We’re done

Page 18: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

From GeoEvent Processor to Web App via WebSockets

• Set up the output from GeoEvent Processor - WebSocket Transport - JSON Adapter

Page 19: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

From GeoEvent Processor to Web App via WebSockets

• Use StreamLayer in your app - Use Feature Collection to define data schema

(From GeoEvent Definition)

- Supply WebSocket connection url (From Output)

Page 20: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful

Useful Links

• WebSocket Information - http://www.websocket.org

• Stream Layer documentation - https://developers.arcgis.com/javascript/jsapi/streamlayer-amd.html

Page 21: Building Real Time Web Applications with GeoEvent Processor · •An example of how real-time streaming data could save your life • Brief intro to Geoevent Processor • Some useful