Transcript
Page 1: Boundary Front end tech talk: how it works
Page 3: Boundary Front end tech talk: how it works

When we say real-time we mean it: JSON being pushed to the browser once a second and visualizations built to constantly move and adapt to streaming data

Page 4: Boundary Front end tech talk: how it works

Boundary | Architecture

Page 5: Boundary Front end tech talk: how it works

Meters Lightweight and highly scalable, these sit on the cloud as well as private data centers across virtual or physical servers.

!

Page 6: Boundary Front end tech talk: how it works

Collectors Intercept Meter data via Transport Layer Security (TLS) Authentication.

Page 7: Boundary Front end tech talk: how it works

Data Store Collect all of the data at high resolution to gain rich insight into complex environments & problems before they can impact critical business services.

Page 8: Boundary Front end tech talk: how it works

Streaming Real-time continuous data streaming at high resolution, low latency intervals.

Page 9: Boundary Front end tech talk: how it works

Streaming UI Stream data to your dashboard with sub-second latency,providing you with intuitive, powerful dashboard.

Page 10: Boundary Front end tech talk: how it works

How We Get Data

• CometD server (streaker)!

• Pulls in data from multiple backend services and streams it out to clients!

• Can also aggregate and filter data on demand

Page 11: Boundary Front end tech talk: how it works

Subscriptions

54321

Receiveadd/remove

messages

Receivestate-dump

(inserts & schema)

Subscribe tonew query

(unique channel)

Get back a subscription ID

(Query ID)

Make asubscription request

(query and filters)

!

!

!

! !!

Page 12: Boundary Front end tech talk: how it works

Data Structure

• Schema and key(which fields are concatenated for each record)

• State dump with schema for requested time window(up to 100kb state dumps)

• Save bandwidth with N-tuples indexed by the schema

• Adds/removes update the state with keys (subset of schema)

Page 13: Boundary Front end tech talk: how it works

JSON

{channel:""/query/ac3941b8924a2f73/custom9query92f536bbc93f159418b98f1a973b5dc4e78379filter979564d6c94c9394f479abae906ff95a3411e9aggregation9b5cc18d49098d949c29a08497037b08a30e6"data:"{insert:"[[1331234598000,"80:6,"100,"8463,"93,"9672],"[1331234925000,"8080:6,"242,"39657,"243,"40865],"…],keys:"[epochMillis,"portProtocol],schema:"[epochMillis,"portProtocol,"ingressPackets,"ingressOctets,"egressPackets,"egressOctets],timestamp:"1331235119001

}}

{"1331234598000:80:6":"{"epochMillis":=1331234598000,"portProtocol":="80:6","ingressPackets":"100,"ingressOctets":"8463,"egressPackets":"93,"egressOctets":"9672

},"1331234925000:8080:6":"{"epochMillis":=1331234925000,"portProtocol":="8080:6","ingressPackets":"242,"ingressOctets":"39657,"egressPackets":"243,"egressOctets":"40865

}…

}

Example port:protocol subscription State Object

Page 14: Boundary Front end tech talk: how it works

DataSource.js

• Negotiates between multiple data sources and subscribers on a page

• One data source for N subscribers

• Abstracts CometD subscription process for JS development

• Smart enough to resubscribe and notifies subscribers(so that state dumps aren’t doubled up)

DataSources

Subscribers

Subscriptions

Page 15: Boundary Front end tech talk: how it works

bndry.datasource repo

//"Receives"object"with"properties"for"state,"inserts"and"removes."function"updateData(data)"{"" console.log(data.added);"}"

//"Create"a"handle"to"a"new"data"source"var"volumeDataSource"="bndry.dataSource('volume_1s');"

//"Add"a"subscriber"and"start"getting"updates."volumeDataSource.addSubscriber(updateData);

Page 16: Boundary Front end tech talk: how it works

Demo Time

Page 17: Boundary Front end tech talk: how it works

Data and Subcription Problems

• Monolithic, Multi-Purpose Queries• Large State Dumps cause CometD timeout

(5-10MBs per second)• No Resubscription• Aggregated all data on front-end

Page 18: Boundary Front end tech talk: how it works

Data and Subcription Solutions

• Stratified, Filterable Queries and server-side aggregation• Top-N Limitations

(constrained output)• Resubscription & filtering• Web workers haven’t helped much• Time smoothing (1-second ticks)

Page 19: Boundary Front end tech talk: how it works

Visualization

DOM manipulation is expensive ...so is tweening

CanvasSVG

Page 20: Boundary Front end tech talk: how it works

What’s Next

• WebSockets

• Historical Data and long term data storage

• HTML5 local storage (store data)

• Machine-learning for real-time network visualization

Page 21: Boundary Front end tech talk: how it works

Thank You


Top Related