I wanted to make a very fast android app to communicate with my home server running on ubuntu.
So I have made something with json flask, TCP sockets and UDP sockets.
I want information about my network, temperature reading, log events, devices that I made, my LED strip and more in the future.
The thing is I want the response of the LED strip as fast as possible. But also get other information.
So that it feels very reactive. Also in the future I wanted to implement something with my phone's x,y and z sensors. This has also to be very responsive.
Can anyone help me out which tech or something else is good for this kind off application.
Thanks in advance
How to send temp
If you use UDP or TCP we can send ONU BYTE as a minimum data. Namely we can't send Bit. 1 Byte = 8 Bit
Sender to Receiver 1. Byte [ 0 Bit --> Get temperature information 1 Bit -->
2. Byte [ Free]
Send every second and listen the receiver maybe It sends the information we don't need to request anymore. Check Receiver' first byte' first bit. if its 0 keep sending if its 1 ohh receiver sent temperature information look second byte its temperature
Receiver to Sender Listen Sender, If sender sends data check first byte' first bit if its 0 doesn't care. If it 1 The sender requests temperature information from us. Send the temperature information to the sender. make first byte' first bit 1. make second byte temperature information.
1.Byte [ 0.bit zero or one] 2.Byte [ temperature inf]