[英]best way to send data from android->server->another android in realtime
I am currently doing a project that sends sensor data from Arduino to Android(patient's app) then sends those data from android to server, then sends them to another Android(guardian's app).我目前正在做一个项目,将传感器数据从 Arduino 发送到 Android(患者的应用程序),然后将这些数据从 android 发送到服务器,然后将它们发送到另一个 Android(监护人的应用程序)。 We are using Django for backend.
我们使用 Django 作为后端。
Thus, I am thinking 2 ways to send Data in real-time(every one second).因此,我正在考虑两种实时发送数据的方法(每隔一秒)。
1.Using Http Rest Api(update MySQL every second from patient's android, and get data from MySQL every second from guardian's android). 1.Using Http Rest Api(update MySQL every second from patient's android, and get data from MySQL every second from guardian's android).
2.Django channels which is good for chatting application, and our project seems pretty similar. 2.Django频道,适合聊天应用,和我们的项目看起来很相似。
I have experienced HTTP REST API before, but I am new to socket programming.我以前经历过 HTTP REST API ,但我是套接字编程的新手。 Which is better way?
哪个更好? HTTP rest API vs Django channels?
HTTP rest API 与 Django 通道?
Isn't Firebase Realtime Database an option for you? Firebase 实时数据库不是您的选择吗? You wouldn't have to deal with any server development.
您不必处理任何服务器开发。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.