Android networking

后端 未结 2 1791
傲寒
傲寒 2021-01-12 21:26

We are implementing a sever-client architecture and some of the client apps are supposed to run on android OS. The first idea that came to mind was to use java RMI, but the

相关标签:
2条回答
  • 2021-01-12 22:04

    RMI is a bad solution for anything not stuck on the same subnet. Its terrible at recovering from failures, and with roaming clients.

    There are a ton of possible solutions, not limited to

    • HTTP REST style, with XML or JSON data
    • JSONRPC/XMLRPC
    • SOAP (not the best for a performance standpoint)
    • Protocol Buffers over sockets (TLS/SSL, please). Consider WebSockets.
    0 讨论(0)
  • 2021-01-12 22:15

    If using a light weight JAVA/RMI Android implementation is feasible for your particular scenario you can take a look at the links below:

    • https://github.com/jorgenpt/lipermi
    • http://blog.pastelstudios.com/2012/10/11/poor-mans-rmi-android-java/
    0 讨论(0)
提交回复
热议问题