Domanda

Good day. I develop server-client application with Glassfish+ObjectDB(embeded mode) on serverside and Android application on client side. What is prefreable way (with respect to traffic and security) to send data that stored as java objects in ObjectDB to android application? (Data must be encrypted.) I think about:

  • pass serializable objects through stream input/output.
  • pass data as XML/JSON format.

Or may be there is other way?

Thx for help.

È stato utile?

Soluzione

Binary data as well has a smallest size, but is less useful. XML is self-described, but has a biggest size. If you need to send data only between your apps you can choose binary format.

Altri suggerimenti

You can try Protobuf http://code.google.com/p/protobuf. Less traffic and easy to be integrated.

In my project I am doing the first approach.

  • pass serializable objects through stream input/output.

This means I doing "file" uploads resp. downloads. However, with this approach your are bound to use Java on both sides (server and android) which is not an issue in my case

Your second approach will generate to much overhead

Encryption should NOT be done on this level. Better use HTTPS

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top