Storage constrained synchronization of shared content items
A content management system synchronizes content items across client computing systems connected by a network. Each client device has a storage allocation for synchronized shared content items. If the storage allocation for shared content items on a client device is exceeded by the request to add or edit a content item such that it is enlarged, or open a large content item remote to the client device, a client application or the host of content management system selects content items to remove from residence on the client device but keep remotely on content management system. Upon removal of the selected content items, the client application creates shadow items, representing the content item but only containing the metadata of the content item. This creates sufficient space for the initial request to be completed while maintaining user access to all synchronized shared content items.
1 . A computer-implemented method comprising:
responsive to determining, by at least one server instantiated to synchronize content across a content management system, that a first user client device has accessed a content item, storing access data indicative of a date of the content item having been accessed;
identifying, by the at least one server, a second user client device that stores metadata for the content item without storing at least a portion of contents of the content item; and
responsive to the access data indicative of the date of the content item having been accessed, sending, by the at least one server, to the second user client device, the at least a portion of contents of the content item, causing the second user client device to store the at least portion of contents in association with the metadata for the content item.
2 . The computer-implemented method of claim 1 , further comprising:
maintaining a version of the content item at the content management system.
3 . The computer-implemented method of claim 2 , further comprising:
determining the content item has changed to a new version; and
synchronizing the stored metadata to reflect the new version.
4 . The computer-implemented method of claim 3 , wherein the at least a portion of contents sent by the content management system is of the new version of the content item.
5 . The computer-implemented method of claim 3 , further comprising:
determining from the synchronized metadata that a size of a represented content item exceeds a remaining amount of storage allocated on the second user client device;
selecting one or more least recently accessed content items wherein a total size of the selected content items is greater than or equal to a size of the represented content item; and
replacing each selected content item with metadata for the respective content item.
6 . The computer-implemented method of claim 2 , further comprising:
identifying, by the at least one server, a status of the content item on each user client device as compared to a status of the version of the content item maintained by the content management system;
determining, by the at least one server, whether the status of the content item on one of the first user client device or the second user client device differs from the status of the version of the content item maintained by the content management system; and
responsive to determining, by the at least one server, that the status of the content item on the second user client device differs from the status of the version of the content item maintained by the content management system, synchronizing the content item on the second user client device with the version of the content item maintained by the content management system.
7 . The computer-implemented method of claim 1 , further comprising:
deleting, from the second user client device, the stored metadata.
8 . A non-transitory computer-readable medium for synchronizing content items storing instructions which, when executed by a computing system, cause the computing system to perform operations comprising:
responsive to determining, by at least one server instantiated to synchronize content across a content management system, that a first user client device has accessed a content item, storing access data indicative of a date of the content item having been accessed;
identifying, by the at least one server, a second user client device that stores metadata for the content item without storing at least a portion of contents of the content item; and
responsive to the access data indicative of the date of the content item having been accessed, sending, by the at least one server, to the second user client device, the at least a portion of contents of the content item, causing the second user client device to store the at least portion of contents in association with the metadata for the content item.
9 . The non-transitory computer-readable medium of claim 8 , wherein the computing system is further caused to perform the operations comprising:
maintaining a version of the content item.
10 . The non-transitory computer-readable medium of claim 9 , wherein the computing system is further caused to perform the operations comprising:
determining the content item has changed to a new version; and
synchronizing the stored metadata to reflect the new version.
11 . The non-transitory computer-readable medium of claim 10 , wherein the at least a portion of contents is of the new version of the content item.
12 . The non-transitory computer-readable medium of claim 10 , wherein the computing system is further caused to perform the operations comprising:
determine from the synchronized metadata that a size of a represented content item exceeds a remaining amount of storage allocated on the second user client device;
select one or more least recently accessed content items wherein a total size of the selected content items is greater than or equal to a size of the represented content item; and
replacing each selected content item with metadata for the respective content item.
13 . The non-transitory computer-readable medium of claim 9 , wherein the computing system is further caused to perform the operations comprising:
identifying a status of the content item on each user client device as compared to a status of the version of the content item maintained by a content management system;
determining whether the status of the content item on one of the first user client device or the second user client device differs from the status of the version of the content item maintained by the content management system; and
responsive to determining that the status of the content item on the second user client device differs from the status of the version of the content item maintained by the content management system, synchronizing the content item on the second user client device with the version of the content item maintained by the content management system.
14 . A system for synchronizing content items comprising:
memory with instructions encoded thereon; and
one or more processors that, when executing the instructions, are caused to perform operations comprising:
responsive to determining, by at least one server instantiated to synchronize content across a content management system, that a first user client device has accessed a content item, storing access data indicative of a date of the content item having been accessed;
identifying, by the at least one server, a second user client device that stores metadata for the content item without storing at least a portion of contents of the content item; and
responsive to the access data indicative of the date of the content item having been accessed, sending, by the at least one server, to the second user client device, the at least a portion of contents of the content item, causing the second user client device to store the at least portion of contents in association with the metadata for the content item.
15 . The system of claim 14 , wherein the one or more processors are further caused to perform the operations comprising:
maintaining a version of the content item at the content management system.
16 . The system of claim 15 , wherein the one or more processors are further caused to perform the operations comprising:
determining the content item has changed to a new version; and
synchronizing the stored metadata to reflect the new version.
17 . The system of claim 16 , wherein the at least a portion of contents sent by the content management system is of the new version of the content item.
18 . The system of claim 16 , wherein the one or more processors are further caused to perform the operations comprising:
determine from the synchronized metadata that a size of a represented content item exceeds a remaining amount of storage allocated on the second user client device;
select one or more least recently accessed content items wherein a total size of the selected content items is greater than or equal to a size of the represented content item; and
replacing each selected content item with metadata for the respective content item.
19 . The system of claim 15 , wherein the one or more processors are further caused to perform the operations comprising:
identifying, by the content management system, a status of the content item on each user client device as compared to a status of the version of the content item maintained by the content management system;
determining, by the content management system, whether the status of the content item on one of the first user client device or the second user client device differs from the status of the version of the content item maintained by the content management system; and
responsive to determining, by the content management system, that the status of the content item on the second user client device differs from the status of the version of the content item maintained by the content management system, synchronizing the content item on the second user client device with the version of the content item maintained by the content management system.
20 . The system of claim 14 , wherein the one or more processors are further caused to perform the operations comprising:
deleting, from the second user client device, the stored metadata.