This discussion is archived
6 Replies Latest reply: Nov 28, 2012 5:04 AM by 938489 RSS

Web service or a java based cron job

938489 Newbie
Currently Being Moderated
We have a table being populated in a mysql db in linux platform using java application. Another party would require this table but their platform is windows and db is sqlserver. Which solution is the best to pass on the data
1) Write a java application reading from mysql and inserting into sql server.
2) Write a web service but the problem linux is not well supported for web services?

Which is a better method in terms of security and performance?
  • 1. Re: Web service or a java based cron job
    gimbal2 Guru
    Currently Being Moderated
    935486 wrote:
    We have a table being populated in a mysql db in linux platform using java application. Another party would require this table but their platform is windows and db is sqlserver. Which solution is the best to pass on the data
    They require the DATA IN the table, not the table itself.
    1) Write a java application reading from mysql and inserting into sql server.
    That could work, but you'd need to be able to connect to both machines from one location.
    2) Write a web service but the problem linux is not well supported for web services?
    What kind of nonsense is that? What kind of limitation can an OS put on web services?
    Which is a better method in terms of security and performance?
    3) export data to a well-known format (CSV for example), encrypt it using for example PGP, give it to "the other people" and let it be their responsibility to import it again into their own database in whatever way they find secure.
  • 2. Re: Web service or a java based cron job
    938489 Newbie
    Currently Being Moderated
    The issue with the third method is that we have to manually pass the data. Here the mysql db is being populated from time to time to so we thought of running a service on a say per minute basis to update the remote db. What is best mechanism in terms of security and performance?
  • 3. Re: Web service or a java based cron job
    DrClap Expert
    Currently Being Moderated
    It's impossible to say anything about performance without understanding the data being performed on. You're going to get a much different answer for a table which has 100 rows and is updated every hour or two versus a table which has several million rows and is updated several times a second.

    All we know so far is that there's a table.
  • 4. Re: Web service or a java based cron job
    gimbal2 Guru
    Currently Being Moderated
    935486 wrote:
    The issue with the third method is that we have to manually pass the data.
    Oh yeah? I've written systems that fully automate it, no problem. Including taking deltas in stead of full dumps. The limitation is more what you are capable of, not what is or isn't possible. And yeah... that's up to you to define where the boundaries are.
    What is best mechanism in terms of security and performance?
    I already gave my opinion, repeating the exact same question isn't going to net you a different answer. I'll only answer this extra: there is no best, stop looking for it. In stead, look for a way that works within your limitations, boundaries and budget. Should be a lot simpler to answer yourself now that you can stop looking for that which does not exist.
  • 5. Re: Web service or a java based cron job
    DrClap Expert
    Currently Being Moderated
    gimbal2 wrote:
    Oh yeah? I've written systems that fully automate it, no problem. Including taking deltas in stead of full dumps.
    There's apparently a solution which involves no dumps, no deltas, and in fact no copying of any data at all. It's possible to use MySQL as a "linked server" in SQL Server. So you can access the MySQL table directly, just as if it were an SQL Server table.

    At least that's my impression from 30 seconds of googling, where I found an article that claims to explain exactly how to do that. I'm not a database specialist and obviously neither is the OP, which just highlights the importance of not leaving database decisions like this to non-experts like me and 935486.
  • 6. Re: Web service or a java based cron job
    938489 Newbie
    Currently Being Moderated
    Dear DrClap & Gimbal,
    I thank you guys for the input and I will do some tests and assessment to find the best solution that fit my environment.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points