I'm faced with a following dilemma:
Design a new network protocol which would be used between a server (Java software) and desktop and mobile clients. The mobile clients include J2ME, Android and maybe in the future even iPhone.
The data stream is a realtime, constant stream with also more infrequent parts. The clients show waveforms of this data and also data which doesn't need to be updated instantly. The clients should also be authenticated.
I'd like to avoid creating a totally custom TCP protocol implementation from scratch if possible.
These days people usually recommed doing everything in REST style which I also really like. In this case I'm a bit hesitant though: how would you implement a constant stream of data on top of REST? A chunked HTTP response?
I'm also considering non-plaintext protocols (the current ones which I am replacing are binary protocols). Those current protocols have their rather serious issues so they really should be replaced.
Google protocol buffers looks like a pretty strong candidate for handling the low-level details, but I'm not sure if it can be used from Android. And I'm pretty sure that the iPhone implementation would have issues with it as well.
There's also BEEP, but I think it's pretty much dead and I wonder was it ever widely used.
Any ideas?