将查找表与 Azure 表存储结合使用 - 值得创建一个辅助服务来管理它吗?
我正在考虑为 Azure 平台进行一些开发。我不需要从 SQL Azure 获得的完整关系资料,我对使用表存储非常感兴趣。
现在,我需要做的一件关系事情就是表示存储中表之间的一对多和多对多关系。
我对如何使用带有分区键和行键的中间表来表示这一点感到非常满意,就像常规数据库在内部表示它们的方式一样。
我想知道是否值得创建一个工作者服务来在存储和访问它的任何内容之间进行中介,以便创建一个可以监督我正在寻找的有限程度的引用完整性的前端。
我可以很容易地作为客户端的一部分来完成此操作,但我想知道将服务托管在云中是否意味着更低的网络延迟,因为任何跨越这些引用的查询都可能需要与三个不同的表进行对话据推测,这些请求在云中发布的服务和存储之间应该要快得多,因此来自云外部的请求将只有一个而不是多个。
如果这是一个有用的策略,是否有现有的工具可以做到这一点?如果不是,什么会更有效,或者只是没有明显的好处?我应该忍住并选择 SQL For Azure 还是某种异构解决方案,将大数据存储在表存储中,并将查找和表引用存储在 SQL 中?
I'm looking into doing some development for the Azure platform. I don't need the full Relational stuff that you get from SQL Azure and I would be quite interested to use Table Storage instead.
Now the one Relational thing I do need to be able to do is represent one-to-many and many-to-many relationships between tables in my storage.
I'm quite happy with how to use intermediate tables with partition and row keys to represent this, in much the way that regular databases represent them internally.
What I'm wondering is whether it is worth creating a worker service just to intermediate between the storage and anything that accesses it, in order to create a front end that could supervise the limited degree of referential integrity I'm looking for.
I could do this as part of the client easily enough, but I'm wondering whether having the service hosted in the cloud would mean lower network latency given that any query that goes across these references would be likely to need to talk to three different tables and presumably these requests should be a lot faster between a service and storage posted in the cloud, so there would only be one request from outside the cloud rather than several.
If this is a useful strategy, is there an existing tool to do it? If not what would work better or is there just no perceptible benefit? Should I just suck it down and go for SQL For Azure or some kind of heterogenous solution where I store my big data in Table Storage and my lookups and table references in SQL?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
托管服务不仅可以更快地访问表存储,而且还可以更快地访问表存储。您的服务和表存储之间的带宽不会被计费(只要它位于同一数据中心)。
将表存储抽象到服务中是一个好主意,可以使用辅助角色或 WCF 服务 Web 角色来完成。如果您正在观看今年 PDC 上的公告,您可能已经看到即将推出的 Web 角色将具有完整的 IIS 并能够托管多个 Web 应用程序,因此您可能会在同一角色中托管您的网站和服务(成本更高) -比担任单独角色更有效)。
A hosted service will not only have faster access to table storage; the bandwidth between your service and table storage won't be billed (as long as it's in the same data center).
Abstracting table storage into a service is a good idea, and can be done with either a worker role or a WCF Service Web Role. If you were watching the announcements at this year's PDC, you might have seen that the upcoming web roles will have full IIS and be able to host multiple web apps, so you could potentially host your website and your service in the same role (more cost-effective than hosting in separate roles).