35
© COPYRIGHT IKERLAN 2016 www.ikerlan.es Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos Technological Centre Angel Conde, Cristobal Arellano, Santi Charramendieta (IK4-Ikerlan) Oscar Ocariz (ULMA Handling Systems)

Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

Embed Size (px)

Citation preview

Page 1: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

Technological Centre

Angel Conde, Cristobal Arellano, Santi Charramendieta (IK4-Ikerlan)

Oscar Ocariz (ULMA Handling Systems)

Page 2: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

I. Introduction

II. Components

III. Architecture

IV. Conclusions & Future Work

Page 3: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 3

ULMA Handling Systems

Provides all-round logistics systems (e.g., automatic warehouses)

Custom turnkey solutions

Design, development, assembly & maintenance

World Wide presence

Page 4: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 4

An ULMA Warehouse

Page 5: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 5

COMPONENTS

ConveyorStacker Crane

Elevator

A system that is physically distributed composed by independent devices that carry out automatic tasks

Page 6: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016

COMMON FAILURES

• Physical failures &Deterioration

• Logical failuresSW errorsSW updatesLogical/Physical mismatch

“Automatic elements fail sooner or later”

6

Page 7: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 7

ULMA & the Industry 4.0.

Reduce down time

Integration with 3rd systems

Lower maintenance costs

Predictive maintenance

Smart Warehouse

Industry 4.0

BIG DATA

CIBERSECURITY

IIOT

CLOUD

MODELING & SIMULATION

M2M

Page 8: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 8

Supervisor

Message Bus

DDSAdapter

DDSAdapter

DDSAdapter

ULMA - Supervisor

Message Bus based on DDS

Operational Data

“The Supervisor system gathers information about operational data and malfunctions”

Distributed: monitoring system natureScalable: different size of warehouseExtendible: useful with different devicesReliable: without errors

Page 9: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 9

The Supervisor & Industry 4.0.Useful for local maintenanceLocal data valuable for later analytics

However….

No remote monitoringManual data collectionOperational data can be lost

Industry 4.0

BIG DATA

CIBERSECURITY

IIOT

CLOUD

MODELING & SIMULATION

M2M

Page 10: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 10

The Cloud Supervisor

Live Mirror of each Real Supervisor

Responsible of storing the operational data

Can define its own rules

Aggregates must be supported

Supervisor1

Supervisor2

Real Supervisors

Cloud Superviso

r 1

Cloud Superviso

r 1 & 2

Cloud

Operational Data

Page 11: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

I. Introduction

II. Components

III. Architecture

IV. Conclusions & Future Work

Page 12: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 12

PLATFORM GOALS

Public Cloud, Private Cloud, Hybrid

Avoid Vendor Locking

Resiliency

Elasticity

Efficient resource usage

?

Page 13: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 13

CLOUD AGNOSTIC PLATFORMWhy ?

From Static Resource Partitioning to Elastic Sharing

REST APICassandraSpark

Static Partitioning

Elastic Sharing

Page 15: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 15

MESOS FEATURES

Battle tested on Twitter

Up to 10,000 nodes

Launch any task using or cgroups 

Resource isolation

Commercial support via

Page 18: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 18

REVERSE PROXY& LB

Multiple backends (Mesos, Consul, Docker…)

Dynamic Watchers for backends

Open Source

HTTPS SNI

Deployed on the “edge node”

Page 19: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 19

MESSAGE BUSDecouple the components

De Facto Standard in Big Data Architectures

Publish / Subscriber model

HA enabled

High Performance

Deployed using the Mesos Framework

Page 20: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 20

STORAGE

HDFS deployed in HA (Mesos Master Nodes)

Files stored in Columnar format (Parquet)

Not deployed as Mesos framework

Horizontal scalability

“Small Files problem”

Page 21: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 21

ANALYTICS

Big Data Analytics in Memory

Standard SQL Support

Deployed using the Mesos Spark Scheduler

Machine Learning

Real Time Processing

Page 22: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 22

