Automatic Document Refresh on the Server Side
- 0
- Webhooks
- Flutter
- Databases
- Self Hosted
- Functions
Hello! We have created a taxi app in flutter. So far everything is working fine, except for one. How to automatically update a document without flutter on the server side? For example, a taxi driver, when entering the application, presses the online button and can pick up the order. But there is a case where he exits the application without pressing offline. In this case, we should automatically change its status to inactive (offline). Do I need to write a function for this and deploy it to the server?
I always suggest creating a sort of heartbeat by having the app update a last ping timestamp every minute or so. If the app stops updating that timestamp after Y minutes, they can be considered offline
Okay, that's understandable. But how then to update the document on the server to change the driver status to offline automatic?
probably with a cloud function
Thank you! Is it possible to do this through Dart?
Yes! Dart 2.15, 2.16 and 2.17 are supported runtimes as of now.
Please take a look here for all the supported runtime environments https://appwrite.io/docs/functions#supportedRuntimes
Recommended threads
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...