Sync as a service for cloud-based applications

A technique provides sync capability as an independent backend service, which developers can include, at their option, in their cloud-based applications. In accordance with the improved technique, a sync service runs in a backend system in connection with a set of data. The sync service syncs changes in the set of data among application instances that have access to the set of data. Sync services may be specified selectively for different sets of data, e.g., by specifying syncing for one set of data but not for another set of data.

BACKGROUND

Cloud-based applications are software applications that employ services available over the Internet or some other network to assist the applications in performing their various tasks. In a typical scenario, a user installs a frontend client (e.g., an “app”) on a client device, which connects to a backend server over the Internet. The frontend client typically manages a user interface and performs local processing on the client device, whereas the backend server may access large databases, store user data, and perform computationally intensive tasks. Users currently enjoy a wide range of cloud-based applications, including applications for data storage, video streaming, web conferencing, mapping, banking, and many others.

A common use for a cloud-based application is to provide user data storage in the cloud. For example, a user installs a data storage client on the user's device and designates a local folder for storing files. Any time the user adds a file to the local folder, the data storage client automatically uploads the file to a backend system running in the cloud. The user may install similar data storage clients for the same application on other devices, and cloud-based services on the backend system coordinate with the different devices to ensure that all the devices share the same files and file versions. For example, when a frontend client on one of the devices creates a new file, the cloud-based services sync the new file to the other devices, so that each device stores an identical copy of the file.

SUMMARY

Unfortunately, sync features available to application developers are often inflexible and cumbersome. For example, a developer of a cloud-based application may use a third-party service for storing data in the cloud. But the third-party service may provide limited flexibility as to whether it provides sync features and to which data such sync services apply. In addition, some third-party services require users to maintain accounts, which are in addition to any account required by the application itself. Although it is possible for developers to build their own storage and sync solutions, which do not require the use of third-party services, such solutions are complex and add significantly to the overall effort of developing applications.

In contrast with the above-described conventional approach, an improved technique provides sync capability as an independent backend service, which developers can include, at their option, in their cloud-based applications. A sync service runs in a backend system in connection with a specified set of data. The sync service syncs changes in the set of data among application instances that have access to the set of data. The sync service allows syncing to be specified selectively for different sets of data, e.g., by specifying syncing for one set of data but not necessarily for another set of data.

Advantageously, the improved technique provides developers of cloud-based applications with the ability to include sync capabilities simply by requesting them, e.g., via a simple API. Thus, the developer is not forced to choose between inflexible, cumbersome solutions from third party suppliers and spending resources on developing their own data storage and sync features.

Certain embodiments are directed to a method of syncing data in a backend system that provides services for supporting cloud-based software applications. The method includes storing, by a data storage service in the backend system, a set of data used by a cloud-based application. The data storage service storing the set of data in response to storage instructions received from the cloud-based application, the cloud-based application having a set of application instances running on respective computing machines operatively connected to the backend system over a network. The method further includes storing, by the backend system, a set of sync settings for the set of data, the set of sync settings indicating whether the backend system employs a sync service for syncing the set of data stored in the backend system by the data storage service. The method further includes syncing the set of data among the backend system and the set of application instances in response to (i) changes in the set of data, and (ii) having stored sync settings indicating that the backend system employs the sync service for syncing the set of data.

Other embodiments are directed to a backend server constructed and arranged to perform the method described above. Still other embodiments are directed to a computer program product embodying a non-transitory, computer-readable medium. The non-transitory, computer-readable medium stores instructions, which, when executed on one or more processors units of backend system, cause the backend system to perform the method described above. Some embodiments involve activity that is performed at a single location, while other embodiments involve activity that is distributed over a computerized environment (e.g., over a network).

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the invention will now be described. It is understood that such embodiments are provided by way of example to illustrate various features and principles of the invention, and that the invention hereof is broader than the specific example embodiments disclosed.

An improved technique provides sync capability as an independent backend service, which developers can include, at their option, in their cloud-based applications. A sync service runs in a backend system in connection with a set of data stored by a data storage service on the backend system. The sync service syncs changes in the set of data among application instances that have access to the set of data. Developers may specify the sync service selectively for different sets of data, e.g., by specifying syncing for one set of data but not for another set of data.

To assist the reader, this detailed description is provided in sections as follows:Section I provides an overview of an example environment and techniques for storing data on a backend system.Section II describes a technique for sending push notifications in the environment described in Section I.Section III describes a technique for providing sync as a service to a cloud-based application.
Section I: Overview of Example Environment and Techniques for Storing Data on a Backend System

FIG. 1shows an example environment100in which embodiments of the improved technique hereof can be practiced. Here, developer machines110(110(1),110(2), etc.) and client machines120(e.g.,120(1),120(2), etc.) connect to a backend system140over a network130. Typically, a software developer operates each of the developer machines110and an end user operates each of the client machines120. Each of the developer machines110runs a development version of a frontend client (e.g., App1D, App2D), such as a software program or “app,” as well as a software development kit (e.g. SDK1, SDK2), which a developer may use for programming the frontend client to access services on the backend system140. Different SDKs may be provided for different front-end computing platforms (e.g., Windows, OSX, iOS, Android, etc.) and/or for different computer languages (e.g., Java, Ruby, Rails, Python, Node, Objective C, etc.). In some examples, developer machines110access backend services directly, e.g., using a REST (Representational State Transfer) interface, without the need for an SDK.

Each of the client machines120includes a production version of one or more frontend clients (e.g., App1P, App2P). In this example, App1P is a production version of App1D and App2P is a production version of App2D. Of course, developer machines110may also run production versions of client frontends. In addition, any of the machines110and120may run any number of frontend clients. It should be understood that the arrangement as shown is merely illustrative.

In an example, the backend system140provides services both for developing cloud-based applications and for hosting cloud-based applications and features. Thus, the backend system140may be used at various times or simultaneously both by developer machines110and by client machines120. The backend system140is seen to include one or more network interfaces142(e.g., Ethernet and/or Token Ring cards), a set of processors144(e.g., one or more processing chips, blades, and/or assemblies), and memory150. The memory150includes both volatile memory (e.g., RAM) and non-volatile memory, such as one or more disk drives, solid state drives, data storage arrays, and the like.

The memory150stores software constructs for realizing application sandboxes160(1),160(2), etc. (as many as desired), as well as services166and data storage containers170. The data storage containers170provide data storage for the above-described first and second cloud-based applications, and, generally, for any cloud-based applications that the backend system140supports. A set of storage devices (e.g., disk drives, flash drives, memory chips, etc.) of the memory150provide physical media for storing the data storage containers170.

In an example, each of the application sandboxes160(1) and160(2) is dedicated to a respective cloud-based application and operates a respective application backend for supporting the cloud-based application. For example, sandbox160(1) operates a backend App1BE for supporting a first cloud-based application and sandbox160(2) operates a backend App2BE for supporting a second cloud-based application. Here, App1BE is the backend that supports frontends App1D and App1P. Likewise, App2BE is the backend that supports frontends App2D and App2P. Note that the backends may be segregated into development and production versions, in a manner similar to that shown for the frontends. In an example, application developers write the application backends either in situ on the backend system140(e.g., over a web interface) or on developer machines (e.g.,110). Developers may upload backends written on developer machines to the backend system140once the locally-developed backends are ready to be deployed. It should be understood that some cloud-based applications may not require application backends, per se. For example, some frontend clients110or120may access the services166directly over the network130without the use of application backends.

