GithubHelp home page GithubHelp logo

Comments (3)

carsonfarmer avatar carsonfarmer commented on June 12, 2024 2

Not at the moment @sanderpick, because the JS libs no longer operate at this lower level API (they did when we had a full JS node). You are indeed correct though, that AddRecord was required in JS-land so that remote peers (js-threads) could create Records and then push them to the "remote" (go-threads). We don't do this at the moment, but there is a future where a JSON-RPC wrapped AddRecord API could be used from JS-land again...

I guess TL;DR not a constraint for JS right now.

from go-threads.

merlinran avatar merlinran commented on June 12, 2024

Well we can't remove the Prev field in the cbor.CreateRecordConfig because signing requires it. Guess we have to postpone to API change to have a log abstraction, for example, so we can call something like log.AppendRecord in an intuitive way.

from go-threads.

sanderpick avatar sanderpick commented on June 12, 2024

Ah, makes sense. I was also wondering something related that @carsonfarmer may know about: Doesn't the threaddb js lib need to "batch" add records that are already chained? I believe that was the origin of the AddRecord API.

Instead of removing the API, we could probably fix the putRecords logic to enforce that either:

  • The first entry's Prev in the chain is HEAD
  • HEAD is somewhere in the chain

That should be enough to prevent creating orphaned chains.

from go-threads.

Related Issues (20)

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.