SERVICE DISCOVERY & MONITORING

Service Discovery using DNS records

Port discovery via DNS SVR records

Service Health-monitoring

Circuit Breakers

Node/Service Monitoring

Task registration via Marathon/Consul

Page 23: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 23

PLATFORM OVERVIEW

Edge Node

MESOS Agent Nodes

Consul Client

Consul Client

Agent

Proxy

MESOS Master NodeNameNode

Consul Server

Master

External traffic

(HTTPS)

Secured Cloud Infrastructure

DataNode

Consul Client

Agent

DataNode

HTTP

ZooKeeper

Mesos coordinatorsHDFS NamenodesConsul for Service DiscoveryTraffic Ingestion

HTTPS SNI

Mesos Agent Consul ClientHDFS DatanodesTasks (Supervisors)

Page 24: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

I. Introduction

II. Components

III. Architecture

IV. Conclusions & Future Work

Page 25: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es 25

Message BusIngestion/ Analytics

ULMA Cloud

Storage

Storage

Storage

Cloud Supervisor

Cloud Supervisor

Cloud Supervisor

Ingestion/ Analytics

Ingestion/ Analytics

1,000 FT OVERVIEW

Supervisor1

Supervisor2

Supervisor3

Oper

atio

nal D

ata

Page 26: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

JVM web based app

Dynamic port binding via Marathon

Cgroups used as containerizer

Entry points assigned via labels

Look for:- Random number generation exhaustion - JVM DNS Caching

26

PLATFORM COMPONENTSThe Cloud Supervisor

Page 27: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

Kafka producer module

Sends data to Kafka instead of the local system

Local queue used in case of connection problems

Each supervisor sends data to its own topic (aggregates)

27

PLATFORM COMPONENTSThe Save Interface for the (cloud) Supervisor

Page 28: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

Deployed using Spark Mesos Scheduler

Lambda architecture (RT / Batch)

Data Ingestion & Storage from Kafka

AVRO schemas simulating IEC61850.

Ingestion tested up to 100,000 events/sec

28

The Spark ServerPLATFORM COMPONENTS

Page 29: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es 29

The Spark Server (II)PLATFORM COMPONENTS

Cloud Superviso

r1

Cloud Superviso

r2.

Operational DataStreaming

Retains recent data on memoryPersists operational data to HDFSLambda (RT/Batch) queries via SQL endpointREST API

SQL

Decouples the systemEach supervisor has its own topic

Page 30: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es 30

The Spark Server (III)PLATFORM COMPONENTS

Operational Data

StreamingSQL

• Real-Time Data“Recent Data” in memory tableRT algorithmsData is saved to the “staging” HDFS directoryUncompacted Partitioned Parquet (date/supervisor)

• Batch DataExposes “batch” data via “Old Data” Table Reload compacted data from HDFS when the

compaction is done

Page 31: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

HDFS must: Avoid small files!!!!How to solve it?

Scheduled task executed by Chronos

Kite project is used for the task

“Staging” “Compacted”

31

PLATFORM COMPONENTSThe Compactor

Page 32: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

I. Introduction

II. Components

III. Architecture

IV. Conclusions & Future Work

Page 33: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 33

CONCLUSIONS

Remote Monitoring already valuable for clients

Global data collection available 24x7 Platform easily deployable on any provider

Efficient resource usage

Analytics on recent and batch data using standard SQL

Industry 4.0

BIG DATA

CIBERSECURITY

IIOT

CLOUD

MODELING & SIMULATION

M2M

Page 34: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es© COPYRIGHT IKERLAN 2016 34

FUTURE WORKMove to

Real-time analytics

Evaluate Cassandra as backend storage

Structured streaming, dynamic allocation on Spark 2.0.+

Run more ULMA software on the platform

Overlay networks, aka “IP per container”

Page 35: Solving the Industry 4.0. challenges on the logistics domain using Apache Mesos

© COPYRIGHT IKERLAN 2016 www.ikerlan.es

www.ikerlan.es

Questions: [email protected]