As shown, the services166include a data storage (DS) service168. The data storage service168manages the creation and destruction of data storage containers170. The data storage service168also manages the storage and retrieval of data to and from the data storage containers170and performs other functions. Although this document refers to a data storage service168in the singular form, it should be understood such the data storage service168may include any number of services, functions, methods, procedures, and so forth, which operate to manage data storage and associated activities. The services166and data storage service168are so named because they perform services for cloud-based applications and not because they are categorized as “services” according to any particular operating system (e.g., these “services” are required to be Windows services in the Windows operating system). Rather, the backend system140may implement the services166and168in any suitable software construct or constructs.

In the example shown, each of the application sandboxes160(1) and160(2) has a respective set of service interfaces,162(1) and162(2). Although the services166may be common across the entire backend system140, the service interfaces162(1) and162(2) are each particular to a respective sandbox, such that developers can access services within the context of each of the application sandboxes160(1) and160(2) as if those services were specific to the respective application.

The developer machines110and the client machines120may each be implemented with any type of device (or devices) having control circuitry (e.g., processing circuitry and memory), which is provisioned for executing application frontends and communicating over the network130. The different machines110and120may be implemented with any type or types of devices, and the types of devices need not be the same. Such devices may be stationary devices (e.g., servers, desktop computers, set top boxes, gaming systems, etc.) or mobile devices (laptops, tablet computers, smart phones, personal readers, etc.). The environment100may include any number of developer machines110and/or client machines112, and the environment100need not include both types of machines. The network130may be realized with any type of network or networks, such as the Internet, a WAN (wide area network), a LAN (local area network), or any other network or combination of networks. The network130may be implemented with various technologies, such as with wired and/or wireless technologies, telephone systems, cell phone systems, microwave systems, infra-red systems, and the like.

The backend system140may be provided as a server-grade computing system that includes any number of individual computers, networking components, and data storage arrays, which operate together as a single system. However, the server140is not limited to large-scale deployments and may be implemented on any scale with any number of computing devices, including with a single computing device. The set of processors144and the memory150of the backend system140, within its constituent device or devices, together realize control circuitry, which is constructed and arranged to carry out various methods and functions as described herein. Also, the memory150includes a variety of software constructs realized in the form of executable instructions. When the executable instructions are run by the set of processors144, the set of processors144are caused to carry out the operations of the software constructs. Although certain software constructs are specifically shown and described, it is understood that the memory150typically includes many other software constructs, which are not shown, such as an operating system and various applications, processes, and daemons. The backend system140is amenable to implementation on physical machines as well as on virtual machines.

An example will now be presented for creating a new data storage container170ain the backend system140at the request of the first cloud-based application. Although this example relates to a particular data storage container created at the request of the first cloud-based application, it should be appreciated that this example can be applied more generally to describe the creation of any data storage container170by any cloud-based application.

In this example, the data storage service168in the backend system140receives a request116afrom the first cloud-based application to create a new data storage container170a. The request116amay arrive from the frontend client App1D on the first developer machine110(1), as shown, or from any other instance of App1D, or from any instance of App1P. Alternatively, the request116amay arrive from the backend App1BE or from any of the services166, i.e., from a location internal to the backend system140.

In response to the data storage service168receiving the request116a, the data storage service168creates the new data storage container170a. For example, the data storage service168generates metadata for the data storage container170aand stores such metadata in a database in the backend system, the purpose of the database being to track information about data storage containers.

The data storage container170aprovides a logical container for storing data and has no assignment by the data storage service168to any end user of the first cloud-based application. Although the first cloud-based application may certainly have end users (e.g., users of various client machines120), the data storage service168creates the data storage container170awithout any assignment to any end user. For example, the data storage service168does not assign the data storage container170ato any end user account, nor does it store any end user ID in the metadata created for supporting the data storage container170a. Even if the request116aarrives from one of the clients120, which is operated by an end user, the data storage service168still does not assign any user ID to the data storage container170a. Rather, the data storage container170ais user-agnostic. As far as the data storage service168is concerned, no end user owns the data storage container170a. The data storage container170ais thus completely independent of any end user, both in its definition and in its access by the data storage service168. As will be described more fully below, the user-agnostic nature of the data storage container170a(and, similarly, of all data storage containers170) confers many advantages both to application developers and to users.

Rather than providing access to the data storage container170ain connection with any end user, the data storage service168instead generates a unique identifier (ID) (e.g.,116b) for the data storage container170a. The data storage service168then proceeds to provide access to the data storage container170avia the unique ID116b. Generating the unique ID116bmay be conducted before, after, or simultaneously with the act of creating the data storage container170a. The unique ID116buniquely identifies the data storage container170afrom among other data storage containers in the backend system140. In an example, the unique ID116bof the data storage container170ais unique across all of the cloud-based data services provided by the backend system140, as well as across any similar backend systems that may coordinate with the backend system140to provide cloud-based data services to applications. The unique ID116bmay be generated in any suitable way. For example, the unique ID116bmay be generated as an automatically-incrementing integer, by a hash function, or by any other suitable method.

Once the data storage service168has created the unique ID116b, the data storage service168provides the unique ID116bto the first cloud-based application. For example, the data storage service168returns the unique ID116bto the developer machine110(1), or, for example, to whichever other machine or software construct originated the request116a(or to any other designated entity). After the first cloud-based application has received the unique ID116b, the first cloud-based application may use the unique ID116bfor accessing the data storage container170a, such as for writing data to the data storage container170aand/or for reading data from the data storage container170a.

In an example, the backend system140(or a software construct operating therein), receives a storage request118from the first cloud-based application. The request118specifies a set of data to be stored and the unique ID116bof the data storage container170a. For example, the frontend client App1D on machine110(1) sends the storage request118to the backend system140. Upon receiving the storage request118, the backend system140, e.g., acting through the data storage service168, stores the set of data from the request118in the data storage container170a. The first cloud-based application may similarly send a read request to the data storage service168, by specifying the unique ID116bof the data storage container170a, to read data from the data storage container170a. In response, the first cloud-based application may receive back the contents of the data storage container170a.

Providing access to data storage containers170and their contents based on unique IDs enables cloud-based applications flexibly to assign data storage containers170and their contents to particular end users, to groups of end users, or to no end users at all. Because access to data storage containers is based on access to their respective unique IDs, developers can write their cloud-based applications to provide selected users, or no users, with access to data storage containers at their own option. But granting access to users is done at the application level and not in the data storage services168or in the data storage containers themselves, which remain user-agnostic.

Data storage containers need not ever be assigned to any user at all. For example, a cloud-based application may request a new data storage container and proceed to store application settings for the cloud-based application in the newly created data storage container. The application settings may pertain to the application but not to any particular end user of the application. The data storage container storing the application settings may thus never have an assignment to any end user.

