Tracking this idea out of a discussion in #493
As a user of ShareDB in the context of an isomorphic JavaScript app, I want to be able to use ingestSnapshot to ingest data that was transferred to the client externally to the client's ShareDB connection, so that the number of times a given document is queried for in the database and transferred over the wire is reduced from 2 (server side fetch, client side subscribe without ingestSnapshot) to 1 (server side fetch only).
Proposed API: Doc.createSnapshot(). This makes sense to invoke only after a successful fetch or subscribe.
Tracking this idea out of a discussion in #493
As a user of ShareDB in the context of an isomorphic JavaScript app, I want to be able to use
ingestSnapshotto ingest data that was transferred to the client externally to the client's ShareDB connection, so that the number of times a given document is queried for in the database and transferred over the wire is reduced from 2 (server side fetch, client side subscribe withoutingestSnapshot) to 1 (server side fetch only).Proposed API:
Doc.createSnapshot(). This makes sense to invoke only after a successful fetch or subscribe.