wood burning stoves 2.0*
The moose likes Java Micro Edition and the fly likes Offline PDA syncing ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Offline PDA syncing ??" Watch "Offline PDA syncing ??" New topic
Author

Offline PDA syncing ??

Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

I have a web application which does some financial data operations. The web application runs on intranet and is built in J2EE(Struts framework).
Now, there is a new requirement. The client wants that the application should run on a PDA while an agent is on road and should be able to update local database in PDA while on field. When he returns he should be able to connect the PDA to a system and sync his data with that on server. Basically, the updates he makes should be reflected on server.

Now, Is this possible(basically that offline syncing)? Also, what changes would the application require to run on PDA. Will I require to redevelop it in J2ME(Don't know much about it)?

If, it's feasible then what PDA is best suited, what technology to use and any suggestions.

Please help this is a last minute bomb and I am deep into it

Any help or suggestion will be highly appreciated.
Thanks in advance.
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

:roll: :roll:
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

Patience! We don't get paid for this, so we only check in when it's convenient.

Actually, I think your description is a bit off - what you really want is to be able to work disconnected, then go online for at least as long as it takes to sync up, then be free to go offline again.

There are a number of options for this, depending on the chosen platform - the grandfather of them all - PalmOS has a specific database synchronization subsystem that can be facilitated by a customized transfer channel called a conduit. Similarly, Microsoft has a syncing mechanism for their mobile "SQL Server", although being Microsoft, it's probably out of sync with itself, since they're infamous for releasing products with little or no compatibility with the previous product of the same name. I'm not as up-to-date on JME options, but I'm pretty sure I could find a few if I looked - probably including IBM's portable version of DB2.

Although there's a lot of support if you have the right options available, I hope that no one promised you'd have it in production by the end of the day today.


Customer surveys are for companies who didn't pay proper attention to begin with.
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Hello Tim. Thanks a lot for the reply.
I apologise for this anxiety.

Actually, I think your description is a bit off - what you really want is to be able to work disconnected, then go online for at least as long as it takes to sync up, then be free to go offline again.


Yes, you caught me on this. That's exactly what is required. I'll browse through the details you have given and try to search. I'll appreciate if you could provide me with any more suggestions as well.

Thanks again..
[ April 22, 2008: Message edited by: Anubhav Anand ]
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Hello Tim,

I went through the details on Palm-OS. I think it quite well suits the current needs precisely the HotSync feature.

Could you please provide me some links that will help to code conduits for palm-os for my business needs. Also, any comments on the feasibility and performance are more than welcome.

Thanks in advance.
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
http://developers.sun.com/mobility/indexmarket/


"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Hello Nicholas, I am looking at the options thanks for the help.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

For Windows clients, the conduits are DLLs, so most commonly coded in C/C++. According to my somewhat antique "Palm OS Programming for Dummies" book, there's also a conduit kit for Java, however. And, while I'm not a big fan of "dummies" books, that one was pretty useful to me.

A conduit is basically a router and shaper. The Palm OS and desktop software take care of scooping up the PDB data and managing the merge process. All the conduit really has to do is translate the data.

Here's an example. Let's say that you have a company where users keep their grocery shopping lists on their Palm devices and the master copies on an Oracle database. I'm assuming that you have a grocery shopping list app on your Palm (I do!) and that it has a particular document type (vendor/filetype IDs). When you hotsync, the conduit would recieve updates from the PDA, and the conduit code would then open a connection to the Oracle database, break down the data stream into database fields, then post the data to the database. For the uplink (say, if they're given a daily "to-buy" list, the reverse would be done - open the connection, get the database records of interest, reformat them into Palm PDB records, and pass them on to the hotsync.

BTW, for Linux, there are a number of tools that permit working with Palm data. I used to use a mult-client non-gui sync app named coldsync which allowed writing conduits in Perl. There's also some Java stuff kicking around, and I think Python as well.

As for performance, the first time you sync a PDA, it can take a while. But the hotsync protocol is intelligent, so future syncs are differential, and so proportional to the amount of data changed, not the total amount of data. The limiting factor for me has always been the speed of the communications channel.
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Thanks for the reply Tim.

Well, a kind of dumb question. As I mention that my application is in J2EE(Struts Framework). So, could you give me some guidelines that what all would be required to make it compatible to a PDA. Basically, do I need to redevelop it? If so what will be strategy and how to go about it? I am a J2EE guy by heart so have not much idea about it.

Also, if you could point to some tutorials and links that have competent resources. Any other suggestions and remarks are also more than welcome.

Thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

That does make a difference. PDA syncing is done via a discrete TCP/IP protocol on a non-HTTP port - commonly port 1033. If you want to use HTTP for syncing, you'll need a support package for that on both the client and server sides to handle the differential data transfer and the marshalling and unmarshalling of the sync data. It'll probably be slower than straight syncing, since HTTP isn't full-duplex and carries a fair amount of overhead.

I don't know of anything off the top of my head for that purpose, but if nothing's available, creating one isn't extremely difficult - it's mostly a matter of tracking the dirty-data bits and record IDs to build up the set of records to transfer, shipping the data, then updating the dirty-data bits. A fair amount of work, but doable. Maybe someone here knows of a ready-made implementation.
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

Thanks for the reply Tim. Could you provide me some links to go through.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Offline PDA syncing ??