In some examples, in addition to being user-agnostic, data storage containers170are also application-agnostic. For example, a data storage container need not include in its definition any application-based context. Likewise, the data storage service168need not assign the data storage container to any cloud-based application. Rather, the data storage service168may flexibly provide the unique ID of a data storage container, upon request, to any number of cloud-based applications, enabling multiple cloud-based applications to share data amongst one another.

It is thus evident from the foregoing that software developers may use the data storage service168to provide cloud-based data storage in the applications they design, without requiring such developers to build their own backend storage solutions or requiring users to log on to a separate storage service. Because the data storage service168is user-agnostic, it can provide storage containers for use with any applications or users that have the respective unique IDs. The burden and inconvenience to users and developers associated with conventional cloud-based storage solutions are therefore overcome.

FIG. 2shows an example application sandbox160in additional detail. The application sandbox160may be representative of the application sandboxes160(1) and160(2) ofFIG. 1. For example, the sandbox160includes an application backend212, which may correspond, for example, to backends App1BE and App2BE of sandboxes160(1) and160(2), respectively. The sandbox160further includes service interfaces162, which correspond, for example, to the service interfaces162(1) and162(2) as seen inFIG. 1. The application sandbox160further includes a REST (Representational State Transfer) interface210, for communicating with application frontends (e.g., App1D, App1P, App2D, and App2P). In an example, the REST interface210exposes an API (application programming interface) for providing the frontends with access to the application backend212and to the backend services166(FIG. 1), i.e., through the service interfaces162.

In an example, the application sandbox160(or each instance thereof running on the backend system140) provides backend support for a respective cloud-based application, from the standpoints of both developers and end users. The application sandbox160may support multiple instances of the cloud-based application simultaneously, e.g., as a consequence of multiple frontends running on machines110and120.

The service interfaces162provide interfaces (e.g., APIs) into the services166(FIG. 1) in such a way that the services166as accessed through the service interfaces162are scoped to the application sandbox160and thus to the particular cloud-based application supported by the application sandbox160. The service interfaces162are seen to include, for example, a data storage service interface222, a web documents service interface224, an analytics service interface226, and a user management service interface228. The service interfaces222,224,226, and228provide access to respective sets of services166(FIG. 1). For example, the data storage service interface222provides access to the data storage service168. Likewise, the web documents service interface224provides access to a web documents service (within the services166), the analytics service interface226provides access to an analytics service, and the user management service interface228provides access to a user management service.

In an example, the particular cloud-based application served by the application sandbox160may operate any of the service interfaces222,224,226, and228at the application's own option, in accordance with the application's own programming. For example, some cloud-based applications may include their own user management, analytics, and/or web documents, and thus may opt out of using the corresponding services166on the backend system140in favor of using their own.

It should be understood that nothing in the backend system140in any way prevents the existence or management of end users of cloud-based applications that the backend system140supports. Indeed, a user management service may expressly be provided. However, any such user management service is decoupled from data storage service168accessed through the data storage interface222. Thus, for example, applications may avail themselves of the user management service (through interface228) to authenticate end users and authorize them to access various resources. But such user management is provided by the cloud-based application itself, e.g., acting alone or in connection with the user management service. In any case, any such user management service is separate and distinct from the data storage containers170managed by the data storage service168.

In some examples, the application sandbox160is configured to generate credentials for particular services upon request. For example, the application sandbox160generates each credential based on a key and a secret. Once a credential is generated for a particular service, for example, the credential is thereafter required for accessing that service. Each credential may be selectively scoped to any of the services166, including to the data storage service168. Thus, for example, a cloud-based application may request a credential for accessing a particular data storage container170. The generated credential is agnostic to any end user or application, but the cloud-based application receiving the credential may provide it to any user, group of users, and/or application. Any entity in possession of the credential may then access the data storage container170by supplying an access request, which includes both the data storage container's unique ID and the credential.

Considering the data storage interface222in additional detail, it is seen that the interface222includes sub-interfaces230,240, and250. In an example, data storage containers170(FIG. 1) are provided in three distinct types: file, relational, and key-value. Each of the data storage containers170is configured for storing one of these three types of data. Other types of data, and/or a greater or fewer number of types of data, may be provided; those shown are merely illustrative. Here, the sub-interfaces230,240, and250provide access to the data storage service168for file-type data, relational-type data, and key-value-type data.

Each of the sub-interfaces230,240, and250includes a respective “store” service interface (i.e.,232,242, and252) for accessing data storage service168to create and destroy data storage containers of the respective type, to read and write data storage containers of the respective type, and to maintain their metadata. Each of the sets of sub-interfaces230,240, and250also includes a respective “push” service interface (i.e.,234,244, and254). Each push service interface provides access to the data storage service168for pushing changes in contents of underlying data storage containers to one or more subscribing application instances. In addition, the file-type sub-interface230includes a file sync service interface236. The file sync service interface236provides access to the data storage service168for synchronizing changes in contents of underlying file-type data storage containers among subscribing application instances.

In an example, each data storage container170for file-type data may store any number of files and/or folders, organized in any suitable folder structure. The hierarchy may reflect, for example, a folder hierarchy as may be found on a typical Windows or OSX computer.

Each data storage container170for relational data may store data in database form. For example, a data storage container170storing relational data may store data in schemaless database format, such as in NoSQL format. Rather than having to implement relational databases in the backend system140, developers may instead operate an SDK (FIG. 1) to define classes and fields specific to their applications. Developers may further operate the SDK to establish relationships among classes and fields, such as one-to-one, one-to-many, many-to-one, and many-to-many. Cloud-based applications may then read and write relational data to the defined fields and classes, and may execute queries and generate reports, without having to deploy relational database solutions.

Each data storage container170for key-value data may simply store a key and a corresponding value. For example, a data storage container170may store data for a person's first name by specifying a key, e.g., “FirstName,” and a corresponding value, e.g., “Phil.”

It has thus been described that the application sandbox160performs various activities on behalf of a particular cloud-based application. These activities include providing a REST interface210to application frontends, housing an application backend212, and providing interfaces162to a variety of backend services166. The backend services166include the data storage service168for creating and managing data storage containers170for three types of data (file, relational, and key-value), for pushing changes in underlying content to subscribing application instances, and for providing services for synchronizing file-type data across subscribing application instances.

FIG. 3ashows the database310for storing metadata for file-type data storage containers. In an example, each row of the database310(rows are indicated with ellipsis) stores metadata pertaining to a respective file-type data storage container, which may contain a respective file or folder. In an example, the database310organizes metadata for file-type data storage containers in the following fields:“Unique ID.” The unique ID that the data storage services168have generated for the data storage container represented in the current row. In an example, each file has a unique ID and each folder has a unique ID. No two rows have the same unique ID.“Alias.” A developer-assigned alphanumeric name, which may be used in place of the Unique ID when accessing the data storage container. In an example, a request to create a data storage container (like the request116a) includes a parameter that specifies an alias as alphanumeric text. When creating a data storage container in response to the request, the data storage services168store the alias as metadata in the database310in connection with the data storage container, such that subsequent accesses to the data storage container may specify the alias in place of the unique ID, which may be long and/or difficult to remember.“File ID.” If the current row identifies a file, then the File ID is a hash of the file's contents. If the current row identifies a folder, then the File ID is a hash of the folder's contents. File IDs uniquely identify files and folders based on their contents, and thus may be useful in identifying and removing redundant copies of files and folders.“Path.” A path to the file or folder on the user's machine. In an example, the indicated Path is relative to some designated root location, which has been created on the user's machine to store application content.“Geo-Loc.” Geolocation information (if available) of the device that created the data storage container represented in the current row. Geo-Loc may include, for example, GPS coordinates of the user's machine at the time the container was created, as well as a timestamp.“Store-Loc.” The location of the file or folder described by the current row in physical or logical storage. The Store-Loc thus provides a way of accessing the underlying contents of the file or folder from one or more storage devices (e.g., disk drives).“Last Modified” timestamp. The last date and time that the data storage service168last modified the file or folder described by the current row.

Those skilled in the art will recognize that the database310may be structured in a variety of ways and may include a variety of fields, including fields that are different from those shown and described.

FIG. 3bshows a database320for relational-type data storage containers. The database320may include fields for “Unique ID,” “Alias,” and “Last Modified,” which are similar to the like-named fields described in connection with the database310. Here, however, fields may also be provided for “Class,” “Key,” “Value,” and “Relationship.” In an example, a “Class” may represent a table of a database structure being defined for a respective relational-type data storage container. A “Key” may represent a database field within the table, and a “Value” may represents the value to which the “Key” has been set. A “Relationship” may represent how a current field relates to other fields and classes. The table320may include additional or different fields, depending on the type of relational data to be stored. Unlike the database310, which stores locations of underlying content (files and/or folders), the database320may store the actual contents of relational data. Thus, in some examples, the database310includes both metadata and relational data. In other examples, however, the metadata and relational data may be separated in different databases or data structures.

FIG. 3cshows a database330for key-value-type data storage containers. The database330may include fields for “Unique ID,” “Alias,” and “Last Modified,” which are similar to the like-named fields described in connection with the database310. The database330may also include fields for “Key” and “Value,” which hold keys and respective values of key-value pairs stored in the key-value-type data storage containers. As with the database320, the database330may store both metadata and data. Alternatively, the metadata and data may be stored separately.

FIG. 4shows an example of one data storage container storing information about another. Here, a cloud-based application creates a file-type data storage container410at unique ID567and stores therein files and folders belonging to a user, “Steve.” The cloud-based application also creates a relational-type data storage container420at unique ID4285and stores therein two key-value pairs. A first key-value pair associates a “userID” key with a corresponding value, “sMcFerrin,” and a second key-value pair associates a “fileStoreID” key with a corresponding value, “567.” In an example, the data storage service168writes this key-value data to the data storage container420in response to a user storage request directed to the second data storage container420. In accordance with its programming, the cloud-based application may interpret these key-value pairs to mean that the unique ID for the file-type data storage container belonging to “sMcFerrin” is “567.” This example thus shows how a cloud-based application can use inherently user-agnostic data storage containers to store data that assists with user management.

FIG. 5shows an example arrangement for consolidating storage of file-type data stored in different file-type data storage containers, thus making more efficient use of backend storage. The illustrated arrangement shows portions of the database310(FIG. 3a). Certain fields and entries of the database310have been omitted fromFIG. 5for the sake of simplicity. The arrangement ofFIG. 5shows the storage of metadata for file-type data storage containers both in a first state510, before removing redundant storage, and in a second state512, after removing redundant storage.

As seen in the first state510, the database310includes metadata for seven file-type data storage containers having consecutive Unique IDs ranging from 1234 to 1240. Some of the illustrated data storage containers store files while others store folders. Each data storage container has a respective Alias, File ID, and Store-Loc, where the File ID provides a hash of the contents of the data storage container and the Store-Loc provides a location on physical media (e.g., disk) of those contents. In this first state510, each data storage container has a different value of Store-Loc, indicating that each data storage container consumes its own respective back-end storage.

In accordance with further improvements hereof, the data storage service168searches the database310to find duplicate file content and performs consolidation operations to liberate backend storage if any duplicate content is found. As the File ID provides a hash of a data storage container's contents, the data storage service168can compare hash values as an efficient proxy for comparing content. The data storage service168thus searches the database310for matching values of File ID. For any matches that are found, the data storage service168liberates the backend storage of each redundant copy and changes the Store-Loc field of each redundant copy to reflect the physical storage location of the single retained copy.

For example, as shown in the second state512, the data storage service168has changed the Store-Loc value for Unique ID1237(alias “File 3”) to match that of Unique ID1236(alias “File 2”). This change reflects the fact that the data storage service168has found a match between the contents of File 3 and those of File 2, as indicated by their matching File IDs. Likewise, the data storage service168has changed the Store-Loc value for Unique ID1239(alias “File 4”) to match that of Unique ID1235(alias “File 1”). This change reflects the data storage service168having found a match between the contents of File 4 and those of File 1. In this example, the data storage service168has freed the backend storage found at Loc D and Loc F, which is no longer needed to support storage of File 3 and File 4. The data storage service168may repurpose the freed storage to support storage of other data.

The scope of the above-described process of consolidating redundant storage may be varied and may be controlled by the developer. For example, a developer may expressly limit the scope of consolidation services to (1) a set of data storage containers, (2) a particular cloud-based application, or (3) a set of cloud-based applications, for example. Consolidation then operates within the designated scope but not outside it. For example, if the scope of consolidation is limited to a particular cloud-based application, then the data storage service168may search for and free redundant backend storage for file-based data storage containers created by that cloud-based application, but not in data storage containers created by other cloud-based applications.

FIG. 6shows an example arrangement in which a data storage container may be shared among different cloud-based applications served from respective application sandboxes. Here, a first cloud-based application served by application sandbox160(1) has access to a data storage container610at unique ID123. At the same time, a second cloud-based application served by application sandbox160(2) has access to the same data storage container610at unique ID123. The second cloud-based application may further have access to another data storage container620at unique ID466. Both the first cloud-based application and the second cloud-based application can thus read and write contents of the data storage container610via respective read and write requests. Although each data storage container is typically created by a respective cloud-based application served by a respective application sandbox, the creating application may engage in a protocol with another application to grant the other application access to the data storage container. Thus, in this example, the data storage container610is not only user-agnostic, but also application agnostic, as it may be accessed from multiple cloud-based applications served by respective application sandboxes.

