开发者

architecture question - wcf and distributed data

Apologies for what could be a basic architecture question

We implement our business logic layer using wcf services. They connect to a mysqldb (which is the database layer) and do some processing. The wcf services can be consumed by multiple applications.

Basic question - If we are planning to do some horizontal sharding or some form of partitioning where do I put the shard manager? E.g, Instead of a single db now I will have two dbs in two machines.

The call to get a particular item may go to db1 or db2 depending on say the primary key of the item record.

In this scenario, would I need to deploy multiple copies of my WCF code each 开发者_如何学Gowith a different connectionstring and then have a layer before that which does some resolution as to which service URL to call? I am sure that there are patterns for this sort of a problem and it would be great if I could get some pointers in the right direction.


You can have one or more instances of your WCF service, and have each contain the connection strings of all the shards, and each possessing the logic to route to the correct shard.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