客户端服务器体系结构中的数据同步 [英] Data Syncronization in a client server architecture

查看:348
本文介绍了客户端服务器体系结构中的数据同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我的朋友们正在做一个项目,他们在服务器上的主要数据库上附加了一个网站,并在本地数据库上附加了用于交易的单个客户端应用程序.

假设他们正在酒店域上工作,希望他们的客户端应用程序在脱机时在本地进行交易,最后希望将其与服务器上的数据库同步.

最初,我的想法是创建一个数据库事务日志,该日志将记录所有内容,然后将xml中的所有表数据传递给wcf服务,该服务将更新服务器上的数据库,然后服务器将进行调用并更新所有本地db.
但是经过一番摸索之后,我才知道已经存在Microsoft .net sync框架,它将为您完成这项工作.

但是我读到它的一些缺点,因为当表将标识列作为主键时,它将出现问题.

但是我的客户端应用程序已经有一个数据库,我不想创建一个缓存数据库.我直接想将本地数据库与wcf服务作为中间层进行同步.

我发现了很多教程,但是没有一个教程为如何使用同步框架提供了很好的指导?

谢谢

Hi all,

My friends are working on a project where they have a website attached to main database on server and they have individual client application attached with local database for transaction.

Say they are working on hotel domain where they want their client application to have transactions locally when they are offline and finally they want to sync it with database on server.

Initially what I thought is to create a database transaction log which will record everything and then pass all tables data in xml to a wcf service which will update database on server and then server will make call and update all local db.

But after goggling a bit I came to know that there is already Microsoft .net sync framework exists which will do this job for you.

But I read few disadvantages of it as it will have issue when tables have identity column as primary key.

But my client applications already have a database I don’t want to create a cache database. I directly want to sync my local database with a wcf service as intermediate layer.

I found lots of tutorial but none of them give good guide line how to work with sync framework?

Thanks

推荐答案

为了安全起见,不依赖于工具(可以更改),我个人会选择困难的方法.意思是:留下一笔交易的影子,一旦交易再次在线,该笔交易将被转移(使用我自己制作的交易控制).

原因:如果有错误,我宁愿亲自对它们负责.我的客户只对我交付的东西正在工作很感兴趣.我不能说:对不起,例如与"ms分布式事务之类的东西"....没人为之烦恼.

我的论点背景:
我正在做类似的事情,但我认为您很幸运.为什么?
据我了解,您必须在一台服务器上同步"多个客户端事务(这并不是真正的同步,它以事务安全方式"仅转发信息).我处于不良"位置,我必须将多个客户端与服务器同步

问候
To be on the safe side and not depending on tools (which can change) I personally would choose the hard way. Means: make a shadow of transactions which will be transferred (with my self made transaction control) as soon one is online again.

Why: In case of mistakes, I prefer to be responsible personally on them. My customers are only interested that my stuff I delivered is working. I can not say: Sorry there is a problem e.g. with the "ms distributed transaction stuff"….nobody bothers about that.

Some background for my argumentations:
I’m working on comparable things, but in my opinion you are on the lucky side. Why?
What I understand is, you have to "sync" several client transactions against one server (this is not really sync, it''s "only" forward information in a transaction safe way). I’m in the "bad" position, that I have to sync several clients against a server

Regards


这篇关于客户端服务器体系结构中的数据同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