FIG. 7shows an example technique for supporting push notifications in the example environment100described in Section I. Here, the data storage service168is seen to include multiple sub-services, including a store service708, a push service720, and a sync service710. Cloud-based applications can access the store service708, push service720, and sync service710via respective service interfaces (e.g.,232,234, and236) from sandboxes160(FIG. 2). In an example, the store service708includes many of the above-described features from Section I for managing the creation and destruction of data storage containers170and for managing the storage and retrieval of data of the data storage containers170. In accordance with additional improvements, the store service708further includes notification generators730(e.g.,730(a) and730(b)) for detecting changes in respective data storage containers170(e.g.,170(a) and170(b)) and for notifying the push service720of such changes. The push service720acts to push changes in data storage containers170to subscribing application instances. To this end, the push service720includes multiple channels722, where a different channel (e.g.,722(a) or722(b)) is provided for each data storage container170for which the push service is desired. Each channel722includes a notification receiver724(e.g.,724(a) or724(b)) and a connection manager726(e.g.,726(a) or726(b)). The sync service710builds upon the push service720and synchronizes changes in data storage containers170across subscribing application instances.

In operation, the store service708generates change notification752via notification generators730in response to changes in contents of respective data storage containers170. Each of the notification generators730is configured to generate a respective change notification752in response to a change in any of the contents of a respective data storage container170. Notification generators730are further configured to transmit the generated change notifications752to push service720for distribution to recipients. In an example, notification generators730are implemented with instructions within the store service708and may be accessible via an API.

The notification generators730need not have any information about intended recipients of push notifications. Rather, notification generators730merely respond to changes in contents of the respective data storage containers (e.g.,170(a) or170(b)) by generating change notifications752and sending the change notifications to the push services720. Each change notification752is specific to a respective data storage container that has changed but is agnostic to recipient devices, users, and even (in some cases) applications.

In an example, each change notification752is arranged to provide a compact message indicating the fact that the contents of a respective data storage container have changed without providing the actual changed content. Messages are therefore typically small and thus avoid burdening the backend system140.

The push service720is configured to send change notifications752to subscribing application instances. It should be understood that “subscribing application instances” are application instances that subscribe to change notifications for a particular data storage container170. Each subscription typically involves a respective connection750between push service720and each of the subscribing application instances (generally, a front-end component thereof). In some arrangements, the push service720subscribes an application instance to a data storage container automatically, e.g., in response to the application instance creating the data storage container170and/or in response to the application instance accessing the data storage container for a first time. However, subscriptions may be established in any suitable way.

The push service720is arranged to process change notifications using channels722, where each channel is dedicated to a respective data storage container170. Each channel722is a logical construct for organizing connections between push service720and any subscribing application instances. For example, channel722(a) is configured to broadcast change notifications over connections750as a result of changes in data storage container170(a). Likewise, channel722(b) is configured to broadcast change notifications over another set of dedicated connections (not shown) as a result of changes in data storage container170(b).

Taking channel722(a) as an example, notification receiver724(a) is configured to receive all change notifications752(a) for data storage container170(a). Notification receiver724(a) is also configured to provide change notifications for data storage container170(a) to connection manager726(a) for distribution to subscribing application instances. It should be understood that, analogously, notification receiver724(b) is configured to receive all change notifications752(b) for data storage container170(b) and to provide change notifications752(b) to connection manager726(b) for distribution to application instances subscribing to data storage container170(b).

Connection manager726(a) is configured to distribute change notification752(a) for data storage container170(a) to subscribing application instances. Along these lines, connection manager726(a) manages dedicated connections750from channel722(a) to each respective subscribing application instance. Each subscribing application instance is configured to receive change notifications via its dedicated connection750.

Dedicated connections750are configured to distribute change notifications752to subscribing application instances. In an example, connections750are configured to send data to subscribing application instances via a protocol, such as HTTP or web sockets, that supports application layer communication. In some arrangements, connections750are persistent, one-way connections from connection managers726to subscribing application instances under such a protocol.

In response to receiving change notifications, application instances may respond by issuing requests762for the actual content of changes. In cases where the dedicated connections750are implemented as persistent, one-way connections, channel722(a) is configured to receive requests762from the subscribing application instances over secondary connections760, which are distinct from connections750. For example, channel722(a) may receive a request762from each subscribing application instance over a respective one of the connections760.

In response to receipt of each request762, channel722(a) is configured to send changed content to the requesting application instance. It should be understood that either a dedicated connection750or a secondary connection760may be configured to provide actual changed content back to the requesting application instance.

In an example, store service708effects a change in contents of data storage container170(a). When the change in the contents of data storage container170(a) has been effected, or contemporaneously therewith, notification generator730(a) generates change notification752(a) indicating that a change in the contents of data storage container170(a) has taken place.

Upon the generation of change notification752(a), notification receiver724(a) receives change notification752(a) from notification generator730(a). In an example, channel722(a) is expressly dedicated to data storage container170(a), and notification receiver724(a) may constantly remain available to receive change notifications from the notification generator730(a), i.e., in order to obtain any change notifications that concern data storage container170(a) in real time. Connection manager726(a) then distributes change notification752(a) (or some notification derived thereof) over dedicated connections750to subscribing application instances. Examples of application instances include application frontends, such as may run on user devices. Other examples of application instances include application backends, which may run on the backend system140.

At this point, it should be understood that there is virtually no latency between a change in contents of data storage container170(a) and subscribing application instances being notified of the change. The ability to provide change notification752(a) in real time to subscribing application instances is at least partially due to the significantly reduced burden on the backend system140, which merely sends notifications of the fact that contents have changed, rather than sending the changes themselves, coupled with the ability to send the change notification752(a) to each subscribing application instance over a respective dedicated connection750.

Upon receiving the change notification752(a), each of the subscribing application instances comes into possession of information that a change in contents of data storage container170(a) has occurred. The subscribing application instances may then each respond to notification752(a) at times determined by local considerations, e.g., based on what other activities the devices may be performing.

At some point, a subscribing application instance may respond to the change notification752(a) to acquire the changed contents of data storage container170(a). For example, the application instance sends a request762for the changed contents over secondary connection760between that application instance and push service720. A typical arrangement involves secondary connection760being a non-persistent connection, as it is not critical that the transmission of the actual changed contents happens in real time. As an example, request762includes information identifying the application instance from which it originated, as well as a timestamp.

Upon receipt of request762, the push service720forwards request762to store service708. In response, the store service708retrieves changed contents764of data storage container170(a) and forwards the changed contents764to channel722(a). In some arrangements, connection manager726(a) sends changed contents764to the requesting application instance over one of the secondary connections760, as illustrated. In other arrangements, however, the connection manager726(a) sends changed contents over its respective connection750.

It should be noted that nowhere does the concept of a user enter into operations for the push notification described above. Rather, the push service720is preferably user-agnostic. Of course, human or other users may operate the individual devices on which application instances run. Such users may be managed by user management services228(FIG. 2) or by other user management, but they play no role in the above-described push notifications.

As discussed above, change notifications752are small enough to avoid burdening backend server140. In some arrangements, the message contained in each change notification consists of at most sixteen characters, although in other arrangements the message may consist of more (e.g., 32, 64, 128, etc.) or fewer (e.g., 8, 4, 2, 1) characters. The message may even consist of 0 characters, i.e., the message payload may be null. Application instances may be programmed to call the backend system140for updates whenever they receive transmissions having null payloads.

