Skip to content

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

Open
hayksaakian wants to merge 20 commits into
brianleroux:masterfrom
hayksaakian:master
Open

chrome-storage-sync adapter (work in progress)#150
hayksaakian wants to merge 20 commits into
brianleroux:masterfrom
hayksaakian:master

Conversation

@hayksaakian

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@hayksaakian

Copy link
Copy Markdown
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