2

Just got assigned to the IoT Project. It is regarding a simple IoT cellular device that pretty much acts as a garage door control. The device can be called using the phone and then opens the gate, what it also does is querries a "cloud platform" that stores authorized phone numbers and configuration files in a pre-configured interval (5-10 minutes)

The whole solution is based around architecture proposed by the contracted company - they pretty much came up with AWS based solution and the device communicates using some GraphQL queries.

I was trying to google this, but with no success - is GraphQL good solution for communication with a cloud platform for low-power and resource-limited devices instead of MQTT ? If so, can you please tell me why? and what are the advantages compared to MQTT ? Is QraphQL more data effective? Can be deployed faster?

I still can't wrap around the fact they based the whole device<->server communication on GraphQL querries. I am seriously confused about why they proposed this and searching answers from experts in the field.

Thank you, appreciate all the responses.

YCN-
  • 473
  • 2
  • 10

1 Answers1

2

This one is a good confusing one, I'm no GraphQL expert however it seems to me that MQTT and GraphQL are not at all the same things because they does not serve the same purpose:

  • MQTT does not really "store" data, it keeps a value (or some values of a topic) until they are updated and then it sends the updated data to the subscriber. The protocol does not provide you as such any form of database, I don't really see where that would be a good solution for your case

  • GraphQL provide you a way of getting and saving data. It allows you to build an api that your client is probably used to. It seems fairly easy to use and very well fit to use with javascript

I think in the end you'll basically send https request to the server and get the data. But to me there's two job here, building an api for saving and getting the data from the server database. And then using that server (with or without the API) to talk with device.

YCN-
  • 473
  • 2
  • 10