Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

40
Wearables at Scale Deploying OSGi on an army of Cubie Trucks Frank Lyaruu

Transcript of Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Page 1: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Wearables at ScaleDeploying OSGi on an army of Cubie Trucks

Frank Lyaruu

Page 2: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

About me

Frank Lyaruu

CTO at

Senior Technology Architect at

@lyaruu

11/17/14 2

Page 3: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

About Dexels

• Est. 2001 based in Amsterdam

• Enterprise software for large companies

• Heavily invested in OSGi

• Focused on sports and entertainment11/17/14

3

Page 4: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

About Dexels

• Est. 2013

• Joint venture with Dexels

• Custom hardware for large events

11/17/144

Page 5: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

• Case study

• Hardware stack

• Software stack

• Development chain

• DEMO!

5

Page 6: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Tomorrowland

Page 7: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Tomorrowland

Page 8: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Tomorrowland 2014

Electronic music festival near Antwerp, Belgium

• 2 weekends

• 8 stages

• ~100 hectares

• ~100k visitors a weekend

• ~ € 250 per ticket

11/17/148

Page 9: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Requirements

Page 10: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Requirements

Design a wristband to do:

• Access control

• Location

• Profiling / feedback

• Crowd monitoring

• Integrate with 3rd party applications

• Something that adds to the UX

11/17/1410

Page 11: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Access control

• Should always work

• Should be secure

…simplicity is essential: Passive RFID

11/17/1411

Page 12: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Location

• Ability to locate individuals

• Ability to locate security personnel

11/17/1412

Page 13: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Profiling / feedback

• How do the visitors behave?

• What acts are popular?

11/17/1413

Page 14: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Crowd monitoring

• Find hotspots in the flow of people

• Dashboard for security personnel

11/17/1414

Page 15: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

UX

• UX is key

• Comfortable

• Match the festival

• Suitable for non-nerds

11/17/1415

Page 16: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

The plan

Page 17: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

The setup

• Set up base stations around the terrain

• Wristbands will report status

• The base stations triangulate and consolidate the data

• Visualize and push the data to other applications

• Use regular passive RFID for access control11/17/14

17

Page 18: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Something cool

• LED lights on the wristbands, integrated with the light show

• A button to send Facebook friend requests

11/17/1418

Page 19: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

The protocol

• Time slotted protocol

• All base stations synchronise with each other

• Visitor bracelets send every few minutes

• Staff bracelets send every few seconds

11/17/1419

Page 20: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Hardware

Page 21: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Hardware

• One 3V battery for 3 days

• Leather

• Branded for the festival

• < $10 per bracelet

11/17/1421

Page 22: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Base station hardware

22

Page 23: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Base station

23

Page 24: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

§

24

Page 25: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Hardware challenges

Page 26: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

11/17/1426

Page 27: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Base stations

• Heat

• Rain

• Unreliable power

• Unreliable network

• Unstable mount points

• Electromagnetic interference

11/17/1427

Page 28: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Base station deployment

28

Page 29: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Base stations

11/17/1429

Page 30: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Local “datacentre”Local “datacentre”

Hazelcast clusterHazelcast cluster

Sendrato Infrastructure

11/17/1430

CubieTruckCubieTruck CubieTruckCubieTruckCubieTruckCubieTruck

CloudCloud

Salt MasterSalt Master

Log serverLog server

MongoDbMongoDb MongoDbMongoDb

Super coordinatorSuper coordinator

Management UIManagement UI

3rd party3rd party

Page 31: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Base station software stack

11/17/1431

Fedora 20Fedora 20

JavaJava

Apache FelixApache Felix

Salt

age

ntSa

lt a

gent

Sendrato ApplicationSendrato Application

Page 32: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Base stationBase station

Basestation software

32

Radio DriverRadio Driver OSGi eventOSGi event

Log locally?Log locally?

Publish in clusterPublish in clusterFilter eventFilter event

Radio Radio

WristbandsWristbands

Page 33: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Logging

• Custom Logback appender to Redis queue

• ElasticSearch analytics

• Kibana web interface

33

Page 34: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Salt Stack

• Configuration manager

• Remote execution

• Agent based

• Versatile & Fast

• Master running in the cloud

34

Page 35: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

“Testing in production”

Page 36: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Development cycle

36

EclipseEclipse Maven buildMaven build GitGit SaltSalt FileInstallFileInstall

• Pretty crude but effective:

Page 37: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Future work

• Distributed OSGi

• More mature deployment model

• Apache Karaf + Cellar

• Pluggable network / clustering

• Proper 3rd party API

37

Page 38: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Demo

Page 39: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

• http://youtu.be/eDZaea7OCd0 39

Page 40: Deploying OSGi on an Army of CubieTrucksSendrato powerpoint

Thank you!@Sendrato

sendrato.com

[email protected]

40