In some arrangements, the character text provided in the change notifications752may indicate further detail about the change to the contents of data storage container170(a). For example, if notification generator730(a) has information that a change to contents of a file is a deletion, then the message may contain a “D”. In this scenario, the application instance need not send any request762, as there are no changed contents to request. Rather, the application instance may simply delete its own local copy of the file.

It should be understood that the change in the contents of a data storage container may originate from a subscribed application instance or a source external to any subscribed application instances. In the former case, for example, an application instance may direct the store service708to update a data storage container, and the push service720may act to push the change to all (or all other) subscribing application instances. In the latter case, for example, an application separate from the subscribing application instances may direct the store service708to update a data storage container, and the push service720may act to push the changes to all subscribing instances.

In some arrangements, each data storage container170may be subscribed to by application instances of multiple cloud-based applications. For example, a bicycling application and a general fitness application may both access the same data storage container for data common to both applications. In such cases, push notifications reflecting changes in the shared data storage container would be sent to application instances of both applications. Thus, the push service720operates in response to changes in data storage containers by notifying application instances, whether those application instances are instances of the same application or of different applications. Push notifications are therefore inherently application-agnostic as well as user-agnostic.

FIG. 8shows a case in which push service720provides change notifications for both data storage containers170(a) and170(a) over channels722(a) and722(b) (seeFIG. 7), respectively. The scenario shown inFIG. 8illustrates the special case in which frontends of application instances run on different client devices. InFIG. 8, three client devices,820(1),820(2), and820(3), each run a respective frontend instance of the first cloud-based application, i.e., App1P. Further, client device820(3) (i.e., a single device) runs a frontend instance of the second cloud-based application, i.e., App2P. Each of client devices820(1),820(2), and820(3) connect to backend server140via network130.

When there is a change in the contents of data storage container170(a), notification generator730(a) generates change notification752(a). Change notification752(a) contains a message810(a) that has a small amount of data, such as a single character (“N” for “new”) that indicates that a change in the contents of data storage container170(a) has taken place. It should be understood, though, that the message may contain any number of characters or no characters, as indicated above.

As described above in connection withFIG. 7, connection manager726(a) of channel722(a) distributes change notification752(a) over dedicated connections750. Here, the change notification752(a) is resolved into respective connections750(1),750(2), and750(3) and sent to the respective client devices820(1),820(2), and820(3).

With regard to data storage container170(b), channel722(b) obtains generated change notification752(b) in response to a change in data storage container170(b). Connection manager726(b) within channel722(b) resolves change notification752(b) at channel726(b) into a single dedicated connection750(11) to application instance App2P running on client device820(3). Consequently, connection manager726(b) directs notification752(b) containing the single character, for example, of message810(b) to the client device820(3).

As described above, each of the data storage containers170may be configured for storing file data, relational data, or key-value data. Procedures for pushing requested changes to respective application instances may vary depending on the type of the data storage containers involved. For example, key-value and relational data may be sent over dedicated connections750, while file data may be sent over secondary connections760, as described.

The dedicated connections750may be provided in the form of persistent, one-way connections that use an HTTP or web sockets protocol, for example. In one example, the connection managers726send push notifications752in the form of a server-sent event over connections750. As is known, a “server-sent event” is a real-time event raised by a server and transmitted to a client over a persistent, one-way connection. Server-sent events are sent over HTTP using HTML5 or greater. If a connection drops, the server fires an error event and automatically tries to reconnect.

An advantage of server-sent events stems from the fact that they are sent over HTTP protocol. The use of HTTP means that server-sent events are not blocked by firewalls unless the firewalls are configured to block all HTTP traffic. Also, developers can generally establish server-sent events in HTTP using simple language commands.

An alternative to server-sent events is for a developer to use web socket technology to establish persistent, one-way connections750. We have observed, however, that some firewalls may be configured to block web socket traffic, such that server-sent events are generally more reliable.

Yet another alternative for establishing the one-way connections750is to use long polling technology. With long polling, each subscribing application instance opens an HTTP request with the backend system140and waits to receive a response from the backend system140over the open request. The backend system140may keep the request open for as long as possible. If the request times out, the respective application instance may issue a new request. When a channel722in the backend system140attempts to send a change notification752to the respective application instance, the channel722uses the open request from the application instance as the connection750over which to send the change notification752.

In some examples, the push service720establishes a connection750by first attempting to use server-sent events. If the attempt succeeds, the push service720uses server-sent events for the connection750. Otherwise, the push service720tries instead to use web socket technology. If the attempt to use web sockets fails, the push service720attempts to use long polling. Thus, the first choice of the push service720is to use server-sent events, the second choice is to use web sockets, and the third choice is to use long polling. It should be understood that the choice of technology for implementing the connections750may be made on a per-connection basis, such that application instances that currently support server-sent events may use them, whereas application instances that do not currently support server-sent events may use either web sockets (as a first fallback option) or long polling (as a last resort).

FIG. 9shows example operations for generating change notifications752for file-type data storage containers. Here, data storage containers170(a) and170(b) contain files910(a) and910(b), respectively. Also shown inFIG. 9are data storage services168, which are here seen to include the notification generators730(see alsoFIG. 7) and the database310(FIG. 3) for storing metadata for file-type data storage objects. Segregation of structures and operations among the sub-services708,710, and720(FIG. 7) are omitted fromFIG. 9for the sake of simplicity; rather, all structures and operations are merely shown as being part of the larger data storage service168.

As described in connection withFIG. 3, database310is configured to store metadata describing file-type data storage containers. Here, the database310has an entry310(a) that stores metadata for data storage container170(a) and an entry310(b) that stores metadata for data storage container170(b). In this example, entry310(a) specifies that data storage container170(a) has a unique ID of 740, an alias of “Bike”, and a last-modified timestamp T(a), such as Feb. 25, 2014, at 2:45 PM, for example. Similarly, entry310(b) specifies that data storage container170(b) has a unique ID of 741, an alias of “Bank”, and a last-modified timestamp T(b), such as Feb. 25, 2014, at 3:33 PM.

Notification generators730are configured to update the “last modified” field of entries310(a) and310(b) in the database310each time a change is made in the contents of a respective data storage container170. Consider a case in which an application instance subscribes to data storage container170(a) including file910(a). If a device on which this application instance runs has been turned off, the device may never receive change notifications752concerning changes in the file910(b) while the device was off. When the device turns back on, the application instance running on the device sends a request762(FIG. 7) for updates to the data container170(a). This request762may be sent automatically when the device turns back on, even though the device did not receive any change notification752. The request762includes a timestamp indicating the last time the application instance running on the device received an update for the data storage container170(a). Upon the backend system140receiving the request762, the data storage service168compares the timestamp received in the request762with the last-modified timestamp in the database entry310(a). Push service720then sends the application instance on the device contents of the data storage container170(a) that have changed since the time indicated in the timestamp from the request762. In this way, backend server140always sends all accumulated updates to the application instance, regardless of how many changes have occurred while the device was turned off.

