24
[Big]Data in IoT: from Lambda architecture to predictive maintenance by Tatyana Matvienko

BigData in IoT #iotconfua

Embed Size (px)

Citation preview

Page 1: BigData in IoT #iotconfua

[Big]Data in IoT:from Lambda architecture to predictive maintenance

by Tatyana Matvienko

Page 2: BigData in IoT #iotconfua

IoT… Haven’t heard?

Page 3: BigData in IoT #iotconfua

The Internet of Things is...

● Healthcare

● Energy delivery (water, oil & gas)

● Connected city

● Smart vehicles (cars, elevators...)

● Security sensors and devices

● Monitoring and analytic systems

● Smart...

Page 4: BigData in IoT #iotconfua

The problemDevice

● Electronics knowledge

● Master-Slave architecture

● OSI model● Binary protocol● Cloud connectivity

Server

● Meta- and time-series data

● Data storage● Business logic● Data analysis● Client applications

Orchestration

● Scalability● Fault-tolerance● Administration● Responsibility

Page 5: BigData in IoT #iotconfua

SolutionDeviceHive

Machine to Machine (M2M) open source Communication Framework

Page 6: BigData in IoT #iotconfua

What is DeviceHive?

Firmware

● Install Ubuntu Snappy Core on your device

● BLE support● Firmwares● Gateways

Device Server

Java and .NET based servers

● REST & Websockets● API libraries in

different languages (JS, C, C#, Python...)

● Lambda-architecture

Orchestration

Simplify deployment as much as possible

● Documentation● Playgrounds● Wrap the containers

Page 7: BigData in IoT #iotconfua

REST/WebsocketsBINARY BINARY

Gateway Gateway

Device management

and monitoringData analysis and

visualisationBigData StorageReal time data

processing

Page 8: BigData in IoT #iotconfua

What it used to be...● JavaEE, EJB, Glassfish● Hibernate with RDBMS for meta and operational data

(PostgreSQL)● REST and Websockets handled the same way● Hazelcast for both - caching and messaging ● Integration with Docker● Admin console with the latest 100 notifications in the table (JSON)

Page 9: BigData in IoT #iotconfua

Step 1: Java server

Page 10: BigData in IoT #iotconfua

One day your IoT project becomes BigData challenge...

Page 11: BigData in IoT #iotconfua

Lambda-architecture ○ Batch Layer○ Serving Layer○ Stream Layer

Page 12: BigData in IoT #iotconfua

Lambda-architecture in DeviceHiveLambda architecture is a data-processing architecture designed to handle massive quantities of data by taking advantage of both batch- and stream-processing methods.

Page 13: BigData in IoT #iotconfua

What was done...

● Message bus added (Kafka)● Only metadata in RDBMS● Operational data to message bus and cache only● REST endpoints are served from cache only● Cassandra worker streaming data from Kafka to C*● Moved to Spring and Spring boot

Page 14: BigData in IoT #iotconfua

Step 2: Deployment

Page 15: BigData in IoT #iotconfua

So, let’s setup our project...

● Download and build sources● Setup database● Configure Glassfish● Configure Kafka● Configure Zookeeper● Configure Cassandra (if needed

of course...)● Run● Fail

Page 16: BigData in IoT #iotconfua

Welcome to Juju

Page 17: BigData in IoT #iotconfua

Mesos & Marathon

Page 18: BigData in IoT #iotconfua

PintostackContainerization

● Every service is a container● Container is more than just an app, it is an environment● Container is a final build artifact● Containers for HDFS nodes, Databases, Microservices, Web Applications● Docker Containers are the first class citizens

Key Components● Infrastructure: supply of resources● Containers● Resource abstraction● Scheduling● Service discovery● Logging

Page 19: BigData in IoT #iotconfua

Step 3: Analysis and visualisation

Page 20: BigData in IoT #iotconfua

Freeboard.io

● A web-based tool● Fully customizable

and interactive user-interfaces

● Real time dashboards

Page 21: BigData in IoT #iotconfua

ELK (Elasticsearch + Logstash + Kibana)Open source, scalable solution to search, analyze, and visualize your data, allowing you to get actionable insight in real time

Page 22: BigData in IoT #iotconfua

Spark Streaming + Zeppelin

Page 23: BigData in IoT #iotconfua

Apache Spark

Page 24: BigData in IoT #iotconfua

Q&A?...