Upload
vsoshnikov
View
245
Download
1
Embed Size (px)
Citation preview
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
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
Async replication
• Replication - everywhere we have the same dataset!
• Most of databases include Replication
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
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.
Gateway
• MIPS-based
• WAN-antenna on board
• 6lbr-gateway software installed
• 6lbr-gateway converts the radio-waves into the IPv6-package and back.
6lbr-application
• 6lbr-application has TCP/IP stack
• 6lbr-application works with any tty
• 6lbr-application doesn’t work with MQTT. Sad!
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!
MQTT-library
• libmosquitto - simple & portable & nice code!
• mosquitto - simple & fast MQTT-broker
Link: mosquitto.org/man/libmosquitto-3.html
App-server
IoT-device #1
IoT-device #N
Internet
Async M-M replication
6lbr-gateway
MQTT over UART
MQTT over UART
User
References
Tarantool
github.com/tarantool
6lbr
github.com/cetic/6lbr
Examples / My experiments
github.com/dedok/tarantool-on-edison
Questions & My contacts
facebookfacebook.com/vasiliy.soshnikov
[email protected], [email protected]
github github.com/dedok