Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chrome-storage-sync adapter (work in progress) #150

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

hayksaakian
Copy link
Contributor

I wrote a lawnchair adapter for chrome.storage.sync (only for chrome apps and extensions at the moment).

Advantages:

  • automatically syncs data between a user's chrome browsers
  • relatively simple
  • like localStorage but better:
  • you can do mass reads, mass writes and mass deletes

Disadvantages:

  • severe data caps (MAX_WRITE_OPERATIONS_PER_HOUR, MAX_ITEMS, QUOTA_BYTES, MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE)
  • most can't be worked around (only QUOTA_BYTES_PER_ITEM really can)
  • needs a work around for individual objects (linked-lists maybe?)
  • "chrome.storage is not a big truck. It's a series of tubes."

see https://developer.chrome.com/apps/storage.html#sync-properties
for details

@brianleroux
Copy link
Owner

ack! I want to merge but many of these commits are complete rewrites (reformats?) of all the files---- can you cherry pick to just the files for this feature?

@hayksaakian
Copy link
Contributor Author

sorry... I'm a relative git newbie. the only file that matters is chrome-storage-sync.js

im not sure how to cherry pick just that one.

the rest of the commits are from when i was trying to figure out how to test it.

@brianleroux
Copy link
Owner

No worries, my git-fu is super google dependent too. Found this trick: http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/ which should work nicely.

@hayksaakian
Copy link
Contributor Author

nice find. i just wrote and posted a stackoverflow question as this update showed up on my end.

@hayksaakian
Copy link
Contributor Author

one other issue is in using multiple lawnchair instances. chrome.storage does not provide a 'table/collection' level of abstraction. a work around could be to use an indexing system, but given how little space is provided by chrome.storage.sync, i'm not sure if this is the best way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants