I'm developing a J2ME MIDlet for a Nokia S40 device.
I have a PC server which is running a db engine that contains records of people (name, birthday, id number, height, weight and gender).
The phone stores these records as Person objects in its RMS. I'm looking for a way to be able to sync the local phone database remotely from the server - I need the phone to get an update of all the records the server had when the MIDlet starts and when it closes I need the MIDlet to send all the updates that were made to the server.
I developed a class which connects, sends and received data over TCP/IP. My MIDlet is signed and I have my server side running.
In what way do you recommend me to to these updates in terms of communication protocols? Is there a way to serialize + compress data and then getting the byte array of the result? In that way I can just send and receive the data from the server and decompress + deserialize - unless you can think of a better way.