This process of obtaining updates after the device turns back on may be repeated for each data storage container to which the application instance on the device subscribes. In some variants, the application instance running on the device may send a single request762, which includes a timestamp indicating the last time any update to a subscribed-to data storage container was received. Upon receiving the request762, the data storage service168iterates over all subscribed-to data storage containers and provides updates for each of them. If a subscribed-to data storage container contains a folder rather than a file, the data storage service168may iterate over all files within the folder and send updates only for the files that have changed.

Section III: Sync as a Service for Cloud-Based Applications

FIG. 10shows example aspects of the environment100ofFIG. 1(Section I), arranged for providing sync services. As illustrated inFIG. 10, example sync service710is arranged to provide sync capabilities between and among multiple application instances, e.g., frontend instances of one or more cloud-based applications, via the backend system140. As indicated in connection withFIG. 7, the sync service710operates as a sub-service of the data storage service168. In addition, sync service710may be selectively employed for respective sets of data. In some arrangements, sync service710is enabled for data storage containers170on a per-data-storage-container basis; i.e., for each data storage container170, sync service710is either enabled or disabled. Sync service710includes a sync settings module1042and a badging service1100.

Sync settings module1042is arranged to record which data storage containers employ the sync service710for syncing and which do not. In some arrangements, the sync settings module1042may take the form of a table stored in memory150. In some examples, the sync settings module1042is implemented using one or more of the databases310,320, or330(FIGS. 3a-3c). For example, database310, for storing metadata for file-type data storage containers, may include one or more additional fields (not shown) for storing sync settings. The additional fields specify whether syncing should be performed for each data storage container represented. Syncing may be enabled at the individual file level or at the folder level for file-type data storage containers. Syncing may be enabled at the individual data element level for relational-type and key-value-type data storage containers. In some examples, badging is provided only for file-type data storage containers. It should be understood, however, that badging may be provided for any type of data storage container.

