SlideShare a Scribd company logo
Vasiliy Soshnikov, Sr. Software Engineer, Mail.Ru Group
Master-Master Replication and Scaling of an
Application between each of the IoT-Devices
and the Cloud
Agenda
• General idea
• An implementation
• Result
General idea
Everything are sync
App-server
IoT-device #1
IoT-device #N
Internet
World
More
IoT-devices
User
Requirements
• The system should sync data between each IoT-
devices
• The system should getting data from IoT-devices
• The system should sync data IoT-devices and the
cloud
User / App server
App server
HTTP / HTTPS / WebSockets Internet
Internet / IoT devices
App-server
IoT-device #1
IoT-device #2
Internet
World
?
Internet / IoT devices
App-server
IoT-device #1
IoT-device #2
Internet
World
MQTT
Internet / IoT devices
App-server
IoT-device #1
IoT-device #2
Internet
World
Even HTTP(S)
Internet / IoT devices
App-server
IoT-device #1
IoT-device #2
Internet
World
Some protocols
Internet / IoT devices
App-server
IoT-device #1
IoT-device #2
Internet
World
Async replication!
Async replication
• Replication - everywhere we have the same
dataset!
• Most of databases include Replication
Few words about databases
Databases
• Sqlite - no replication, no concurrent access
• Redis - only M-S replication
• MySQL and PgSQL - they to heavy for the small
device
• Tarantool - M-M replication, M-S replication
• Or any DB with M-M replication
An implementation
Problems with Tarantool
Problems with Tarantool
• Didn’t work under the armv7
• Didn’t work under the 32-bit (only 64-bit)
Solved!
• Use toolchain files for CMake.
• Don’t use unsigned and other types with specified
sizes; the libc has concrete types, like uint32_t.
• Port auto-test, you should expect that your auto-
test may be executed under a IoT-device.
IoT-device with 6LoWPAN / LoRaWAN
6LoWPAN / LoRaWAN
IoT-device #1
IoT-device #N
World
More
IoT-devices
Getaway
Radio Waves
Gateway
• MIPS-based
• WAN-antenna on board
• 6lbr-gateway software installed
• 6lbr-gateway converts the radio-waves into the
IPv6-package and back.
6lbr
Link: cetic.github.io/6lbr/
or tty
6lbr-application
• 6lbr-application has TCP/IP stack
• 6lbr-application works with any tty
• 6lbr-application doesn’t work with MQTT. Sad!
Few words about 6lbr-application
6lbr-application
• It has complex thread model
• It has complex memory model
Main loop of an application
What is next?
• 6lbr-gateway gives a possibility to create mesh-
network
• 6lbr-gateway and Tarantool tied via MQTT-broker.
• But! Tarantool doesn’t work with MQTT!
Tarantool / MQTT
MQTT-library
• libmosquitto - simple & portable & nice code!
• mosquitto - simple & fast MQTT-broker
Link: mosquitto.org/man/libmosquitto-3.html
Master-Master Replication and Scaling of an Application Between Each of the IoT Devices and the Cloud
Looping / Tarantool Fibers
Link: github.com/tarantool/mqtt
Example
6lbr-gateway / MQTT / Async M-M Replication
Result
App-server
IoT-device #1
IoT-device #N
Internet
Async M-M replication
6lbr-gateway
MQTT over UART
MQTT over UART
User
Inside devices
Devices for prototyping
TODO the photo of GETAWAY
Gateway
Relay
Sensor
Relay
IoT-device
References
Tarantool
github.com/tarantool
6lbr
github.com/cetic/6lbr
Examples / My experiments
github.com/dedok/tarantool-on-edison
Questions & My contacts
facebook
facebook.com/vasiliy.soshnikov
e-mail
v.soshnikov@corp.mail.ru, dedok.mad@gmail.com
github
github.com/dedok



More Related Content

What's hot (20)

PDF
OpenRestyを用いてイケイケなサービスを作る方法
Sho Yoshida
 
PDF
Monitoring NGINX (plus): key metrics and how-to
Datadog
 
PPTX
Docker Security
antitree
 
PDF
Icinga 2 and puppet: automate monitoring
OlinData
 
PPTX
Code lifecycle on the Acquia Cloud Platform
Timothy Hilliard
 
PPTX
Demystifying Software Defined Networking (SDN)
Matt Bynum
 
ODP
2600 av evasion_deuce
Db Cooper
 
PDF
MITM Attacks with Ettercap : TTU CyberEagles Club
Shritesh Bhattarai
 
PDF
Bettercap
Shritesh Bhattarai
 
PDF
Network Test Automation - Net Ops Coding 2015
Hiroshi Ota
 
PDF
Cloud Native SDN
Romana Project
 
PPTX
Nsa and vpn
antitree
 
PDF
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
NETWAYS
 
PPTX
Automated Deployment Using Jenkins Across Clusters
Naveen S.R
 
ODP
The rsyslog v8 engine (developer's view)
Rainer Gerhards
 
PDF
What is new in icinga2
Icinga
 
PDF
Kickstart your Kafka with Faker Data | Francesco Tisiot, Aiven.io
HostedbyConfluent
 
PPTX
Laverna vs etherpad
antitree
 
PDF
Nikto
Sorina Chirilă
 
PDF
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
Puppet
 
OpenRestyを用いてイケイケなサービスを作る方法
Sho Yoshida
 
Monitoring NGINX (plus): key metrics and how-to
Datadog
 
Docker Security
antitree
 
Icinga 2 and puppet: automate monitoring
OlinData
 
Code lifecycle on the Acquia Cloud Platform
Timothy Hilliard
 
Demystifying Software Defined Networking (SDN)
Matt Bynum
 
2600 av evasion_deuce
Db Cooper
 
MITM Attacks with Ettercap : TTU CyberEagles Club
Shritesh Bhattarai
 
Network Test Automation - Net Ops Coding 2015
Hiroshi Ota
 
Cloud Native SDN
Romana Project
 
Nsa and vpn
antitree
 
OSDC 2015: Bernd Erk | Why favour Icinga over Nagios
NETWAYS
 
Automated Deployment Using Jenkins Across Clusters
Naveen S.R
 
The rsyslog v8 engine (developer's view)
Rainer Gerhards
 
What is new in icinga2
Icinga
 
Kickstart your Kafka with Faker Data | Francesco Tisiot, Aiven.io
HostedbyConfluent
 
Laverna vs etherpad
antitree
 
Puppet Camp Paris 2015: Continuous Integration of Puppet Code (Intermediate)
Puppet
 

Viewers also liked (9)

PPTX
Data Driven SEO 3 - Николай Чудинов
Chudinov Nikolay
 
PDF
Хранение данных на виниле / Константин Осипов (tarantool.org)
Ontico
 
PDF
NoSQL — неспроста ли это "ЖЖЖ"?
Daniel Podolsky
 
PDF
Использование Tarantool в качестве платформы виртуализации данных / Константи...
Ontico
 
PPTX
За счет чего Tarantool такой оптимальный / Денис Аникин (Mail.Ru)
Ontico
 
PPTX
Стратегия и тактика улучшения производительности BSS систем оператора мобильн...
Ontico
 
PPTX
Dennis Anikin - Tarantool Case Studies in Mail.Ru Group
Mail.ru Group
 
PDF
"Обзор Tarantool DB"
Badoo Development
 
PDF
РИФ 2016, Tarantool – кейсы использования
Тарасов Константин
 
Data Driven SEO 3 - Николай Чудинов
Chudinov Nikolay
 
Хранение данных на виниле / Константин Осипов (tarantool.org)
Ontico
 
NoSQL — неспроста ли это "ЖЖЖ"?
Daniel Podolsky
 
Использование Tarantool в качестве платформы виртуализации данных / Константи...
Ontico
 
За счет чего Tarantool такой оптимальный / Денис Аникин (Mail.Ru)
Ontico
 
Стратегия и тактика улучшения производительности BSS систем оператора мобильн...
Ontico
 
Dennis Anikin - Tarantool Case Studies in Mail.Ru Group
Mail.ru Group
 
"Обзор Tarantool DB"
Badoo Development
 
РИФ 2016, Tarantool – кейсы использования
Тарасов Константин
 
Ad

Similar to Master-Master Replication and Scaling of an Application Between Each of the IoT Devices and the Cloud (20)

PPTX
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Adam Dunkels
 
PPTX
IoT development (APIcon 2014 presentation)
Mike Milinkovich
 
PDF
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
Samsung Open Source Group
 
PDF
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
WithTheBest
 
PDF
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
Samsung Open Source Group
 
PDF
Fundamental components of the Internet of Things unit 1.pdf
govindsingh258478
 
PPTX
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Adam Dunkels
 
PDF
Quest for a low powered home hub 120522
Paul Tanner
 
PDF
Lecture1 - Introduction-MCU-MPU-EMBEDDED.pdf
bachbuissrr
 
PPTX
IoT heap 1
SushrutaMishra1
 
PDF
Sss14boland Neul
Justin Hayward
 
PDF
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
Param Singh
 
PPTX
IoT.pptx
sateeshka
 
PDF
Designing Internet of things
Mahdi Hosseini Moghaddam
 
PDF
IOT_Working_computer_science_business_recap
AmineBesrour
 
PPTX
Oop2018 tutorial-stal-mo2-io t-arduino-en
Michael Stal
 
PDF
Framework for IoT Interoperability
Samsung Open Source Group
 
PPTX
Internet of Things Architecture / Topology
NEEVEE Technologies
 
PPTX
The Internet of Things (IoT) and its evolution
Sathvik N Prasad
 
PDF
Bringing Legacy Devices Online
Jan Rodig
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Adam Dunkels
 
IoT development (APIcon 2014 presentation)
Mike Milinkovich
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
Samsung Open Source Group
 
IoT: From Arduino MicroControllers to Tizen Products Using IoTivity - Philipp...
WithTheBest
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
Samsung Open Source Group
 
Fundamental components of the Internet of Things unit 1.pdf
govindsingh258478
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Adam Dunkels
 
Quest for a low powered home hub 120522
Paul Tanner
 
Lecture1 - Introduction-MCU-MPU-EMBEDDED.pdf
bachbuissrr
 
IoT heap 1
SushrutaMishra1
 
Sss14boland Neul
Justin Hayward
 
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
Param Singh
 
IoT.pptx
sateeshka
 
Designing Internet of things
Mahdi Hosseini Moghaddam
 
IOT_Working_computer_science_business_recap
AmineBesrour
 
Oop2018 tutorial-stal-mo2-io t-arduino-en
Michael Stal
 
Framework for IoT Interoperability
Samsung Open Source Group
 
Internet of Things Architecture / Topology
NEEVEE Technologies
 
The Internet of Things (IoT) and its evolution
Sathvik N Prasad
 
Bringing Legacy Devices Online
Jan Rodig
 
Ad

Recently uploaded (20)

PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Executive Business Intelligence Dashboards
vandeslie24
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 

Master-Master Replication and Scaling of an Application Between Each of the IoT Devices and the Cloud