使用在线,离线数据 [英] using online, offline data

查看:203
本文介绍了使用在线,离线数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种情况,我有多个零售店连接到总公司。

我想要的是,如果互联网工作正常商店应连接到总公司并使用那里的数据,

但是一旦商店下线,就应该开始在本地使用数据。

在互联网再次启动后,它应该连接到HO并开始在线使用数据。 br />
i我正在使用sql server 2008,.net 3.5





任何建议



提前预付



SHailesh

解决方案

嗨SHailesh,



技术上这里似乎没有任何问题。

您的应用程序将尝试连接到HO。如果与HO的连接失败,请连接到本地/其他的辅助DB。替换到DB的连接或保持多个并行连接没有问题。

*如果您需要示例,请指定哪个部分。我们很乐意为CP中已经很多的代码示例提供帮助



但是 - 您必须考虑的是同步机制的。

一旦你再次在线,(即应用程序总是不断轮询HO DB以查看它是否设法连接),那么你在本地辅助DB上操作的数据就会出现问题(可能几个数据库,可能来自几个地方等,必须集成到HO DB中。

这更像是一个商业逻辑层问题。



祝你好运,

Edo

i have a situation where, i have multiple retail stores connected to a head office.
what i want is, if internet is working properly store should connect to head office and use data from there,
but as soon as the store goes offline, it should start using data locally.
after the internet starts again, it should connect to HO and start using data online.
i am using sql server 2008, .net 3.5


Any Suggestions

thanx in advance

SHailesh

解决方案

Hi SHailesh,

Technically there does not seem to be any issue here.
Your application will try connecting to the HO. If connection to the HO fails, connect to aux DB, local/other. There is no problem replacing a connection to the DB or keeping several connections in parallel.
* If you need examples, specify on which part. We'll be glad to assist with the already many code samples here in CP

However - what you do have to consider is the synchronization mechanism.
Once you go "online" again, (i.e. the application always keeps polling the HO DB to see if it manages to connect), there's the issue of data you have manipulated on the local aux DB (potentially several databases, and potentially from several locations etc) that has to be integrated into the HO DB.
This is more of a Business Logic layer issue though.

Good luck,
Edo


这篇关于使用在线,离线数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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