This topic has been archived. It cannot be replied.
-
工作学习 / 学科技术讨论 / 请教多数据库java webservice系统方案, 请进。目前已经有一套java webservice系统运行在MS SQL Server 2005上。现在要在远程多建一套, 而且部分数据要同步, 如交易数据, 配置数据, 用户数据等。 请问各位有什么好的方案? 要程序实现还是有现成的数据库工具实现。先谢谢。
-skylei(sky);
2008-11-25
{213}
(#4872881@0)
-
没太看懂,“有一套java webservice系统。。。要在远程多建一套。。。”估计想解决两个database同步的问题。虽然俺不懂,但是肯定低级别解决方案可靠和有效,用数据库工具就行了,不用写高级程序,容易出错。胡说不用谢。
-c1xwy(洪兴罩俺去战斗);
2008-11-25
(#4872911@0)
-
还是要谢,我的说明有点模糊。 正如你所说的。如果有更详细的建议不妨分享一下, 在下非常感激。
-skylei(sky);
2008-11-26
(#4872941@0)
-
I think the Replication in SQL Server is one way to implement what you want.
-drifter2005(drifter);
2008-11-26
(#4872987@0)
-
信息太少了, 这已经是J2EE, 跟运行环境和persistence技术有关. 如果是EJB + Application Server Network deployment的话, 在服务器LEVEL就非常容易实现. 否则比较麻烦. 我知道有些大公司和银行都不能实现数据同步, 而要进行nightly replication.
-javacup(风铃);
2008-11-26
(#4873031@0)
-
You do need put more detail information here. But if I'm understanding correctly, your problem should be solved by database replication. As you're using SQL Server 2005, simply go to Help or Book Online and search Replication.
-renjl0810(相信网络,相信Google);
2008-11-26
(#4873403@0)
-
More details: service layer:java ws+spring, persistence layer:just spring JDBC template, DB:MSSQL2005
-skylei(sky);
2008-11-26
(#4873849@0)
-
Requirements:1.some tables need synchronized in real time,e.g.user table,config table,report table. 2.some tables need standalone for specific facility, e.g transaction table
-skylei(sky);
2008-11-26
(#4873851@0)
-
Seem replication is not real time, right? Correct me if any wrong. Thank you.
-skylei(sky);
2008-11-26
(#4873854@0)
-
(1) It doesn't matter what kind of service layer and presentation layer you're using. It has nothing to do with the database underneath especailly from your requirements' perspective.(2) I agree with you that the Replication Service is not that 'real' time. But it also depends on how 'real time' you need. In your case, (user table, config table, and report table), minute-level should be sufficient. Quite often, what we need is right-time rather than real-time.
-renjl0810(相信网络,相信Google);
2008-11-26
{285}
(#4874316@0)
-
Using existing tools may not have good performance, and is not flexible as well. In most cases, if permitted, I always write native message queue functions, if replication process allows some delays, or, HTTP calls for real time data exchange.
-nicetomeetyou(冰火共浴鬼魅影憧);
2008-11-26
(#4874396@0)
-
先谢谢各位的建议。 我还有一个想法, 可不可以在持久层同时往多个数据库操作, 但要在程序中处理transaction。
-skylei(sky);
2008-11-28
(#4878774@0)
-
惯用做法就是这样. MID-WARE COM HANDLE TRANSACTIONS. WS HANDLE DATABASES 存取.
-whereismyid(到处找ID);
2008-11-28
(#4879697@0)
-
That depends. In complex system, if transaction involves servers at different remote locations, operation will have huge cost ! This is better to put into task queue, and return status page to consumer when result is ready.
-nicetomeetyou(冰火共浴鬼魅影憧);
2008-11-28
(#4880447@0)
-
I guess it can be easliy done by database itself. Check the MS SQL virtualization or failover clustering, this can allow two server data synchronized or near synchronized.
-ivy_sh(失落的维京人);
2008-11-28
(#4878822@0)
-
谢谢各位。以下是我的初步方案: 用SQL server 2005的replication功能;数据库有四个实例:两组(一个在线事务,一个报表)分别在不同地理位置。在线事务DB用transactional repli到报表DB, 两个报表DB之间用peer-to-peer repli。请问各位有何建议。
-skylei(sky);
2008-12-1
(#4887234@0)
-
我目前没有实际的DB replication经验, 请问朋友们有吗?性能如何? 问题多吗?谢谢。
-skylei(sky);
2008-12-1
(#4887263@0)