What am I working on?
- I am currently working on a project that will in the future be connected to the cloud.
- I have a PLC that will be connected to the cloud. When the “process” starts, the PLC will continuously send data to some database.
- The data from the database should be then visible via website.
- Ideally after the process ended the data should be put into a PDF or some other printable file.
I have investigated the Googles firebase ecosystem and this is the “perfect” architecture if I understand it correctly:
- On the left would be my PLC communicating through
MQTTto theCloud IoT coreservice. - From there the messages would get into the
Cloud FirestorethroughCloud Functions(by messages I mean the PLC config options and sensor data). - The user would communicate with the devices via website that would be hosted on
Firebase Hosting. - And finally I could then save the PDF files to the
Firebase Storageservice.
At first, I found this all very exciting! I would have all my services under one roof, all at one place. The billing is not that bad either. But it would be a lot of work to setup everything properly.
My other architecture idea:
So I got to thinking that maybe I could communicate to the Firestore
from the PLC directly through REST API calls … but then the
Firestore REST API does not yet support listeners (only .GET and
.POST methods). And if I were to fire up .GET request every second
for a new data from Firestore database (for the user to change some
PLC config) it would get pricy really fast. So this is not the way.
- Then I found out about
Googles SpreadSheets. And it seems that it would solve all my problems. - It can store unlimited amounts of data.
- The pricing is not depended on how many
REST APIcalls I make to it. So even tho theGoogle Spreadsheets REST APIdoesn’t support listeners I can get around it with just calling the.GETmethod periodically. - And I can communicate with the
SpreadSheetseven from my website.
With this solution I would get rid of 4 Googles services for just 1:
- I do not need the
Google IoT core– PLC can communicate with the spreadsheets directly via REST API. - I do not need
Firestore–Google Spreadsheetscan store data just fine. - I do not need
Firebase Functions– no need for pushing any data to database. - I do not need
Firebase Storage– I can save the files asGoogles Spreadsheetsand then print them out.
Question:
So now I am little bit confused. Because the first architecture (without the spreadsheets) was looking perfect. But I do not understand why I can replace all of it with googles spreadsheets for free!
- Did I overlooked something?
- Is there a hidden catch in using the
Google SpreadSheetsfor IoT solutions? - Is it normal to use
Google SpreadSheetslike that? - What architecture would you suggest using? The first one with the whole
Google Firebaseecosystem or the second one with only theSpreadSheets?
If you think this is the wrong stackexchange site to ask please be so kind and redirect me to the right one, thanks a lot!
