3

I'm working in a IoT project and my role is to provide APIs to allow devices to communicate with server/database. I have decided to use MySql for relational data like user details etc.. and MongoDb for other data like device data (Multi tenant data), and PHP Laravel framework for API development.

I just want to know if this is good combination of Language, Framework and Databases? if not then what is the good combination of Language, Framework and Database, as per my requirement.

As of now devices are limited but in future it may goes into thousands and can send data frequently (Once in a minute or once in 5 seconds). Most of the devices will be running on low power and memory, ex., Temperature, Humidity, Heart Beats sensors. Same time APIs will be used for web portal as well. End of the day Rest APIs will get used by Devices, WebPortal, MobileApp.

  1. Is it good to use MongoDb+MySql over other databases like PostgresSQL? or any other suggestions.
  2. Is it good to use two different platforms for API development, one for devices (MQTT+Mosquitto) and another for web portal and mobile app (Laravel). Or any suggestion to make this system better.
  3. What programming language would you suggest in open source?
  • 3
    How many planned devices? What availability do you need? What reliability? How much data is communicated? You didn't really give any good requirements for picking either of those. – Helmar Jan 2 '18 at 20:49
  • 2
    What are the IoT devices being used on the edge to collect the data which is then transferred to some data collection and storage facility? Most IoT devices are low powered, small micro-controller type devices with significant constraints on available memory and software functionality, e.g. no operating system. Typically these small devices sample some phenomena and report the measurements using a messaging protocol (CoAP, MQTT, AMQP) through a broker (RabbitMQ, ActiveMQ) where an observer then processes the data and stores it. – Richard Chambers Jan 2 '18 at 23:45
  • 1
    @RechardChambers As of now devices are limited but in future it may goes into thousands and can send data frequently (Once in a minute or once in 5 seconds). Most of the devices will be running on low power and memory, ex., Temperature, Humidity, Heart Beats sensors. Same time Rest APIs will be used for web portal as well. End of the day Rest APIs will get used by Devices, WebPortal, MobileApp. – Shri Jan 3 '18 at 14:13
  • 1
    Standard REST over HTTP may not be appropriate for IoT edge devices to send their data. You really should update your posted question with additional details. You have described your technology approach but not really the business, problem domain requirements. – Richard Chambers Jan 3 '18 at 15:20
  • 1
    You might find this series of articles from Adafruit on transports learn.adafruit.com/alltheiot-transports of interest as it talks about various technologies and approaches. – Richard Chambers Jan 3 '18 at 16:16
4

If you want to use a RESTlike Environment, you can setup: PHP CodeIgniter + MariaDB But you need to reconsider your requirements. Using REST over HTTP may require the use of intermediate techniques and a webservice based implementation. If you are planning a real-time application, it would be better to use a telemetry messaging protocol, as MQTT.

In our IoT Lab we're implementing this configuration for a real-time solution:

The IOT devices are "Adafruit Feather Huzzah" ESP8266, using arduino PubSubClient.h

The Mosquitto MQTT Broker has not (by now) any security configuration, and every port of MongoDB and MQTT is set by default.

Should work out of the box by setting up the data collections and documents on "application.conf" on Izmailoff's GitHub.

| improve this answer | |
  • 1
    What are the edge IoT devices you are using and how are they configured? Could you update your posted answer with additional details about the overall solution in addition to the back office or server repository side? – Richard Chambers Jan 3 '18 at 16:27
  • @CarlosMorenoSalazar I have updated my question for better understanding. Can you please clear if hybrid database is good to use in this system or should I go for any other database? Is it possible to use MQTT for web portal and mobile app as well? if yes then is it good to use MQTT in place of Rest API. – Shri Jan 13 '18 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.