Hello again. I have this situation.
I want to create a system where I will store data collected from gas sensors. At this point I'm creating and deploying all the functions that this implies. But here is the thing.
I want to install sensors in different locations. So I will going to connect a local server for every location (that has sensors in it)
Those sensors are going to save the data locally on the local server in appwrite! But something like, every 10 records, it will write to my cloud server which has appwrite as well. I have to make emphasis in those local servers have poor internet connection, really unstable.
The question is. Imagine I have deployed the cloud server and 4 local servers on different locations. And I want to make an update in the structure of a collection.
What is the best way to do that.
The 4 local servers are going to have all the same schema. Only id and name is gonna change between them, and of course the data collected from sensors.
The remote (cloud server) is going to save part of the data of every local server.
This is a really interesting use case! I think using Appwrite on the local servers might be overkill since all you need on the local servers is a queue of data that needs to be sent to your main Appwrite server
Thank you Steven. Not actually a queue of data.
Because the poor internet connection, I will host on those local servers, a front end, so users can check status of sensors, and even a way to export data. Appwrite seems to me like a good option. (I mean, I love appwrite haha)
The backup on remote server will be just a way to access partially to data.
I was even planning to connect everything on a VPN. But my question keeps being the same. How can I share something like all the base schema, and deploy updates if I need.
I was thinking on create an appwrite function, that check for updates on a bucket, that has a bash scripts, download it, and apply updates. But idk if that's a good idea. I'm noob in this kind of situations.
Not actually a queue of data.
I recommend thinking of it as a queue because of the poor internet connection. You queue the data to be sent, and when it has internet or it has enough, it sends it.
How can I share something like all the base schema, and deploy updates if I need.
Especially if you want to deploy updates, I would recommend maintaining migration scripts that create collections, attributes, indexes, etc. you might want to store the migration data as json so that each local server can fetch the json and then use it to create whatever it needs to
Nice catch, I will have to think about how to set that queue. That's true.
Can you elaborate a bit in how will you make those scripts and how you will maintain them? Can be putting them on a bucket on my remote server a valid option?
Thanks for your answers
maybe a function that runs on the local server that fetches some JSON file and the JSON file can say to create a collection with x, y, or z. Or, it can say add attribute a to collection b.
Ya, file in bucket could work.
That sounds really cool, thank you so much Steven. I will try to implement that.
BTW @Steven, do you think I can handle with appwrite something like more than a million of records. Or should I create something to backup old data and clean collections?
Probably but it's really hard to say since there are many variables that would affect this like your database and server specs
Intel quad core 2.1 base, 3.5 Turbo. 8 GB Ram
I can't tell you. The best thing you can do is set up your data set and run load tests.
If you want the best performance, you should also use a dedicated database server.
What's the reasoning for not using something simpler like a raspberry pi + basic code to create clients for your main Appwrite server?
You could store the data pretty well, have wired/wireless connections, less power requirements, and only 1 Appwrite instance to manage.
I want to test Appwrite on these local servers, and see how it works.
Apart from that. Clients that use my mobile app, automatically switch from local data to internet data. So is just because of that.
But seems like it will be easier to use just basic python containers and create my own local API
If you have any ideas for this it will be really appreciated
Recommended threads
- Appwriter Linux Key Bindings
Any tips for configuring appwriter for ubuntu? Actually the keybindings are tightly binded to either windows or mac. Working well on windows but in ubuntu some ...
- Custom Domains
Hi All, Should be a quick config issue. I'm setting up custom domains on the hosted version. I have verified the domain with the CNAME but appwrite isn't gene...
- Unauthorized Charge After Appwrite Pro F...
I was using Appwrite Pro credits worth $100, which were valid until November. During this period, I was exploring Appwrite's services. However, I recently notic...