In some examples, sync settings are established in the sync settings module1042via a set of API calls into the REST interface210(FIG. 2). The set of API calls may be constructed using an SDK running on a frontend client (FIG. 1), although this is not required. The set of API calls may include a single API call, multiple API calls, or even one or more arguments specified in one or more API calls. In one example, the sync settings are provided in the form of one or more arguments of an API call that specifies the creation of a new data storage container. For instance, when creating a new data storage container, a create command includes an argument that specifies whether syncing should be performed on that data storage container and, in some cases, whether badging should be performed. In another example, the sync settings are provided in API calls separate from those used to create data storage containers. Such separate API calls may each specify an identifier of a particular data storage container170(e.g., it's unique ID116b—FIG. 1, its alias, etc.) for which the sync service710is to be configured.

During example operation, a developer on developer machine, e.g.,110(1), generates sync settings1012(1) for establishing sync services710for a data storage container, e.g.,170(b). The developer machine110(1) sends sync settings1012(1) to the backend system140. In one example, the sync settings1012(1) may specify that data stored in data storage container170(b) should be synced, i.e., across all application instances having access to data storage container170(b). Going forward, any application instance with access to170(b) automatically receives updates to data made by any other application instance or any other source. In another example, the sync settings1012(1) may specify that data stored in data storage container170(b) should not be synced, in which case, going forward, application instances with access to170(b) are not automatically updated with changes made by other application instances.

Once developer machine110(1) sends sync settings1012(1) to backend system140, backend system140directs the sync settings1012(1) to the sync service710.

In response to receiving sync settings1012(1), the sync service710identifies the data storage container to which the sync settings1012(1) pertain. Sync services710then updates the sync settings module1042, in this case to associate sync services710with the data storage container170(b).

As discussed above, sync settings module1042may store sync settings in a table in memory150. In some arrangements, this table includes two fields: the identifier for a data storage container and a Boolean indicating whether syncing has been enabled for that container. In an example, the value of that Boolean is TRUE by default for all data storage containers170. But the value of the Boolean may be changed to FALSE (and, more generally, changed between TRUE and FALSE) in response to new sync settings. The table may include a third field that stores a Boolean indicating whether badging should be performed.

It should be understood that the sync service710may thus be selectively enabled and/or disabled for any data storage container over time and that its status as enabled or disabled may be changed. Also, different data storage containers may each have their own respective sync settings, with the sync service710being enabled for some while disabled for others, for example.

Continuing the operation, sometime later a machine, e.g., client machine120(1), generates a data change1026(1), e.g., as a result of local operations of App1P. Client machine120(1) applies data change1026(1) to data copy1022(1), which, prior to applying the change, stored a local copy of data stored in data storage container170(b). If syncing has been enabled for the data storage container170(b), then client machine120(1) sends the data change1026(1) to the backend system140. The data change1026(1) may be the entire data copy1022(1) or only an identified portion of the data copy1022(1) that has changed.

The backend system140receives data change1026(1) and hands data change1012(1) off to the store service708. The store service708, in response, changes data stored in data storage container170(b) according to data change1026(1). It should be understood that, after the change has been made, the data stored in data storage container170(b) matches the data copy1022(1) stored within client machine120(1).

If the sync settings1042indicate that syncing is enabled for data storage container170(b), then a copy of data change1026(2) is sent to each subscribing application instance, e.g., to client machine120(2), which also has access to data storage container170(b). For example, backend system140uses the protocol described in Section II for real-time push to update subscribing application instances. Here, client machines120(1) and120(2) may both run frontend instances (e.g., App1P) of the same cloud-based application. Data changes may similarly be synced to any other application instances that have access to data storage container170(b).

It should be understood that the sync service710binds to particular data storage containers, but not to particular users or even necessarily to particular cloud-based applications. Rather, just as data storage containers170as described in Section I are user-agnostic, so too is sync service710user-agnostic. In addition, just as data storage containers170are described as application-agnostic in certain arrangements, so too is sync service710application-agnostic in certain arrangements. Thus, different application instances to which changes in a data storage container are sync'd need not relate to the same user, group of users, or cloud-based application.

That said, nothing herein should be interpreted as preventing a particular data storage container170and its associated sync service710from operating on behalf of a particular user and/or with a particular cloud-based application. Indeed, it may be typical for a data storage container170to be associated with a single user and a single application. In such cases, however, it is up to the application developer to form such associations, using the services provided in the backend system140, as such associations are not required by the data storage service168(including the sync service710) itself.

FIG. 11shows further details of environment100and illustrates an example in which the sync service710syncs a local data change1026(1) made to data storage container170(b) on client machine120(1) with client machine120(2) using real-time push, as described in connection with Section II above.

During an example operation, once data change1026(1) has been received from client machine120(1), the store service708coordinates with the sync service710to check whether the sync service710is enabled for data storage container170(b). For example, the store service708checks the sync settings for the data storage container170(b) in the database310(FIG. 3). If the sync settings indicate that the sync service710is enabled for data storage container170(b), the store service708generates a change notification1130and sends the change notification1130to push service720. Push service720then broadcasts the change notification to all subscribing application instances, e.g., in the manner described above in connection withFIGS. 7 and 8. For example, push service720sends the change notification1130to client machine120(2). Client machine120(2), upon receiving change notification1130, sends a request1140to obtain a copy of updated data. In response to receiving the request1140, push service720transmits a copy of data change1026(1) to client machine120(2). App1P running on client machine120(2) causes client machine120(2) to update a local data copy1022(2) stored on client machine120(2) so that the data copy1022(2) matches the data copy1022(1) on client machine120(1). In an example, the request1140and the data change1026(1) are similar to the request762and change764, respectively, as described in connection withFIG. 7.

In some arrangements, the sync service710includes the badging service1100for enabling client machines120to receive and optionally to display sync status. For example, badging service1100may assign a syncing status to data copy1022(2) and may communicate that syncing status to client machine120(2). In some arrangements, the syncing status may be one of “SYNC_COMPLETE”, “SYNC_IN_PROGRESS”, AND “SYNC_FAILED”.

It should be understood that, like sync service710, badging service1100is also provided as an option to frontend clients. Specifically, some frontend clients that employ sync service710may employ badging service1100while others may not. Of course, clients that do not employ sync service710do not employ badging service1100, as badging service1100is part of sync service710.

In some arrangements, badging service1100is enabled at the same time sync service710is enabled. In this case, syncing instructions1012(1) (FIG. 10) would also contain an identifier, such as “BADGING_ENABLED,” from which sync service710would enable badging service1100.

In some arrangements, a sync settings module1042enables the badging service1100using a badge settings module1046, akin to the sync settings module1042. In other arrangements, a table in sync settings module1042has an extra field in which badging settings for a data storage container may be turned on or off. For example, the database310may include an extra field that stores a Boolean for enabling or disabling badging for each data storage container170.

When the badging service1100is enabled, the badging service1100generates a command1120to include badging for data copy1022(2). For example, upon receipt of command1120, client machine120(2) runs a local badging service. The local badging service provides a badge1122to data1022(2) upon receipt of the change notification1130.

In some further arrangements, sync service710is arranged to provide a conflict avoidance operation when conflicting data changes are provided simultaneously, or nearly simultaneously, to backend system140from distinct machines, e.g., from machines120(1) and120(2). For example, if sync services710receive a data change from client machine120(1) just prior to receiving a conflicting change from client machine120(2), sync services710may process the data change and send a message to client machine120(2) indicating that the conflicting data change has been rejected and must be resubmitted. In other arrangements, the conflicting data change would be placed in a queue while the data change was being processed.

FIG. 12shows an example process1200of syncing data in a backend system that provides services for supporting cloud-based software applications. The process1200may be carried out in connection with the computing environment100. Process1200is typically performed by the software constructs described in connection withFIGS. 1, 2, 7, 10, and 11, which reside in the memory150of backend system140and are run by the set of processors144. The various acts of process1200may be ordered in any suitable way. Accordingly, embodiments may be constructed in which acts are performed in orders different from those illustrated, which may include performing some acts simultaneously, even though the acts are shown as sequential in the illustrated embodiments.

At1210, a set of data used by a cloud-based application is stored by a data storage service in the backend system, the data storage service storing the set of data in response to storage instructions received from the cloud-based application. The cloud-based application has a set of application instances running on respective computing machines operatively connected to the backend system over a network. For example, a request is received from a frontend client running on one of the machines110or120, an application backend212, or a service running within the backend system140itself. The request directs the store service708to create a data storage container (e.g.,170a,170b,170c, etc.) and to store a set of data in the data storage container. The data storage container is a logical container (e.g., defined by metadata) for storing data and has no assignment by the store service708to any end user of the cloud-based application.

At1212, a set of sync settings is stored by the backend system, the set of sync settings indicating whether the backend system employs sync services for syncing the set of data stored in the backend system by the data storage service. For example, upon the creation of a data storage container170(b), store service708sends an identifier for container170(b) to developer machine110(1). Developer machine110(1) then issues sync instructions1012(1) containing the identifier. The sync instructions1012(1) (FIG. 10) are for enabling or disabling the sync service710for data storage container170(b). It should be understood, however, that typically the default settings involve the sync service720being enabled by the backend system.

At step1214, in response to (i) changes in the set of data and (ii) having stored the set of sync settings indicating that the backend system employs the sync service for syncing the set of data, the set of data are synced among the backend system and the set of application instances. For example, when sync service710receives data change1026(1) (FIG. 10), sync service710performs a lookup in sync settings module1042on the data storage container identified by data change1026(1), i.e., data storage container170(b). If the table in sync settings module1042indicates that data storage container170(b) indeed employs the sync service710, then the sync service710sends a copy of data change1026(2) to client machine120(2), which subscribes to data storage container170(b).

An improved technique provides sync capability as an independent backend service, which developers can include, at their option, in their cloud-based applications. A sync service710runs in a backend system140in connection with a set of data stored on the backend system by a store service708. The sync service710syncs changes in the set of data among application instances that have access to the set of data. The sync service710may be specified selectively for different sets of data, e.g., by specifying syncing for one set of data but not for another set of data.

Having described certain embodiments, numerous alternative embodiments or variations can be made. For example, although the above examples describe scenarios involving two subscribing application instances, other scenarios may involve greater than two subscribing application instances, in which case, all such instances would receive change notifications1130and send requests to the backend system140for updates.

Further, although it has been described that the sync service710is either enabled or disabled on a per-data-storage-container basis, the sync service710may be enabled or disabled based on other information, as well. For example, certain cloud-based applications or certain users may opt out of syncing across the board, regardless of the data storage container involved. In such situations, the sync setting module1042may override any sync instructions that it receives for data storage containers, to accommodate user or application preferences.

Further, badging operations have been described in connection with data storage containers. As pointed out in connection withFIG. 3A, however, some data storage containers represent entire folders, which may themselves include files and/or sub-folders. If badging is enabled for a folder, then the badging service1100(FIG. 11) may coordinate with client badging services to provide information about the syncing status of the folder as a whole, i.e., including all of its contents. Thus, the badging service1100works not only for individual files but also for folders. The badging service1100may further be extended to other types of data storage containers, such as key-value and relational data storage containers.

Further still, the improvement or portions thereof may be embodied as a non-transient computer-readable storage medium, such as a magnetic disk, magnetic tape, compact disk, DVD, optical disk, flash memory, Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA), and the like (shown by way of example as medium1250inFIG. 12). Multiple computer-readable media may be used. The medium (or media) may be encoded with instructions which, when executed on one or more computers or other processors, perform methods that implement the various processes described herein. Such medium (or media) may be considered an article of manufacture or a machine, and may be transportable from one machine to another.

Further, although features are shown and described with reference to particular embodiments hereof, such features may be included and hereby are included in any of the disclosed embodiments and their variants. Thus, it is understood that features disclosed in connection with any embodiment are included as variants of any other embodiment.

As used throughout this document, the words “comprising,” “including,” and “having” are intended to set forth certain items, steps, elements, or aspects of something in an open-ended fashion. Also, as used herein and unless a specific statement is made to the contrary, the word “set” means one or more of something. Although certain embodiments are disclosed herein, it is understood that these are provided by way of example only and the invention is not limited to these particular embodiments.