CN103003815A - Shared data collections - Google Patents
Shared data collections Download PDFInfo
- Publication number
- CN103003815A CN103003815A CN201180030891XA CN201180030891A CN103003815A CN 103003815 A CN103003815 A CN 103003815A CN 201180030891X A CN201180030891X A CN 201180030891XA CN 201180030891 A CN201180030891 A CN 201180030891A CN 103003815 A CN103003815 A CN 103003815A
- Authority
- CN
- China
- Prior art keywords
- collection
- data
- program
- shared
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2308—Concurrency control
- G06F16/2315—Optimistic concurrency control
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/543—User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/109—Time management, e.g. calendars, reminders, meetings or time accounting
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
背景技术Background technique
集合是将被一起操作的一组数据项。集合的一些示例包括列表、阵列、集、包、和各种其他数据组。在编程的早期,程序一般是不彼此互操作的单片实体。因此,程序能采用编程者选择的任何方式的集合内在地管理集合。在现代编程中,然而,通过操纵共享的数据组,使得同一程序的不同实例、或不同程序彼此互操作,已成为较为流行的实践。A collection is a group of data items that will be manipulated together. Some examples of collections include lists, arrays, sets, bags, and various other groups of data. In the early days of programming, programs were generally monolithic entities that did not interoperate with each other. Thus, a program can manage collections internally in any way the programmer chooses. In modern programming, however, it has become a more popular practice to make different instances of the same program, or different programs, interoperate with each other by manipulating shared data sets.
尽管可能使得程序实现它们用于共享数据的自身机制,这样做一般对于编程者而言是麻烦的。编程者可能必须将共享机制实现为程序的紧密结合的一部分。即使编程者可获得已知共享机制的代码,该机制一般专用于程序的特性、且专用于被共享的数据类型。且,当其他程序想要与已有程序共享数据时,这些程序必须以使用相同共享机制的方式被实现。While it is possible to make programs implement their own mechanisms for sharing data, doing so is generally cumbersome for the programmer. Programmers may have to implement the sharing mechanism as a cohesive part of the program. Even if the code for a known sharing mechanism is available to the programmer, the mechanism is generally specific to the program's idiosyncrasies and specific to the data types being shared. Also, when other programs want to share data with existing programs, those programs must be implemented in a way that uses the same sharing mechanism.
尽管允许程序共享数据出现了各种问题,集合的共享提出了附加问题。对于很多类型的集合,集合的当前状态不仅由集合的内容定义、还由其中这些内容所出现的顺序所定义。例如,阵列{1,2,3,4,5}不同于阵列{2,3,1,5,4}。即使这两个阵列包含了相同的底层元素(从一到五的数字),顺序是不同的,且因此这两个阵列具有不同的状态。当集合的状态可由数个程序改变时,维持集合的状态、特别是顺序,提出了特定挑战。While various problems arise in allowing programs to share data, the sharing of collections presents additional problems. For many types of collections, the current state of the collection is defined not only by the contents of the collection, but also by the order in which those contents appear. For example, the array {1,2,3,4,5} is different from the array {2,3,1,5,4}. Even though the two arrays contain the same underlying elements (numbers from one to five), the order is different, and thus the two arrays have different states. Maintaining the state of a collection, especially the order, presents particular challenges when the state of the collection may be changed by several programs.
概述overview
共享集合的概念可被以使得共享机制对于编程者而言是透明的方式被实现。另外,当集合由数个不同实体操作时,实现共享的集合的机制可,对于集合提供数据收敛。The concept of shared collections can be implemented in such a way that the sharing mechanism is transparent to the programmer. Additionally, mechanisms to implement shared collections may provide data convergence for collections when the collection is operated by several different entities.
在一个示例中,共享的对象服务器,通过在任何给定时间维持集合的真实状态,来管理集合的共享。获得对于集合的访问的程序可连接至机器(程序在该机器上运行)上的共享对象运行时。访问共享集合的程序将该集合登记为共享集合,且这个登记由运行时通信至共享的对象服务器。想要访问该集合的其他程序也将该集合登记为共享集合。类似地,这个登记由运行时通信至共享的对象服务器。此外,程序可订阅在该集合上的改变提醒,其中订阅请求由运行时处理。每一个程序保持集合的本地副本。当集合的状态以任何形式被改变时,在其上发生改变的机器上的运行时将这个改变通信至共享的对象服务器。共享的对象服务器更新集合的真实状态,并将这个改变通信至通过共享对象运行时登记过这个集合的所有程序,该共享对象运行时位于在其上运行订阅程序的机器上。然后这些程序的每一个根据服务器所通信的状态改变,更新其本地集合副本。在该集合上已发生并发的改变的情况下,共享的对象服务器解决这些改变中的任何冲突,并确定性地到达集合的真实状态。In one example, a shared object server manages the sharing of collections by maintaining the true state of the collection at any given time. A program that gains access to a collection can connect to a shared object runtime on the machine on which the program is running. Programs that access a shared collection register the collection as a shared collection, and this registration is communicated by the runtime to the shared object server. Other programs that want to access the collection also register the collection as a shared collection. Similarly, this registry is communicated by the runtime to the shared object server. Additionally, programs can subscribe to notifications of changes on the collection, where subscription requests are handled by the runtime. Each program maintains a local copy of the collection. When the state of a collection is changed in any way, the runtime on the machine on which the change occurred communicates this change to the shared object server. The shared object server updates the actual state of the collection and communicates this change to all programs registered with this collection through the shared object runtime on the machine on which the subscribing program is running. Each of these programs then updates its local copy of the collection based on the state changes communicated by the server. Where concurrent changes have occurred on the collection, the shared object server resolves any conflicts in those changes and arrives deterministically at the true state of the collection.
在另一个示例中,以对等(peer-to-peer)方式、而不是客户机/服务器方式,来管理共享的对象。在对等实现中,对于共享的集合的每一个订阅者可将改变通信至其他订阅者。然后,订阅者在其上运行的机器上的运行时可改变它们的本地副本,同时确定性地解决任何冲突。In another example, shared objects are managed in a peer-to-peer fashion rather than a client/server fashion. In a peer-to-peer implementation, each subscriber to a shared collection can communicate changes to the other subscribers. The runtime on the machine the subscriber is running on can then change their local copy while deterministically resolving any conflicts.
几乎可以任何编程语言(如,C,C++,Java,Visual Basic等)实现集合。由于共享集合的概念可以多种编程模型实现,以不同语言编写的程序可在同一个共享集合上操作。另外,编程者可编写程序,该程序将与在纯粹本地的集合上操作一样的方式在共享集合上操作。因此,程序可能够操作共享的集合,而不必采用除了发出命令以登记新的集合或订阅已有集合的改变之外的任何方式,来识别集合的共享本质。以此方式,有效地使得集合的共享对于程序以及对于编程者而言是透明的。此外,共享机制对于集合中的数据的类型可以是不可知的,藉此允许分享任何类型数据的集合。Collections can be implemented in almost any programming language (eg, C, C++, Java, Visual Basic, etc.). Since the concept of shared collections can be implemented in multiple programming models, programs written in different languages can operate on the same shared collection. Additionally, a programmer can write programs that will operate on shared collections in the same manner as on purely local collections. Thus, a program may be able to manipulate a shared collection without having to recognize the shared nature of the collection in any way other than issuing commands to register new collections or subscribe to changes to existing collections. In this way, the sharing of collections is effectively made transparent to the program and to the programmer. Furthermore, the sharing mechanism may be agnostic to the type of data in the collection, thereby allowing collections of any type of data to be shared.
提供本发明内容以便以简化形式介绍将在以下具体实施方式中进一步描述的一些概念。本发明内容并不旨在标识所要求保护主题的关键特征或必要特征,也不旨在用于限制所要求保护主题的范围。This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
附图简述Brief description of the drawings
图1是共享集合的示例的框图。Figure 1 is a block diagram of an example of a shared collection.
图2是示例性场景的框图,其中程序可共享对于共享集合的访问。2 is a block diagram of an example scenario in which programs may share access to a shared collection.
图3是集合共享的对等实现的示例的框图。3 is a block diagram of an example of a peer-to-peer implementation of set sharing.
图4和5是共享的集合可被如何使用的一些示例的框图。4 and 5 are block diagrams of some examples of how shared collections may be used.
图6是其中可共享集合的示例性过程的流程图。6 is a flowchart of an example process in which collections may be shared.
图7是可以结合本文描述的主题的实现来使用的示例组件的框图。7 is a block diagram of example components that may be used in conjunction with implementations of the subject matter described herein.
具体实施方式Detailed ways
在现代计算中,通过共享对于同一底层数据的访问,程序经常彼此互操作。当程序共享数据时,经常以认知数据被共享的事实的方式实现程序。即,程序一般必须包含与其他程序、或与同一程序的其他实例共享数据的机制的实现。用于共享的机制经常专用于被共享的数据的本质、以及编程者的设计选择。因此,当两个程序想要共享数据时,它们各自的编程者一般必须协定、并实现特定的共享机制。存在特定的允许有限形式的数据共享的一般化机制,但是不适用于特定场合。In modern computing, programs often interoperate with each other by sharing access to the same underlying data. When programs share data, the programs are often implemented in a way that recognizes the fact that the data is shared. That is, programs generally must contain the implementation of mechanisms for sharing data with other programs, or with other instances of the same program. The mechanisms for sharing are often ad hoc to the nature of the data being shared, as well as programmer design choices. Therefore, when two programs want to share data, their respective programmers generally must agree on and implement a specific sharing mechanism. There are certain generalized mechanisms that allow limited forms of data sharing, but are not suitable for specific situations.
尽管各种数据的共享提出了各种实现问题,当要共享的数据是集合时,提出了附加问题。集合是可被一起操作的一组数据项。集合的一些示例包括列表、阵列、集、包、和各种其他数据组。一些类型的集合被排序。因此,顺序集合的当前状态不是仅仅由集合的内容定义、还由其中这些内容所出现的顺序所定义。如,{1,2,3,4,5}是包含从一到五的整数的数据集合。如果该集合被排序,则{1,2,3,4,5}是与{2,3,1,5,4}不同的状态,因为这两个状态具有不同的顺序,即使它们都包含相同的项。While the sharing of various data presents various implementation issues, additional issues arise when the data to be shared is a collection. A collection is a group of data items that can be manipulated together. Some examples of collections include lists, arrays, sets, bags, and various other groups of data. Some types of collections are sorted. Thus, the current state of an ordered collection is defined not only by the contents of the collection, but also by the order in which those contents appear. For example, {1,2,3,4,5} is a data set containing integers from one to five. If the set is sorted, {1,2,3,4,5} is a different state than {2,3,1,5,4} because the two states have a different order even though they both contain the same item.
当在同时运行的程序中共享任何类型的数据时,数据的两个修改可能冲突-如,一个程序可想要修改数据,同时,另一个程序正想删除该数据。然而,当这样的冲突发生且正被共享的数据是集合的一部分时,发生附加难题。一个程序可请求在集合中的第二项后插入项。另一个程序可请求删除第二项,藉此使得被插入的项成为第二项。为了处理这些改变并达到集合的真实状态,必须决定原始集合中的哪一项现在是第二个。由于每一个程序可能不了解另一个程序正在对同一个集合操作,两个程序可能涉及集合中的“第二”项,同时对于集合中的哪个项真正是顺序的第二项具有不同的理解。When any type of data is shared among concurrently running programs, two modifications to the data may conflict - eg, one program may want to modify the data while another program is trying to delete the data. However, additional difficulties arise when such conflicts occur and the data being shared is part of a collection. A program can request that an item be inserted after the second item in the collection. Another program may request that the second item be deleted, thereby making the inserted item the second item. In order to handle these changes and arrive at the true state of the collection, it must be decided which item in the original collection is now the second. Since each program may not know that the other program is operating on the same set, two programs may refer to the "second" item in the set while having a different understanding of which item in the set is really the second item in the sequence.
运算转换字段涉及允许对于计算中的数据进行决定性排序的机制。可使用一些这样的机制来解决同时被操作的文件中的冲突—如,如何确定在正同时被两个用户编辑的文本文件中已经发生了什么编辑。然而,这些类型的技术一般没有被应用于此处描述类型的集合的一般化共享。Operational transformation fields involve mechanisms that allow deterministic ordering of data in calculations. Some of these mechanisms can be used to resolve conflicts in files being manipulated at the same time—eg, how to determine what edits have occurred in a text file being edited by two users at the same time. However, these types of techniques are generally not applied to generalized sharing of collections of the type described here.
此处描述的主题提供了共享数据集合的机制。此处描述的技术可被用于提供一般化的集合共享机制,其允许数个程序和/或同一程序的数个实例来共享对于集合的访问。这些技术可允许采用不同的编程语言实现程序。这些技术可允许被排序的数据集合以这样的方式同时被多个程序和/或程序实例操作:该集合决定性地达到特定状态,该状态可被传播至使用该集合的所有程序。另外,此处描述的技术可允许编程者编写程序,该程序以或多或少与程序将在纯粹本地集合上操作的方式一样的方式在共享集合上操作。此外,可使得共享机制对于集合中的底层数据类型是不可知的,藉此使得对于任何合适的数据种类使用相同的一般化的共享机制。换言之,可在无关于集合中的数据项内容的情况下、以及无关于这些项的内容的结构的情况下,执行此处描述的各种动作。The themes described here provide mechanisms for sharing collections of data. The techniques described herein can be used to provide a generalized collection sharing mechanism that allows several programs and/or several instances of the same program to share access to a collection. These techniques allow programs to be implemented in different programming languages. These techniques may allow an ordered collection of data to be manipulated concurrently by multiple programs and/or program instances in such a way that the collection deterministically reaches a particular state that can be propagated to all programs using the collection. Additionally, the techniques described herein may allow a programmer to write programs that operate on shared collections in more or less the same way that programs would operate on purely local collections. Furthermore, the sharing mechanism can be made agnostic to the underlying data type in the collection, thereby allowing the same generalized sharing mechanism to be used for any suitable kind of data. In other words, the various actions described herein can be performed without regard to the content of the data items in the collection, and without regard to the structure of the content of those items.
共享数据的程序可在单个机器上运行、或可在通过网络连接的数个机器上运行。为了帮助数据的共享,在其上运行程序的每一个机器可具有共享的对象的运行时。共享的对象的运行时可有助于管理共享的数据对象(包括共享的集合)的共享和同步。在一个示例中,共享的对象的服务器维持共享的集合的真实状态。当对于机器上的共享的集合做出改变时,机器上的运行时提醒共享的对象服务器有关于这个改变。响应于该本地改变,服务器可改变集合的真实状态。如果两个程序对于集合做出并发的改变,共享的对象服务器可解决这些改变从而达到真实状态,此举在可能的程度上可反映两个程序意在实现的集合的状态。因此,如果两个不同程序各自在不了解另一个的改变的情况下改变同一个集合,服务器可执行这些改变之一来创建集合的新状态,且然后可转换另一个改变(在可能的程度上)以反映:如果另一个程序在其做出改变时已经知道了集合的新状态,该另一个程序应会作出的改变。服务器通知各机器上的运行时关于该改变(或经转换的改变,如果适用的话),且已经订阅该集合的程序根据服务器所传播的改变来更新它们的集合的本地副本。在另一个示例中,以对等体系结构实现集合共享,在对等体系结构中,订阅共享集合的每一个程序通知其他订阅者有关于该程序已经做出的改变,且其他订阅者(或者在正运行这些订阅者的机器上的运行时组件)在不需要服务器帮助的情况下将它们的本地副本同步至这些改变。Programs that share data can run on a single machine, or on several machines connected by a network. To facilitate the sharing of data, each machine on which a program runs may have a shared object's runtime. A shared object runtime can facilitate the management of sharing and synchronization of shared data objects, including shared collections. In one example, the shared object's server maintains the real state of the shared collection. When a change is made to a shared collection on a machine, the runtime on the machine notifies the shared object server about the change. In response to this local change, the server may change the true state of the collection. If two programs make concurrent changes to the collection, the shared object server can resolve those changes to arrive at a true state that reflects, to the extent possible, the state of the collection that both programs intend to achieve. Thus, if two different programs each mutate the same collection without knowing about the other's changes, the server can execute one of these changes to create a new state of the collection, and then translate the other change (to the extent possible ) to reflect the change that another program would have made had it known the new state of the collection when it made the change. The server notifies the runtime on each machine of the change (or translated change, if applicable), and programs that have subscribed to the collection update their local copies of the collection according to the changes propagated by the server. In another example, collection sharing is implemented in a peer-to-peer architecture, in which each program subscribing to a shared collection notifies other subscribers about changes that the program has made, and the other subscribers (or The runtime components on the machines that are running these subscribers) synchronize their local copies to these changes without the help of the server.
当程序创建集合时,程序可发出指令将该集合登记为共享集合。这个指令可由在其上运行该程序的机器上的运行时接收,且该运行时可将该登记报告给共享对象服务器。然后,共享对象服务器接收集合的副本,其代表了集合的初始状态。从这个角度而言,创建该集合的程序可以与集合是纯粹地本地时采用的非常相似的方式在该集合上操作,因为运行时管理将改变报告至共享对象服务器(或在对等实现中,报告至其他订阅者)、以及从共享的对象服务器接收状态改变的同步。When a program creates a collection, the program may issue an instruction to register the collection as a shared collection. This instruction can be received by the runtime on the machine on which the program is running, and the runtime can report the registration to the shared object server. Then, the shared object server receives a copy of the collection, which represents the initial state of the collection. From this perspective, the program that created the collection can operate on the collection in much the same way as it would if the collection were purely local, since runtime management reports changes to the shared object server (or in a peer-to-peer implementation, report to other subscribers), and receive synchronization of state changes from the shared object server.
如果程序想要使用已经由另一个程序创建的共享的集合,该程序发出指令来登记该集合。这个指令可由运行时接收并被传送至共享的对象服务器。然后,共享的对象服务器知道来通知在订阅程序在其上运行的机器上的运行时有关该集合状态的任何改变。当程序订阅集合时,其可接受集合的当前真实状态的副本,这副本然后存储为本地集合。然后订阅程序可用与集合是本地的非常类似方式在共享集合上操作。以此方式,使得集合的有效共享相对于创建和登记集合的程序、以及对于订阅该集合的程序而言都是透明的。如上所述,系统可对于集合中的数据的特性是不可知的,从而共享机制可作用于包含任何类型底层数据的集合。If a program wants to use a shared collection that has been created by another program, the program issues an instruction to register the collection. This command may be received by the runtime and passed to the shared object server. The shared object server then knows to notify the runtime on the machine on which the subscribing program is running about any changes to the state of the collection. When a program subscribes to a collection, it receives a copy of the current true state of the collection, which is then stored locally as the collection. Subscribers can then operate on the shared collection in much the same way that the collection is local. In this way, the effective sharing of collections is made transparent both to programs that create and register collections, and to programs that subscribe to the collections. As noted above, the system can be agnostic to the nature of the data in the collection, so that the sharing mechanism can work on collections containing any type of underlying data.
图1示出共享集合102的示例。共享集合102可包括一组数据项,其以某种方式彼此相关,且其可由多个程序(诸如程序104、106、和108)访问(如,读取和写入)。程序104-108可以是相同程序(如,在数个不同过程上运行的相同应用)的不同运行实例,或可以是不同程序。另外,程序104-108可全部在同一个机器上或在不同机器上运行。在两种情况下,程序104-108可以是不同程序、或同一程序的分开的运行实例,在此意义上,它们可被描述为“不同的”。集合共享机制110可帮助共享集合102在程序104-108之间的共享。下文结合图2-7描述集合共享机制110的示例性实现。FIG. 1 shows an example of a shared collection 102 . Shared collection 102 may include a set of data items that are related to each other in some manner and that may be accessed (eg, read and written) by multiple programs (such as programs 104, 106, and 108). Programs 104-108 may be different running instances of the same program (eg, the same application running on several different processes), or may be different programs. Additionally, programs 104-108 may all run on the same machine or on different machines. In both cases, programs 104-108 may be different programs, or separate running instances of the same program, in which sense they may be described as "distinct." Collection sharing mechanism 110 may facilitate sharing of shared collection 102 among programs 104-108. Exemplary implementations of the set sharing mechanism 110 are described below in conjunction with FIGS. 2-7 .
共享集合102可具有名称112,允许共享集合102由共享相同命名空间的程序所标识。作为名称112的替代物(或除了名称112外),共享集合102还可具有标识符114,将共享集合102与其他共享集合区分开来。例如,标识符114可被应用于还没有被指派名称的集合,从而在“友好”的名称已经被指派给集合前,可标识这些集合。Shared collection 102 may have a name 112, allowing shared collection 102 to be identified by programs that share the same namespace. As an alternative to (or in addition to) name 112 , shared collection 102 may also have an identifier 114 that distinguishes shared collection 102 from other shared collections. For example, identifier 114 may be applied to collections that have not been assigned a name, so that collections can be identified before "friendly" names have been assigned to the collections.
共享集合102可具有多个数据项。在图1的示例中,示出了四个数据项116、118、120、和122,但是集合可具有任意数量的数据项。每一个数据项可包含任意类型的数据。下文,结合图4和5将更为具体地描述可被存储在共享集合中的数据的一些示例。然而,作为一般示例,可被存储于集合中的一些数据类型是诸如数字或单词之类的元素数据类型、或更为复杂的由程序员定义的数据类型,诸如代表待做列表上的任务的结构、或用户界面的元素。此处描述的机制可对于数据类型是不可知的,从而集合中的独立的数据项可以是(详细示意为)从元素数据类型到复杂的用户定义的数据类型的任何项。Shared collection 102 may have multiple data items. In the example of FIG. 1, four data items 116, 118, 120, and 122 are shown, but a collection may have any number of data items. Each data item can contain any type of data. Some examples of data that may be stored in a shared collection will be described in more detail below in conjunction with FIGS. 4 and 5 . However, as general examples, some data types that can be stored in collections are elemental data types such as numbers or words, or more complex programmer-defined data types such as A structure, or element of a user interface. The mechanisms described here may be data type agnostic, such that individual data items in a collection may be (illustrated in detail) anything from elemental data types to complex user-defined data types.
在图1的示例中,共享集合102是排序的集合。如上所述,排序的集合是一种集合,其中集合的状态不仅由集合中的数据项所定义、还由这些数据项上的顺序所定义。数据项的插入或移除改变了排序的集合的状态,不过也改变了两个现有数据项之间位置。因此,排序的集合102中的每一个数据项具有顺序位置。顺序位置124、126、128、和130各自对应于数据项116、118、120、和122。因此,数据项116处在第一位置、数据项118处在第二位置,以此类推。如果要改变任一项的顺序号,即使对于项本身没有改变,这个改变将导致共享集合102的状态的改变。In the example of FIG. 1 , shared collection 102 is an ordered collection. As mentioned above, a sorted collection is a collection in which the state of the collection is defined not only by the data items in the collection, but also by the order on those data items. Insertion or removal of data items changes the state of the sorted collection, but also changes the position between two existing data items. Thus, each data item in sorted set 102 has an ordinal position.
可在共享集合102上执行的示例性操作包括转换操作132和删除操作134。转换操作132交换集合中两个(或更多个)项的顺序位置,且删除操作134移除集合中的其中一项。还有,可通过执行插入操作136来向集合增加新的数据项138,以修改集合。下文的讨论中,我们稍后将涉及这些操作。Exemplary operations that may be performed on the shared collection 102 include transform
图2示出其中程序可共享对于共享集合102的访问的示例性场景。机器202是在其上执行程序的机器。机器202可以是具有某种计算能力的任何类型的机器-如,诸如台式计算机或膝上型计算机之类的个人计算机、服务器计算机、手持式计算机、智能电话、机顶盒等。在图示示例中,两个程序204和206在机器202上执行,尽管任何数量的程序可在机器上运行。FIG. 2 illustrates an example scenario in which programs may share access to shared collection 102 . Machine 202 is the machine on which the program is executed. Machine 202 may be any type of machine having some computing capability—eg, a personal computer such as a desktop or laptop computer, a server computer, a handheld computer, a smartphone, a set-top box, and the like. In the illustrated example, two programs 204 and 206 execute on machine 202, although any number of programs may run on the machine.
机器202可存储数据,且被存储在机器202上的数据的一个类型是共享集合102的本地副本。在图2的示例中,共享集合102由程序204创建。在集合被创建时,集合可以是本地的且专用于程序204。然而,程序204可能想要将该集合登记为用于共享的集合,以允许其他程序(可能包括,在其他机器上运行的程序)共享对于集合102的访问。因此,程序204发出登记指令208。登记指令208可通过编写程序204的任何编程语言发出,且可由共享对象运行时210所接收。例如,共享对象运行时210可提供应用程序编程接口(API),允许程序204向共享对象运行时210发出登记指令(和订阅请求、和其他类型的指令)。Machines 202 may store data, and one type of data stored on machines 202 is a local copy of shared collection 102 . In the example of FIG. 2 , shared collection 102 is created by program 204 . The collection may be local and specific to the program 204 when the collection is created. However, program 204 may want to register the collection as a collection for sharing, to allow other programs (possibly including, programs running on other machines) to share access to collection 102 . Accordingly, the program 204 issues a register command 208 . The registration command 208 can be issued by any programming language in which the program 204 is written, and can be received by the shared object runtime 210 . For example, shared object runtime 210 may provide an application programming interface (API) that allows program 204 to issue registration instructions (and subscription requests, among other types of instructions) to shared object runtime 210 .
一旦接收登记指令208,共享对象运行时210可向共享对象服务器212登记共享集合102。共享对象服务器212是维持共享数据对象(诸如共享集合102)的真实状态的服务器,且还用作共享对象的改变的交换场所。即,当共享数据在机器上改变时,共享对象服务器212接收通知,并将对共享数据的状态的改变传播至其他机器。当共享集合102在共享对象服务器212上登记时,共享对象运行时210可提供共享集合102的副本。一旦集合102已经被登记为共享,共享的对象服务器212维持集合102的真实状态,如在图2的代表共享对象服务器212的框中的标记为“(真实状态)”的框中所示那样。(要注意的是,贯穿此处描述,我们将程序或订阅者发送动作称为向服务器或其他订阅者发送登记或订阅请求。程序发送这些类型的请求的动作包括其中程序将请求通信至运行时、且运行时将该请求通信至服务器、或其他订阅者或运行时的情况。类似地,如下文所述地,订阅者可将状态改变通信至服务器或其他订阅者;订阅者通信状态改变的动作包括其中在订阅者机器上的运行时执行通信的情况。)Upon receiving registration instruction 208 , shared object runtime 210 may register shared collection 102 with shared object server 212 . Shared object server 212 is a server that maintains the real state of shared data objects, such as shared collection 102 , and also serves as a clearinghouse for changes to shared objects. That is, when shared data changes on a machine, the shared object server 212 receives a notification and propagates the change to the state of the shared data to other machines. Shared object runtime 210 may provide a copy of shared collection 102 when shared collection 102 is registered on shared object server 212 . Once collection 102 has been registered as shared, shared object server 212 maintains the true state of collection 102 as shown in the box labeled "(real state)" in the box representing shared object server 212 in FIG. 2 . (Note that throughout this description, we refer to a program or subscriber sending an action as sending a register or subscribe request to a server or other subscriber. The action of a program sending these types of requests includes where the program communicates the request to the runtime , and the runtime communicates the request to the server, or to other subscribers or to the runtime. Similarly, as described below, a subscriber can communicate state changes to the server or to other subscribers; Actions include cases where the communication is performed at runtime on the subscriber's machine.)
当共享集合102被登记为共享时,除了程序204外的其他程序可通过订阅该集合来访问该集合。为了订阅集合,该程序可提交订阅请求214。一些集合可经受它们的创建者所指定的访问控制限制。这样的访问控制限制可限制可访问共享集合的一组程序和/或用户和/或机器。然而,假设在共享集合102上没有访问限制(或存在访问限制,但是寻求对于共享集合102的访问的那些限制具有访问该集合的允许),然后订阅共享集合102允许订阅者读取和/或修改该集合。When shared collection 102 is registered as shared, programs other than program 204 can access the collection by subscribing to the collection. To subscribe to a collection, the program may submit a subscription request 214 . Some collections are subject to access control restrictions specified by their creators. Such access control restrictions may limit the set of programs and/or users and/or machines that may access the shared collection. However, assuming there are no access restrictions on shared collection 102 (or there are access restrictions, but those restrictions seeking access to shared collection 102 have permission to access the collection), then subscribing to shared collection 102 allows subscribers to read and/or modify The collection.
订阅请求可来自任何机器上的任何程序。例如,通过经共享对象运行时210提交订阅请求,程序206可订阅共享集合102。值得注意的是,程序206与共享集合102的创建者(即,程序204)在同一机器202上。然而,订阅程序可在不同机器上。例如,机器218上的程序216也通过提交订阅请求214来订阅共享集合102。来自程序216的订阅请求通过共享对象运行时220(机器218的运行时)提交。(每一个机器可具有其自己的共享对象运行时的实例。)另外,共享集合102的订阅请求可来自在机器222、或在任何其他机器上执行的程序。Subscription requests can come from any program on any machine. For example, program 206 may subscribe to shared collection 102 by submitting a subscription request via shared object runtime 210 . Notably, program 206 is on the same machine 202 as the creator of shared collection 102 (ie, program 204 ). However, the subscription program can be on a different machine. For example, program 216 on machine 218 also subscribes to shared collection 102 by submitting subscription request 214 . Subscription requests from program 216 are submitted through shared object runtime 220 (the runtime of machine 218). (Each machine may have its own instance of the shared object runtime.) Additionally, subscription requests to shared collection 102 may come from programs executing on machine 222, or on any other machine.
当程序已经订阅共享集合102时,该程序可接收共享集合102的当前真实状态的副本。例如,机器218上的程序216接收共享集合102的副本,其可将副本存储在机器218上(如在代表机器218的图1的框中标记“(本地副本)”的共享集合102的实例)。然后订阅程序可如本地副本是纯粹本地集合一样读取和写入本地副本。在其上运行有程序的机器上的共享对象运行时的实例(如,在程序216的情况下,是共享对象运行时220)可监测共享集合102的本地副本来确定程序是否已经对于共享集合做出将被报告至共享对象服务器212的改变。When a program has subscribed to shared collection 102 , the program can receive a copy of the current state of truth of shared collection 102 . For example, program 216 on machine 218 receives a copy of shared collection 102, which may store a copy on machine 218 (such as the instance of shared collection 102 labeled "(local copy)" in the box of FIG. 1 representing machine 218) . Subscribers can then read and write to the local replica as if it were a purely local collection. An instance of the shared object runtime on the machine on which the program is running (e.g., in the case of program 216, shared object runtime 220) may monitor the local copy of the shared collection 102 to determine whether the program has done anything to the shared collection. Changes will be reported to the shared object server 212.
当对于共享集合102的任何订阅者执行对共享集合102的本地副本做出改变的操作,订阅者机器上的共享对象运行时将该操作报告至共享对象服务器212。然后,共享对象服务器212更新共享集合的当前状态,并提醒对象订阅者关于(包括对象的创建者)状态改变。When any subscriber to shared collection 102 performs an operation that makes a change to the local copy of shared collection 102 , the shared object runtime on the subscriber's machine reports the operation to shared object server 212 . The shared object server 212 then updates the current state of the shared collection and alerts object subscribers (including the object's creator) of the state change.
共享对象服务器212可包含同步组件226,其帮助在共享集合102的订阅者之间的状态信息的收集和传播。同步组件226的操作方式可以是依赖于实现的。在一个示例中,同步组件维持处于其真实状态中的共享集合102的主副本,且无论何时在这个集合的状态变化时,仅传播共享集合102的新副本。在另一个示例中,同步组件226维持相对于当前版本的共享集合102的改变列表,并将这些改变传播至各客户机。然后,每一个客户机上的运行时能基于共享集合102的本地状态和从共享对象服务器212接收到的改变来计算共享集合102的真实状态。即使共享对象服务器212没有响应于每一次状态改变传播共享集合102的完整副本,共享对象服务器212可确定如何解决对于共享集合102的同时改变,从而-当客户机侧的运行时接收改变的通知时-其可从旧的状态计算共享集合102的新的状态。如下文所述,需要时,同步组件226可转换变化,从而在不了解第二订阅者的同步改变的情况下,第一订阅者做出的改变,可被发送至第一订阅者,且可被以有意义的,且导致所有订阅者的结果收敛在共享集合102的相同状态上的方式来应用。Shared object server 212 may include a synchronization component 226 that facilitates the collection and dissemination of state information among subscribers of shared collection 102 . The manner in which synchronization component 226 operates may be implementation dependent. In one example, the synchronization component maintains a master copy of the shared collection 102 in its true state, and only propagates a new copy of the shared collection 102 whenever the state of this collection changes. In another example, the synchronization component 226 maintains a list of changes relative to the current version of the shared collection 102 and propagates these changes to clients. The runtime on each client can then compute the true state of the shared collection 102 based on the local state of the shared collection 102 and the changes received from the shared object server 212 . Even if the shared object server 212 does not propagate a complete copy of the shared collection 102 in response to every state change, the shared object server 212 can determine how to resolve simultaneous changes to the shared collection 102 so that - when the client-side runtime receives notification of the change - It can compute the new state of the shared set 102 from the old state. As described below, if desired, the synchronization component 226 can translate changes so that changes made by a first subscriber can be sent to the first subscriber without knowledge of the second subscriber's synchronized changes, and can is applied in a way that makes sense and causes the results of all subscribers to converge on the same state of the shared set 102 .
同步组件226所执行的一个功能可以是确定如何由两个客户机将所做出的改变应用于集合,其中没有一个客户机了解另一个的改变。如果两个客户机在大约同时做出涉及集合中同一项的改变,从而每一个客户机在接收另一个该改变的通知之前做出改变,这个情况可能发生。例如,假设集合中的最先两项是阿尔法(alpha)和贝塔(beta)。两个客户机—称它们为A和B—在大约同时对于集合做出改变。A想要在阿尔法后的位置添加新项,伽马(gamma),且B想要删除贝塔。所以A执行在顺序位置二处增加新项的操作,且B执行在顺序位置二删除项的操作。如果首先执行A的操作,则两个操作后的最终状态是阿尔法和贝塔分别占据位置一和二。如果首先执行B的操作,则两个操作后的最终状态是阿尔法和伽马分别占据位置一和二。同步组件226可以如下方式解决这个明显的冲突。One function performed by the synchronization component 226 may be to determine how changes made by two clients are applied to the collection, where neither client is aware of the other's changes. This situation may occur if two clients make changes involving the same item in the collection at about the same time, so that each client makes the change before the other receives notification of the change. For example, suppose the first two items in the set are alpha and beta. Two clients—call them A and B—make changes to the collection at about the same time. A wants to add a new term after alpha, gamma, and B wants to remove beta. So A performs an operation that adds a new item at sequence position two, and B performs an operation that deletes an item at sequence position two. If the operation of A is performed first, the final state after the two operations is that alpha and beta occupy positions one and two, respectively. If the operation of B is performed first, the final state after the two operations is that alpha and gamma occupy positions one and two respectively. Synchronization component 226 can resolve this apparent conflict as follows.
为了这个示例的目的,调用服务器S和客户机A和B。S、A、和B全部在状态0开始A执行操作X且B执行操作Y。由于A或B均不了解另一个操作已经被执行,A和B各自以状态0向S报告-即,A和B各自报告,当集合在状态0中存在时,它们已经在集合上执行了操作。已经执行了一个操作,现在A和B各自将它们的状态增至1。这些操作的一个,然而,将首先到达S。为这个示例,假设,X首先到达。由于操作X在状态0(这与S的当前状态匹配)操作,其在没有被转换的情况下在S上执行并发送至B。此外,确认被传送至A。S现在处于状态1。此时,B从S接收操作X。由于操作Y还没有被S所确认,操作X被相对于Y进行转换,然后应用至集合。B现在处于状态2。当操作Y到达S时,该操作表示它在状态0被执行。由于0不再是S的当前状态,S确定在B执行Y时不了解操作X。因此,操作Y被相对操作X而转换然后传送至A。确认被传送至B。S现在处于状态2。此时,A接收操作Y的经转换的版本。由于A不具有代办操作,在不将经转换的Y进一步转换的情况下应用经转换的Y。(即,经转换的Y表示其相对于状态1而被执行。由于A已经在状态1,没有进一步转换Y的基础。)A现在处于状态2。此外,在A和B的集合的副本现在以相同顺序显示相同数据。For the purposes of this example, call server S and clients A and B. S, A, and B all start in state 0 with A performing operation X and B performing operation Y. Since neither A nor B knows that the other operation has been performed, A and B each report to S in state 0 - i.e., A and B each report that they have performed an operation on the set while the set exists in state 0 . An operation has been performed, now A and B each increment their state to 1. One of these operations, however, will reach S first. For this example, assume that X arrives first. Since operation X operates in state 0 (which matches the current state of S), it is executed on S and sent to B without being transitioned. Additionally, an acknowledgment is sent to A. S is now in state 1. At this point, B receives operation X from S. Since operation Y has not been confirmed by S, operation X is transformed relative to Y and then applied to the collection. B is now in
图2示出示例性客户机/服务器-类型实现,其中服务器管理集合的共享。然而,还可使用对等实现。图3示出集合共享的对等实现的示例。Figure 2 shows an exemplary client/server-type implementation, where the server manages the sharing of collections. However, peer-to-peer implementations may also be used. Figure 3 shows an example of a peer-to-peer implementation of set sharing.
在图3的示例中,机器202、218、和222参与集合102的共享(就像它们在图2中所做的那样)。例如,每一个机器可具有作为共享集合102的订阅者的一个或多个程序(其中共享集合的创建者被包括在“订阅者”的概念中)。每一个机器具有共享对象运行时的实例—即,共享对象运行时210、220、和302分别在机器202、218、和222上运行。在对等实现中,共享对象运行时可直接彼此通信,而不是与服务器通信。另外,共享的对象运行时可负责转换传入改变,而不是由服务器执行那些改变。因此,只要不同运行时实现用于解决对于集合的冲突改变的相同算法,集合的当前状态可被确定性地了解。In the example of FIG. 3, machines 202, 218, and 222 participate in the sharing of set 102 (as they did in FIG. 2). For example, each machine may have one or more programs that are subscribers to the shared collection 102 (where creators of the shared collection are included in the notion of "subscriber"). Each machine has an instance of the shared object runtime—that is, shared
如果共享集合102例如在机器202上被改变,则机器202上的共享对象运行时202将状态改变304的通知传送至机器218和222上的共享对象运行时220和302。每一个共享对象运行时将状态改变304应用于共享集合102的当前状态,从而到达集合102的新的状态。在两个不同状态改变同时来自两个不同机器的情况下,共享对象运行时可应用冲突解决算法(如,上述结合同步组件226描述的算法)来确定要应用什么状态变化。如上所述,可使得该算法为确定性的,从而接收同一组冲突改变的任何两个运行时可以同样的方式解决冲突,藉此使得集合在各不同的机器上被改变至相同状态。If shared collection 102 is changed, eg, on machine 202 , shared object runtime 202 on machine 202 transmits a notification of
图4和5示出共享集合可如何被使用的一些示例。图4和5中的示例是示意性的,且并不限制此处的主题。其被提供仅用于给出共享集合可被如何使用的一些特定示例,但是可理解的是存在其中可使用共享集合的众多其他上下文。Figures 4 and 5 show some examples of how shared collections may be used. The examples in Figures 4 and 5 are schematic and do not limit the subject matter here. It is provided only to give some specific examples of how the shared collection may be used, but it is understood that there are numerous other contexts in which the shared collection may be used.
图4示出示例性任务列表,其可被实现为共享集合。任务列表中的每一个任务可以是将被执行的任务。所示出的任务列表包括四个示例性项,402、404、406、和408,且可以是将由为公司开发新产品的工作组所执行的任务。任务列表可被实现为集合,其中将被执行的每一个任务是集合中的项,且其中这些项所定义的顺序代表了其中这些项将被执行的顺序。工作组的成员可全部对于任务列表具有控制。例如,可通过e-mail和日历程序访问该任务列表,其中每一个组员正在运行实例。因此,不同的组员可在列表上添加或删除项,或可重新排列现有项。因此,程序的每一个实例可以是代表任务列表的集合的订阅者。当任何组员使用他或她的程序实例来对任务列表做出改变时,该改变可被以上述方式传播至程序的其他实例。所以,工作人员可使用程序的第一实例来转换第一和第二任务的顺序(如数字410所指示的)、且另一个工作人员可使用程序的第二实例来删除第三任务(如数字412所指示的)。这些改变可被处理,且可到达集合的新的状态。Figure 4 illustrates an exemplary task list, which may be implemented as a shared collection. Each task in the task list may be a task to be performed. The illustrated task list includes four exemplary items, 402, 404, 406, and 408, and may be tasks to be performed by a workgroup developing a new product for a company. A task list may be implemented as a set, where each task to be performed is an item in the set, and where the order defined by the items represents the order in which the items are to be performed. Members of the workgroup may all have control over the task list. For example, the task list can be accessed through e-mail and calendar programs where each team member is running an instance. Thus, different team members can add or delete items on the list, or can rearrange existing items. Thus, each instance of a program can be a subscriber to a collection representing a task list. When any team member uses his or her instance of the program to make a change to the task list, that change can be propagated to other instances of the program in the manner described above. So, a worker can use a first instance of the program to switch the order of the first and second tasks (as indicated by numeral 410), and another worker can use a second instance of the program to delete the third task (as indicated by numeral 412). These changes can be processed and a new state of the collection can be reached.
图5示出示例性用户界面,其可被实现为集合。用户界面可例如,是桌面工具条,其中图5中所示的各数据项(即,数据项502、504、506、508、和510)是以对应于项显示在集合中的顺序以某种垂直顺序图是在工具条中的窗口小部件。窗口小部件的列表可被实现为集合,且不同程序可共享对于集合的访问。例如,用户可确定他想要使得时钟位于新的反馈的顶部,且因此可转换集合中最先两个元素的顺序(如数字512所示)。然后,用户可将工具条中的错误报告至信息技术管理器。然后,管理器可使用管理程序来连接至工具条。管理器可识别,比如,照片查看程序具有错误,且因此可从工具条中删除该窗口小部件(如数字514所示)。以此方式,两个人使用两个不同应用来修改被实现为集合的用户界面。Figure 5 illustrates an exemplary user interface, which may be implemented as a collection. The user interface may, for example, be a desktop toolbar in which the data items shown in FIG. The vertical sequence diagram is a widget in the toolbar. A list of widgets can be implemented as a collection, and different programs can share access to the collection. For example, the user may determine that he wants the clock to be on top of the new feed, and thus may switch the order of the first two elements in the set (shown as numeral 512). The user can then report errors in the toolbar to the information technology manager. The manager can then use the manager to connect to the toolbar. The manager can identify, for example, that the photo viewer has a bug, and can therefore remove the widget from the toolbar (shown as numeral 514). In this way, two people use two different applications to modify a user interface implemented as a collection.
要注意的是,在图4和5的示例中,图示的集合可涉及复杂的数据类型。例如,图4中的数据项是任务(可包含用于概述、详细描述、截止日期、提醒日期等的字段)。且图5中的数据项可以是应用处理(其可包含字段,诸如应用的名称、在磁盘上位置、运行时参数,等)。换言之,这些示例示出可被用在共享集合中的任何类型的数据,且集合共享机制可以相同方式处理各种类型数据,而不管数据的特性或结构。Note that in the examples of Figures 4 and 5, the illustrated collections may involve complex data types. For example, the data item in Figure 4 is a task (which may contain fields for overview, long description, due date, reminder date, etc.). And the data item in FIG. 5 may be an application handle (which may contain fields such as the application's name, location on disk, runtime parameters, etc.). In other words, these examples show that any type of data can be used in a shared collection, and that the collection sharing mechanism can handle various types of data in the same way, regardless of the nature or structure of the data.
图6示出其中可共享集合的示例性处理。在转向图6的描述之前,注意,参考图1-5中所示的组件作为示例地描述了包含在图6中的流程图,尽管图6的过程可以在任何系统中实现,并且不限于图1-5中示出的场景。另外地,图6中的流程图示出了其中按特定顺序来实现过程的各阶段的一示例,如连接各框的线所示,但这个示图中示出的各种阶段可以按任何顺序、或以任何组合或子组合来执行。Figure 6 illustrates an exemplary process in which collections may be shared. Before turning to the description of FIG. 6, note that the flowchart contained in FIG. 6 is described by way of example with reference to the components shown in FIGS. 1-5, although the process of FIG. 6 may be implemented in any system and is not limited to Scenarios shown in 1-5. Additionally, the flowchart in FIG. 6 shows an example where the stages of the process are implemented in a particular order, as shown by the lines connecting the blocks, but the various stages shown in this diagram can be in any order , or in any combination or subcombination.
在602,创建集合。例如,程序可创建集合,可通过使用通常将被用于创建本地集合的机制来这样做。该集合可以是任意类型的集合—如,列表、阵列等。在604,集合可被登记为用于共享。例如,创建集合的程序可发出指令,这可由在其上运行程序的机器上的共享对象运行时所接收。在一个示例中,运行时展示了API,其允许程序发出登记指令,尽管可以其他方式发出登记指令。At 602, a collection is created. For example, a program can create collections by using mechanisms that would normally be used to create local collections. The collection can be any type of collection—for example, a list, an array, and so on. At 604, a collection can be registered for sharing. For example, a program that creates an assembly can issue instructions, which can be received by the shared object runtime on the machine on which the program is running. In one example, the runtime exposes an API that allows a program to issue check-in instructions, although check-in instructions could be issued in other ways.
在集合被登记为共享后,可接收到对于集合的订阅请求(在606)。例如,与创建集合的程序共享同一命名空间的其他程序可对于该集合发出订阅请求。这些订阅请求可被向在其上运行有订阅程序的机器上的共享对象运行时发出。在一个示例中,可通过运行时所展示的API发出订阅请求。为了此处的主题的目的,创建者被认为是订阅者之一。(即使创建者发出登记请求而不是订阅请求,从订阅者是可访问该集合的那些程序的意义上而言,共享对象的创建者是订阅者。)订阅者可接收集合的当前状态(在608),且它们可存储集合的本地副本。After the collection is registered as shared, a subscription request for the collection can be received (at 606). For example, other programs that share the same namespace as the program that created the collection can issue subscription requests to that collection. These subscription requests may be issued to the shared object runtime on the machine on which the subscribing program is running. In one example, a subscription request can be made through an API exposed by the runtime. For the purposes of topics here, the creator is considered one of the subscribers. (Even if the creator issues a registration request rather than a subscription request, the creator of the shared object is a subscriber in the sense that the subscribers are those programs that have access to the collection.) The subscriber can receive the current state of the collection (at 608 ), and they store a local copy of the collection.
在某一点,订阅者对于集合做出改变(在610)。示例性改变包括插入652、删除654、和移动656。插入652在集合顺序中特定位置处向集合添加新的项。删除654从集合中移除现有的项。移动656重新排序集合中两个或更多个项的顺序。At some point, the subscriber makes a change to the collection (at 610). Exemplary changes include insertion 652 , deletion 654 , and movement 656 . Insertion 652 adds a new item to the collection at a specific position in the collection order. DELETE 654 removes the existing item from the collection. Moving 656 reorders the order of two or more items in the collection.
当订阅者机器上的共享对象运行时检测到改变时,共享对象运行时通知可适用的实体(多个)有关该改变(在612),且这些变化由这些实体(多个)所接收(在614)。哪些实体是“可适用的实体”可取决于实现。如上所述,对于此处描述的主题的实现,存在例如,客户机/服务器和对等实现。在客户机/服务器实现中,检测改变的运行时可通知管理集合的真实状态的共享对象服务器。在对等实现中,每一个运行时直接通知其他运行时。When the shared object runtime on the subscriber machine detects a change, the shared object runtime notifies the applicable entity(s) of the change (at 612), and the changes are received by the entity(s) (at 614). Which entities are "applicable entities" may be implementation dependent. As noted above, there are, for example, client/server and peer-to-peer implementations for implementations of the subject matter described herein. In a client/server implementation, the runtime detecting changes may notify the shared object server managing the real state of the collection. In a peer-to-peer implementation, each runtime notifies the other runtimes directly.
当接收到对于集合的改变时,以确定性方式解决(如,表示两个客户机已经在集合的同一状态执行操作的改变)任何冲突改变(在616)。例如,如果两个订阅者已经做出了影响集合中“第二”项的改变(如,一个实体转换第一和第二实体的位置,而另一个实体,同时地,删除了第二实体),这些冲突的改变可被解决来达到集合的真实状态-如,使用上述结合同步组件226(图示于图2中)描述的算法。解决冲突的方式可能会也可能不会实现做出改变的订阅者的意图,但是可明白地确定所得状态。When changes to the collection are received, any conflicting changes (eg, changes indicating that two clients are already performing operations on the same state of the collection) are resolved in a deterministic manner (at 616 ). For example, if two subscribers have made changes that affect the "second" item in the collection (eg, one entity switches the positions of the first and second entities, and the other entity, simultaneously, deletes the second entity) , these conflicting changes can be resolved to arrive at the true state of the collection—eg, using the algorithm described above in connection with synchronization component 226 (shown in FIG. 2 ). The conflict is resolved in a manner that may or may not achieve the intent of the subscriber who made the change, but unambiguously determines the resulting state.
在客户机/服务器实现中,所解决的变化可被传送至订阅者(在618)。在对等实现中,订阅者和/或在订阅者机器上的运行时从其他订阅者和/或运行时处接收改变信息,并在没有服务器帮助的情况下,自己解决冲突。确定性冲突解决处理允许每一个客户机以同样方式解决改变,从而各订阅者可收敛于集合的真实状态的相同结果上。(同样地,可明白地解决所得状态,但是所得状态可能会也可能不会实现做出改变的订阅者的意图。)In a client/server implementation, the resolved changes may be communicated to subscribers (at 618). In a peer-to-peer implementation, subscribers and/or runtimes on subscriber machines receive change information from other subscribers and/or runtimes, and resolve conflicts themselves without assistance from the server. Deterministic conflict resolution processing allows each client to resolve changes in the same way so that subscribers can converge on the same result on the true state of the collection. (Again, the resulting state can be resolved explicitly, but the resulting state may or may not fulfill the intent of the Subscriber who made the change.)
当任何所存在的冲突已经被解决时(且在客户机/服务器实现的情况下,是当冲突解决的结果已经从服务器被通信至订阅者时),可作出对于集合的本地副本的改变(在620)来使得这些本地副本与真实状态一致。然后订阅者继续读取和写入集合。When any existing conflicts have been resolved (and in the case of a client/server implementation, when the results of the conflict resolution have been communicated from the server to the subscriber), changes to the local copy of the collection can be made (in 620) to make these local copies consistent with the real state. Subscribers then continue to read and write to the collection.
图7示出其中可部署此处所述的本发明的各方面的示例环境。Figure 7 illustrates an example environment in which aspects of the invention described herein may be deployed.
计算机700包括一个或多个处理器702和一个或多个数据记忆组件704。(诸)处理器702通常是微处理器,如在个人台式计算机或膝上型计算机、服务器、手持式计算机或另一类型的计算设备中含有的那些微处理器。(诸)数据记忆组件704是能够短期或长期存储数据的组件。(诸)数据记忆组件704的示例包括硬盘、可移动盘(包括光盘和磁盘)、易失性和非易失性随机存取存储器(RAM)、只读存储器(ROM)、闪存、磁带等等。(诸)数据记忆组件是计算机可读存储介质的示例。计算机700可以包括显示器712或与其关联,显示器912可以是阴极射线管(CRT)监视器、液晶显示(LCD)监视器或任何其他类型的监视器。Computer 700 includes one or
软件可以被存储在(诸)数据记忆组件704中,而且可以在一个或多个处理器(多个)702上运行。此类软件的一个示例是可以实现以上结合图1-6描述的一些或所有功能的集合共享软件706,但可以使用任何类型的软件。可以例如通过一个或多个组件来实现软件706,这些组件可以是分布式系统中的组件、分开的文件、分开的函数、分开的对象、分开的代码行等等。其中程序被存储在硬盘、被加载到RAM中并被(诸)计算机处理器上执行的计算机(例如,个人计算机、服务器计算机、手持式计算机等等)代表图7中所描绘的场景,但在此所描述的主题不限于这一示例。Software may be stored in data memory component(s) 704 and may run on one or more processor(s) 702 . One example of such software is collective shareware 706 that may implement some or all of the functionality described above in connection with Figures 1-6, although any type of software may be used. Software 706 may be implemented, for example, by one or more components, which may be components in a distributed system, separate files, separate functions, separate objects, separate lines of code, and so on. A computer (e.g., a personal computer, a server computer, a handheld computer, etc.) in which a program is stored on a hard disk, loaded into RAM, and executed on a computer processor(s) represents the scenario depicted in FIG. The subject matter described herein is not limited to this example.
在此所描述的主题可以被实现为被存储在数据记忆组件704中的一个或多个内并在一个或多个处理器702上执行的软件。作为另一示例,本主题可以被实现为存储在一个或多个计算机可读存储介质上的指令。诸如光盘或磁盘等有形介质是存储介质的示例。指令可以存在于非暂态介质上。此类指令在由计算机或其他机器执行时可以使得计算机或其他机器执行一种方法的一个或多个动作。执行动作的指令可以被存储在一个介质上,或可以开跨多个介质来分布,以使得这些指令共同出现在一个或多个计算机可读存储介质上而无论所有指令是否恰好是在同一介质上。The subject matter described herein may be implemented as software stored within one or more of
此外,作为方法的一部分,在此所描述的任何动作(无论是否在图中示出)可以由处理器(例如,一个或多个处理器702)执行。因此,如果在此描述动作A、B和C,则可以执行一种包括动作A、B和C的方法。此外,如果在此描述动作A、B和C,则,可以执行一种包括使用处理器执行动作A、B和C的方法。Additionally, any acts described herein (whether shown in figures or not) can be performed by a processor (eg, processor(s) 702 ) as part of a method. Thus, if actions A, B, and C are described herein, a method including actions A, B, and C can be performed. Furthermore, if actions A, B, and C are described herein, a method comprising performing actions A, B, and C using a processor can be performed.
在一个示例环境中,计算机700可以通过网络708在通信上连接到一个或多个其他设备。结构上可以类似于计算机700的计算机710是可以被连接到计算机700的设备示例,但其他类型的设备也可以这样连接。In one example environment, computer 700 may be communicatively connected to one or more other devices via network 708 . Computer 710, which may be similar in structure to computer 700, is an example of a device that may be connected to computer 700, but other types of devices may be so connected.
尽管用结构特征和/或方法动作专用的语言描述了本主题,但可以理解,所附权利要求书中定义的主题不必限于上述具体特征或动作。更确切而言,上述具体特征和动作是作为实现权利要求的示例形式公开的。Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (15)
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US12/821,971 | 2010-06-23 | ||
| US12/821,971 US9104715B2 (en) | 2010-06-23 | 2010-06-23 | Shared data collections |
| PCT/US2011/040235 WO2011163001A2 (en) | 2010-06-23 | 2011-06-13 | Shared data collections |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN103003815A true CN103003815A (en) | 2013-03-27 |
| CN103003815B CN103003815B (en) | 2014-04-16 |
Family
ID=45353474
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201180030891.XA Expired - Fee Related CN103003815B (en) | 2010-06-23 | 2011-06-13 | Shared data collections |
Country Status (6)
| Country | Link |
|---|---|
| US (1) | US9104715B2 (en) |
| EP (1) | EP2585955A4 (en) |
| JP (1) | JP5941461B2 (en) |
| CN (1) | CN103003815B (en) |
| CA (1) | CA2800916C (en) |
| WO (1) | WO2011163001A2 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10063501B2 (en) | 2015-05-22 | 2018-08-28 | Microsoft Technology Licensing, Llc | Unified messaging platform for displaying attached content in-line with e-mail messages |
| US10216709B2 (en) | 2015-05-22 | 2019-02-26 | Microsoft Technology Licensing, Llc | Unified messaging platform and interface for providing inline replies |
Families Citing this family (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11611595B2 (en) | 2011-05-06 | 2023-03-21 | David H. Sitrick | Systems and methodologies providing collaboration among a plurality of computing appliances, utilizing a plurality of areas of memory to store user input as associated with an associated computing appliance providing the input |
| US10402485B2 (en) | 2011-05-06 | 2019-09-03 | David H. Sitrick | Systems and methodologies providing controlled collaboration among a plurality of users |
| US9235867B2 (en) * | 2012-06-04 | 2016-01-12 | Microsoft Technology Licensing, Llc | Concurrent media delivery |
| WO2014029441A1 (en) * | 2012-08-23 | 2014-02-27 | Telefonaktiebolaget L M Ericsson (Publ) | Handling a shared data object in a communication network |
| US20140068450A1 (en) * | 2012-08-31 | 2014-03-06 | Ebay Inc. | Personalized Curation and Customized Social Interaction |
| US9372833B2 (en) | 2012-09-14 | 2016-06-21 | David H. Sitrick | Systems and methodologies for document processing and interacting with a user, providing storing of events representative of document edits relative to a document; selection of a selected set of document edits; generating presentation data responsive to said selected set of documents edits and the stored events; and providing a display presentation responsive to the presentation data |
| US20140082473A1 (en) * | 2012-09-14 | 2014-03-20 | David H. Sitrick | Systems And Methodologies Of Event Content Based Document Editing, Generating Of Respective Events Comprising Event Content, Then Defining A Selected Set Of Events, And Generating Of A Display Presentation Responsive To Processing Said Selected Set Of Events, For One To Multiple Users |
| US10956446B1 (en) | 2013-09-11 | 2021-03-23 | Amazon Technologies, Inc. | Log-based synchronization with inferred context |
| US9251235B1 (en) * | 2013-09-11 | 2016-02-02 | Amazon Technologies, Inc. | Log-based synchronization |
| US9946727B2 (en) * | 2014-06-18 | 2018-04-17 | International Business Machines Corporation | Synchronizing user states across multiple clients of a NAS system |
| US10412163B2 (en) | 2015-01-30 | 2019-09-10 | Hitachi, Ltd. | Computer system, distributed object sharing method, and edge node |
| US20160321226A1 (en) * | 2015-05-01 | 2016-11-03 | Microsoft Technology Licensing, Llc | Insertion of unsaved content via content channel |
| US9948703B2 (en) * | 2015-05-14 | 2018-04-17 | Twilio, Inc. | System and method for signaling through data storage |
| US10623423B1 (en) * | 2019-06-06 | 2020-04-14 | Sift Science, Inc. | Systems and methods for intelligently implementing a machine learning-based digital threat mitigation service |
| US12093751B2 (en) * | 2020-07-16 | 2024-09-17 | T-Mobile Usa, Inc. | Preserving eventually consistent distributed state of multi-layer applications |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7120687B1 (en) * | 2000-12-08 | 2006-10-10 | America Online, Inc. | Monitoring digital images |
| CN101495976A (en) * | 2005-07-29 | 2009-07-29 | 微软公司 | Direct update software transactional memory |
| CN101615203A (en) * | 2009-07-23 | 2009-12-30 | 中兴通讯股份有限公司 | Concurrency control method and device |
| CN102893272A (en) * | 2010-05-19 | 2013-01-23 | 微软公司 | Sharing and synchronization of objects |
Family Cites Families (24)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5293600A (en) | 1990-04-06 | 1994-03-08 | International Business Machines Corporation | Counter and flux bit locking for very fast shared serialization of shared data objects |
| US5546572A (en) * | 1991-08-28 | 1996-08-13 | Hitachi, Ltd. | Method for retrieving database of image information |
| US5408470A (en) * | 1993-10-14 | 1995-04-18 | Intel Corporation | Deferred synchronization of distributed objects |
| GB9604987D0 (en) | 1996-03-08 | 1996-05-08 | Ibm | Data management system and method for replicated data |
| US6199116B1 (en) * | 1996-05-24 | 2001-03-06 | Microsoft Corporation | Method and system for managing data while sharing application programs |
| US6128615A (en) | 1997-06-17 | 2000-10-03 | Compaq Computer Corporation | Process-pair resource manager implementation of object bags |
| US6324587B1 (en) | 1997-12-23 | 2001-11-27 | Microsoft Corporation | Method, computer program product, and data structure for publishing a data object over a store and forward transport |
| US6148301A (en) * | 1998-07-02 | 2000-11-14 | First Data Corporation | Information distribution system |
| US6789252B1 (en) | 1999-04-15 | 2004-09-07 | Miles D. Burke | Building business objects and business software applications using dynamic object definitions of ingrediential objects |
| US6529921B1 (en) | 1999-06-29 | 2003-03-04 | Microsoft Corporation | Dynamic synchronization of tables |
| US6711595B1 (en) | 2000-05-09 | 2004-03-23 | Openwave Systems Inc. | Method and apparatus for sharing standard template library objects among processes |
| JP2003256461A (en) * | 2002-03-04 | 2003-09-12 | Fuji Photo Film Co Ltd | Method and device for retrieving image, and program |
| KR100483451B1 (en) * | 2002-05-27 | 2005-04-15 | 주식회사 아이큐브 | Method for editing a contents file and a navigation information, medium recorded a information by the method |
| US7568151B2 (en) | 2002-06-27 | 2009-07-28 | Microsoft Corporation | Notification of activity around documents |
| EP1443423A1 (en) | 2003-01-28 | 2004-08-04 | Bombardier Transportation (Technology) Germany GmbH | Apparatus and method for data replication in a data network |
| US7577960B2 (en) | 2003-06-19 | 2009-08-18 | Microsoft Corporation | System and method for managing cached objects using notifications bonds |
| US20050071195A1 (en) | 2003-09-30 | 2005-03-31 | Cassel David A. | System and method of synchronizing data sets across distributed systems |
| US7467190B2 (en) * | 2003-10-06 | 2008-12-16 | Hitachi, Ltd. | Method and apparatus for alert distribution and archive sharing |
| US20050218739A1 (en) * | 2004-04-01 | 2005-10-06 | Microsoft Corporation | System and method for sharing objects between computers over a network |
| US7383291B2 (en) | 2004-05-24 | 2008-06-03 | Apple Inc. | Method for sharing groups of objects |
| US20070078852A1 (en) | 2005-10-04 | 2007-04-05 | Microsoft Corporation | Synchronizing shared resources in a collection |
| US20070174764A1 (en) * | 2006-01-25 | 2007-07-26 | Microsoft Corporation | Data Collection |
| US7860825B2 (en) | 2006-05-08 | 2010-12-28 | Palm, Inc. | Method for synchronizing software application and user data for asynchronous client-server and peer to peer computer networks |
| US20080059519A1 (en) | 2006-09-02 | 2008-03-06 | Tony Grifftih | System, method, and apparatus for providing storage operations on an online computer system |
-
2010
- 2010-06-23 US US12/821,971 patent/US9104715B2/en not_active Expired - Fee Related
-
2011
- 2011-06-13 JP JP2013516603A patent/JP5941461B2/en not_active Expired - Fee Related
- 2011-06-13 EP EP11798629.9A patent/EP2585955A4/en not_active Withdrawn
- 2011-06-13 WO PCT/US2011/040235 patent/WO2011163001A2/en not_active Ceased
- 2011-06-13 CN CN201180030891.XA patent/CN103003815B/en not_active Expired - Fee Related
- 2011-06-13 CA CA2800916A patent/CA2800916C/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7120687B1 (en) * | 2000-12-08 | 2006-10-10 | America Online, Inc. | Monitoring digital images |
| CN101495976A (en) * | 2005-07-29 | 2009-07-29 | 微软公司 | Direct update software transactional memory |
| CN101615203A (en) * | 2009-07-23 | 2009-12-30 | 中兴通讯股份有限公司 | Concurrency control method and device |
| CN102893272A (en) * | 2010-05-19 | 2013-01-23 | 微软公司 | Sharing and synchronization of objects |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10063501B2 (en) | 2015-05-22 | 2018-08-28 | Microsoft Technology Licensing, Llc | Unified messaging platform for displaying attached content in-line with e-mail messages |
| US10216709B2 (en) | 2015-05-22 | 2019-02-26 | Microsoft Technology Licensing, Llc | Unified messaging platform and interface for providing inline replies |
| US10360287B2 (en) | 2015-05-22 | 2019-07-23 | Microsoft Technology Licensing, Llc | Unified messaging platform and interface for providing user callouts |
Also Published As
| Publication number | Publication date |
|---|---|
| CN103003815B (en) | 2014-04-16 |
| EP2585955A2 (en) | 2013-05-01 |
| US9104715B2 (en) | 2015-08-11 |
| JP5941461B2 (en) | 2016-06-29 |
| CA2800916A1 (en) | 2011-12-29 |
| WO2011163001A2 (en) | 2011-12-29 |
| EP2585955A4 (en) | 2017-08-30 |
| JP2013529810A (en) | 2013-07-22 |
| CA2800916C (en) | 2017-08-29 |
| US20110320407A1 (en) | 2011-12-29 |
| WO2011163001A3 (en) | 2012-02-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN103003815B (en) | Shared data collections | |
| EP3005156B1 (en) | Sync framework extensibility | |
| US10778763B2 (en) | Content item sharing and synchronization system with team shared folders | |
| JP7158482B2 (en) | Method, computer-readable medium, and system for resolution of violations in client synchronization | |
| US8719845B2 (en) | Sharing and synchronization of objects | |
| EP3526691B1 (en) | File synchronization in computing systems | |
| US11397569B2 (en) | Deploying micro frontends to different clusters from a single repository | |
| CN106164858A (en) | Data view presentation mechanism | |
| CN107003879B (en) | Method and system for simultaneous collaborative undo operations in computer applications | |
| US9448791B1 (en) | Synchronizing source code objects and software development workflow objects | |
| CN104115112B (en) | Contextual interaction with apps | |
| US8832156B2 (en) | Distributed computing management | |
| WO2018049880A1 (en) | Data migration method and device | |
| US12332846B1 (en) | Data deduplication using modulus reduction arrays | |
| US20180074867A1 (en) | Provide copy of notebook document | |
| JP7703652B2 (en) | Intent Tracking for Asynchronous Behavior | |
| CN117130648A (en) | Application management method, device and system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| ASS | Succession or assignment of patent right |
Owner name: MICROSOFT TECHNOLOGY LICENSING LLC Free format text: FORMER OWNER: MICROSOFT CORP. Effective date: 20150424 |
|
| C41 | Transfer of patent application or patent right or utility model | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20150424 Address after: Washington State Patentee after: Micro soft technique license Co., Ltd Address before: Washington State Patentee before: Microsoft Corp. |
|
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20140416 Termination date: 20190613 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |