Git Product home page Git Product logo

tinysync's People

Contributors

jamesgpearce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tinysync's Issues

a few questions about hlc implementation details

  • I really love your tinybase HLC implementation and try to play with it. I got a few questions:

prerequisite: every data store has a change-tree attached to it, which contains the store's full changes-data/operations.

๐Ÿค” Q1: when building a store-change-tree in addLeaf, why is HLC splitted into 4 parts?

{ time1: { time2: {counter: {clientId:changeObj} } } }

  • why not just keep 3 parts { time: {counter: {clientId:changeObj} } } ? or why not split into more parts by add time3/time4 ?
  • why is time's 7-digit splitted to 3+4? not 4+3 / 1+6 / 2+5?
  • I'm curious about the design.

๐Ÿค” Q2: in your sync example, it seems that for every sync logic,a whole tree must be sent to another.

  • It seems crazy if one made a lot of changes, then every following sync needs to send a new change-tree containing all previous data?

  • I have an idea1 to use a central server and keep a change-tree there, then client just sends current change-operation/data instead of full tree . Then it's the server rather than the client to build the change-tree and return the minimal diff tree to the client.

  • after a good sleep, I have an idea2 to split every sync into 2 phases: sendMeta + sendChanges. In sendMeta, still send a change-tree but without change content. In sendChanges, minimal diff changes content will be sent.

  • Do you have any idea to solve this?

๐Ÿค” Q3: in handleChange, latestHlcsByCell seems useless.

Is It safe to remove it?

Consider IPFS Helia for JSON transport/storage/replication

I think helia/json would compliment TinyBase as a P2P remote storage solution using IPFS. It's a relatively new implementation of IPFS for browsers and my initial testing looks good. It stores plain JSON and uses add and get methods, so should be possible to use with TinyBase save and load.

Thanks for a great project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.