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.

  • 1
    My initial impression when reading this question was that it is too broad, but after reading more carefully, it sounds like your real question is simply if GraphQL is a better option for low power devices than MQTT...? Whatever the case, it would be best to edit to clarify, particularly the title and the first couple paragraphs. Thanks! – anonymous2 Sep 25 '19 at 19:19
  • what were you trying to google without success? – jsotola Sep 26 '19 at 1:02
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.

  • 1
    I'm reading this as implying that the actuator would need to poll for state changes in a GraphQL architecture, unless the server can trigger a request to the actuator (which makes the resultant implementations sort of equivalent from the endpoint perspective). – Sean Houlihane Sep 27 '19 at 11:37

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.