*
The moose likes I/O and Streams and the fly likes Suggestion on better approach Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Suggestion on better approach" Watch "Suggestion on better approach" New topic
Author

Suggestion on better approach

Nakataa Kokuyo
Ranch Hand

Joined: Jul 24, 2011
Posts: 184
Good day,

I would like to create a utility function to ease the capturing of the configuration data from one environment to another, these configuration data are basically store in database.

seeking for your advice what is the best approach for my case,my rough ideas are both tied with web service as below:

[Proposal]
Method 1 - using xml file
----------------
- Generate DML/DDL query into xml file (make each DML/DDL query under individual xml element)
- send the file over httpheader with post method
- Receiving side receive xml file and process the query by storing it into db.


Method 2 - using JSON
-------------
- Generate JSON format data and send to receiving side
- Receiver process the data and store into DB.
[/Proposal]

May i know what is the best bet for my case, any other alternative to assist in my case?

Between, should i worry on the concern of data capacity send over to other server via web service?

Thanks for advance for guiding me!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30136
    
150

What would the json be used for? SQL statements aren't JavaScript or data structures.

I'd choose either XML for each statement. Or one XML statement with semicolon separated statements if the XML overhead was too high (which is unlikely.)


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Nakataa Kokuyo
Ranch Hand

Joined: Jul 24, 2011
Posts: 184
Hi Jeanne,

The Json is doing the same, just different way to represent SQL.

do you see JSON having the advantage of more lightweight compare to XML in this case?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Suggestion on better approach
 
Similar Threads
Call Service running in Unix using webservice from a windows program
java, xml schema and relation db
Any feedback for SCDJWS Beta?
DB or XML or both for storing large amount of data???
Using restful client which auto map objects into xml