子分区或复合分区文件分贝 [英] sub partitioning or composite partitioning document db

查看:198
本文介绍了子分区或复合分区文件分贝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MSDN的一篇文章,
https://azure.microsoft.com/en-in/documentation/articles/documentdb-partition-data/,
 有哪些规定,子分区或复杂的分区可以做一条线。这是否意味着:

In one article of msdn, https://azure.microsoft.com/en-in/documentation/articles/documentdb-partition-data/, there is a line which specifies that "sub-partitioning" or "complex partitioning" can be done. Does this mean :


  1. 可以有一个集合里子分区?

  2. 在一个单一的DocumentDb,可以有不止一个分区的逻辑吗?例如,我将有一个单一的文件里面分贝收藏4。可他们两个可以基于散列和另外两个上范围是多少?

如果不是这些问题的答案是YES,那么有人可以提供我一个链接,可能导致我同样的例子?

If either of those answers is YES, then can someone provide me a link that might lead me to an example of the same?

推荐答案

回答:


  1. 有一个集合中没有明确的方法来子分区的数据。这是通常使用一个字段来重新present类型的文件,或有 isTypeA:每个文件真实键值对,但是这是你的应用程序采用了约定。但是,你可以为每个帐户创建多个数据库(缺省限制5,但可以根据要求进行扩展),每个人都可以有自己的一套收藏。我使用两个层次结构中( temporalize- API )。 TenantID确定使用查找表加默认我的顶层分区(数据库)。这使我严重或高价值的租户拉成少装数据库,并离开大家在默认的东西。我用的ENTITYID为二级分区(集)一致的哈希值。

  1. There is no explicit method to sub-partition data within a collection. It's common to use a field to represent the type of document or to have isTypeA: true key value pairs on each document, but that's a convention that your application adopts. However, you can create multiple databases (default limit 5 but may be extended upon request) per account and each can have their own set of collections. I'm using that two-level hierarchy in (temporalize-api). TenantID determines my top-level partitioning (database) using a lookup table plus defaults. This allows me to pull critical or high value tenants into a less loaded database and leave everyone else in the default. I use a consistent hash on the EntityID for second-level partitioning (collection).

当然,也有从做没有什么preventing你。要特别注意的出色讨论你链接到亚拉文文章在最后一节(开发一个分区应用程序)。它包括的东西,你就需要在决定和实施的清单。提供的.NET SDK分区解析器不照顾这些问题给你。

Sure, there is nothing preventing you from doing that. Pay particular attention to the excellent discussion in the last section (Developing a partitioned application) in the Aravind article you linked to. It includes a checklist of things you'll need to decide upon and implement. The partition resolvers provided for the .NET SDK do not take care of these issues for you.

我还没有看到什么,我会考虑一个完整的系统,包括在添加容量,在存储分区映射/元数据平衡和查询扇出/总优化的开放源码的例子。我有以下方式的Node.js一( temporalize-API )和实际生产中。我做了关于我怎么会做平衡和查询扇出决策和那些在该链接文件的意见记录在案,但我还没有实现所有的人。我该分区的元数据存储在第一数据库第一的集合。

I haven't yet seen open source examples of what I would consider a complete system including balancing when capacity is added, where to store the partition maps/meta-data, and query fan-out/aggregate optimization. I have a node.js one under way (temporalize-api) and actually in production. I've made decisions about how I'm going to do balancing and query fan-out and those are documented in the comments in that linked file, but I have not implemented all of them. I store the partition meta-data in the "first" collection of the "first" database.

这篇关于子分区或复合分区文件分贝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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