当前位置: 动力学知识库 > 问答 > 编程问答 >

asp.net - Best Syncing Databases across multiple platforms

问题描述:

I am designing an application that will clients on windows, wed, driod, iOS, and windows phone. I am in a conundrum about what is the best database to use and what is the best architecture approach to follow.

First Thought

Have a master DB that drives the website and every clients information, and having smaller light weight DBs on the client machines that sync with the master only the subset of information that is relevant to the subscribed user. Meaning that if I am user 101 then my windows app, driod, iOS apps will only have my subset of data in the local DB which will give me the power to work offline, but when I am online I can sync with the master DB.

Second Thought

Giving every client their on DB on the server and then just having their independent OS's apps sync with their own DB's. My thought behind this is that syncing less complex.

My goal is to do this in way that doesn't get bogged down with maintenance issues, will keeping the system flexible for growth.

All suggestions or questions would be great.

Also what DB's would be best?

Also what sync'ing technology would be best?

The website will be in Asp.net.

the windows app will be in .Net also.

网友答案:

Ideally create a central database and create web services to interface it. This way the device and software you use to connect only need to understand basic http messaging. NodeJS has a really nice PostgreSQL lib you could use along with a nodejs module called Express that would allow you to create routes to your database procedures. For example a call of http://myaddress.com/select_all_employees would route to a call that invokes the stored procedure that will select and return you all the employees in a json string or some other standard format. Any device and it's development framework should be able to make that type of simple web call.

分享给朋友:
您可能感兴趣的文章:
随机阅读: