share / share/sharedb

Full offline mode (createSubscribeQuery)

Open
#575 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6.5k
Forks
456
Avg merge
1d 5h
Merged PRs (30d)
5

Description

Hi,

I’m trying to create a fully offline experience, not only storing the ops to send- but reading data from local storage (indexdb) when there’s no connection to the server.

My guess is something like:

  1. for every item, to store the following in local storage:

{
data,
src: connection.id,
v: version,
seq: connection.seq,
c: collection,
d: id,
}

  1. When unable to connect to the server, read items from local storage, recreating each one as a “doc” with normal properties (submitOp etc)

Is this plausible- can i simply recreate each “doc”?

Do you have any suggestion on implementation?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the createSubscribeQuery entry point and the issue's proposed local-storage record shape. Investigate how documents, submitOp, connection.id, connection.seq, versions, collections, and ids are represented, then determine what offline reads and reconnection behavior would need to support. Done means a defined implementation path for reading locally stored data while disconnected and syncing operations when connectivity returns.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.