• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Suggestion on better approach

 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
Nakataa Kokuyo
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic