Radicle
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Radicle Inspect #001 Notes Topic: Collaborative Objects (COBs) Format: - Study group -- people ask questions, it's a conversational format - Feel free to add questions async in Jitsi chat ## Notes What are COBs? - Core collaboration primitive in Radicle - Extensible system. Users and devs can create different objects that have their own rules. - A way to implement custom logic in a radicle repo that gets replicated and runs on everyones machine Starting point: - Where they are represented and how they are stored - You have your radicle / git repo - In a git repo you have - /refs - /heads - /tags - /cobs - we create an extra namespace for cobs. each cob has its own typename. they are in reverse domain notation e.g.: - xyz.radicle.issue/ - Issues will live under this - xyz.radicle.patch/ - Patches live under this - these are not in working copy - these are in stored copy in your radicle home - Fintan: I might just clarify that this in the Radicle storage and not the working copy -- so these refs are under each NID namespace 😃 - when you are operating, operating directly on these cobs Example Alice - repo1 - cobs Bob - repo1 - cobs These cobs are synced /xyz.radicle.issue/ hierarchy - You have a git ref under each issue (e.g. the issue id) In git you have a few different object types - e.g. refs. which are names that point to commits / objects commits - everyone here knows blobs - are essentially files trees - paths to blobs trees point to blobs refs point to commits commits point to trees Yorgos wanted to look at example: creating an issue - There is a root commit - Then within it, there is a comment e.g. "Hello world" Someone replies: "Hi there" There will be a relationship between commits Root commit will be a parent to the reply If someone replies "whats up", this then points to "Hi there", which points to "hello world" Commit --- id (sha1) --> this is the issue id tree points to tree object, then the tree points to a blob this blob contains the payload, which is a json object { "type": "comment" "body": "hellow world" reply-to: "<sha1>" } There is a commit for all actions, like changing the status etc. They all have same datastructure, just the "blob" has a different type. Question: how is a reply to a comment mapped? there is reply to in the blob each comment has unique id, can reply to the root, or directly to an existing comment id head pointer would point to "root" of issue If you add a comment, like "c1", c1 will point to root, and "head" will point to "c2" If you add another comment, "c2", then the same thing happens, e.g. c2 points to c1, and head points to c2. lets add another user fintan, make the first one cloudhead fintan adds a new comment, it points to c2 cloudhead doesnt have f1 on his device yet, and he adds c3 and it points to c2 as far as the cob is concerned, they are concurrent and happened at the same time eventually, the state has to be synchronized lets say there was a synchronization event cloudhead wants to add a new comment: c4 there are two theads right now. his c4 commit will have two parents (f1, c3) this is a regular git commit that happens to have more than one parent this is the reality of p2p, offline first, concurrent system design end up with nonlinear history - a DAG directed, bc the arrows always point in one direction Question: merge function Lorenz I'm waiting till we go lower level and have a question about the `cob::Evaluate` interface. Topological sort that looks at all the nodes of a graph and sorts them by the edges If you do a topological sort, doing an ordering There are certain orderings that are known if f1. id > c3.id Lorenz: The order itself doesn't matter too much, it just needs to be consistent among all participants. Fintan: You could say that you're turning a partial order into a total order by picking a way to break ties how to access the cobs for app development? list ops = [ r , c1, c2 .... ] eval ( [ops]) --> issue eval function is implemented for each cob type let ops = topo sort (graph) let issue = eval (ops) then clin (issue) --> print theres this interface, cob.evaluate reply -- it takes an iterarator of concurrent operations if you unpack eval ([op]) ---> apply (issue) Terminal example: inside home/.radicle/storage - it is what is in there that is being replicated to network git show-ref inside a repo will be shown all the refs why is hash on left different from hash on right? hash on right is the issue id which is the root commit id, whereas hash on the left is the head / last comment the way we store COBs inside git commits is not how we store code Vitalii (glukki) Vitalii (glukki) says:so you can calculate state out of available actions! neat! 16:59 avatar Lorenz Leutgeb Lorenz Leutgeb says:Operation vs. Action? Don't the blobs 0 and 1 contain actions? 17:00 yorgos yorgos says:Great session!! Afraid I need to drop, but this was time well spent, I think! 👌 yorgos says:thanks !! 17:10 D Derick Derick says:I have a question that I'll ask here in chat: Derick says:To have a custom COB type, is it necessary to run a custom build of Heartwood that was built with the code for the custom COB? I.e. is it that such a custom build must be distributed to everyone who wants to use the custom COB? Or can the implementation of the custom COB be provided as some kind of plug-in (so that an official distribution of the radicle binaries that everyone already has can be used by them)? -- it is the latter, but we dont help you that much to do that right now -- radicle will replicate whatever cobs you put in the repo. it doesnt need the evaluation function. it just needs the data. it looks at the commits. thats under cobs hierarchy, ill replicate it - for users to interpret the cob, they will need a custom evaluation fucntion. That can be supplied as a separate tool, a desktop app, etc. - rad just like git, it will look for that in your path, like rad-(thing). - can distribute rad-lol to ppl, then they can all rad lol 17:11 M maninak maninak says:I didn't know those details about the design, especially the root commit's refs to id doc etc, that's damn well designed, kudos! 👍 Jan two questions: - how could the state of the issue be created in the working copy if the root hash of the issue cob was not available in the demo wiht the rad cli command? - do you store a snapshop of the reduced final cob states somewhere or is it always fast enough to recreate everything as needed? 17:12 LW Lars Wirzenius Lars Wirzenius says:we could have a "hello world" COB implementation to make it easier to learn how to implement new COB types 17:15 M maninak maninak says:@lars +1 17:16 avatar Sebastian Martinez Sebastian Martinez says:👆👆 17:16 LW Lars Wirzenius Lars Wirzenius says:COBs are stringly typed 17:21 L Lorenz Lorenz says:Hello world COB using external script will be a test contributed along with rad cob create Lorenz says:See https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/patches/6833bcc7c9278a489e7eda02a7e5fc82caef6f62?tab=changes#radicle-cli/examples/rad-cob-create.md:H0L0 17:21 avatar Sebastian Martinez Sebastian Martinez says:@lorenz 🙏 17:21 M maninak maninak says:@lorenz ❤️ maninak says:I believe --repo is a flag for `rad patch` commands 17:23 avatar Sebastian Martinez Sebastian Martinez says:rad patch --repo <rid> works Sebastian Martinez says:also for issue cache command would have to be implemented per cob to dos: explain what one has to implement on their own for COBs This is me recording! 16:02 me says: https://hackmd.io/meJDgnSVTrG-igCTEbJD7w 16:03 Fintan Halpenny Fintan Halpenny says:😮 Fintan Halpenny says:👏 Fintan Halpenny says:I might just clarify that this in the Radicle storage and not the working copy -- so these refs are under each NID namespace 😃 16:09 R rudolfs rudolfs says:👏 16:14 D Derick Derick says:👏 16:14 avatar Sebastian Martinez Sebastian Martinez says:👏 16:15 Lorenz Leutgeb Lorenz Leutgeb says:👏 16:14 Daniel Kalman Daniel Kalman says:👏 16:15 yorgos yorgos says:I think looking into an example would help 16:15 Lorenz Leutgeb Lorenz Leutgeb says:I'm waiting till we go lower level and have a question about the `cob::Evaluate` interface. 16:15 LW Lars Wirzenius Lars Wirzenius says:(remarkable docs say there is no limit to page length) 16:18 Fintan Halpenny Fintan Halpenny says:👍 16:19 M Mihalis Mihalis says:How is a reply to a comment mapped? Mihalis says:👍 16:24 avatar Sebastian Martinez Sebastian Martinez says:remarkable changes swiggly lines that are close to straight lines into straight lines. 16:36 Fintan Halpenny Fintan Halpenny says:rude 16:37 LW Lars Wirzenius Lars Wirzenius says:squiggly to strraight only if you keep the pen pressed at the end of the line without moving it 16:38 Lorenz Leutgeb Lorenz Leutgeb says:The order itself doesn't matter too much, it just needs to be consistent among all participants. 16:39 Fintan Halpenny Fintan Halpenny says:You could say that you're turning a partial order into a total order by picking a way to break ties 16:41 Lorenz Leutgeb Lorenz Leutgeb says:I'd like to ask something before demo. Lorenz Leutgeb says: https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/tree/radicle-cob/src/object/collaboration.rs#L76 Lorenz Leutgeb says:I see, thanks. 16:48 M Mihalis Mihalis says:👍 16:50 avatar Sebastian Martinez Sebastian Martinez says:👏 16:50 me says:the left changes and right doesnt change? 16:55 avatar Sebastian Martinez Sebastian Martinez says:exactly 16:55 Vitalii (glukki) Vitalii (glukki) says:so you can calculate state out of available actions! neat! 16:59 Lorenz Leutgeb Lorenz Leutgeb says:Operation vs. Action? Don't the blobs 0 and 1 contain actions? 17:00 yorgos yorgos says:Great session!! Afraid I need to drop, but this was time well spent, I think! 👌 yorgos says:thanks !! 17:10 D Derick Derick says:I have a question that I'll ask here in chat: Derick says:To have a custom COB type, is it necessary to run a custom build of Heartwood that was built with the code for the custom COB? I.e. is it that such a custom build must be distributed to everyone who wants to use the custom COB? Or can the implementation of the custom COB be provided as some kind of plug-in (so that an official distribution of the radicle binaries that everyone already has can be used by them)? 17:11 M maninak maninak says:I didn't know those details about the design, especially the root commit's refs to id doc etc, that's damn well designed, kudos! 👍 17:11 J jan jan says:two questions: - how could the state of the issue be created in the working copy if the root hash of the issue cob was not available in the demo wiht the rad cli command? - do you store a snapshop of the reduced final cob states somewhere or is it always fast enough to recreate everything as needed? 17:12 LW Lars Wirzenius Lars Wirzenius says:we could have a "hello world" COB implementation to make it easier to learn how to implement new COB types 17:15 M maninak maninak says:@lars +1 17:16 avatar Sebastian Martinez Sebastian Martinez says:👆👆 17:16 LW Lars Wirzenius Lars Wirzenius says:COBs are stringly typed 17:21 L Lorenz Lorenz says:Hello world COB using external script will be a test contributed along with rad cob create Lorenz says:See https://app.radicle.xyz/nodes/seed.radicle.garden/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5/patches/6833bcc7c9278a489e7eda02a7e5fc82caef6f62?tab=changes#radicle-cli/examples/rad-cob-create.md:H0L0 17:21 avatar Sebastian Martinez Sebastian Martinez says:@lorenz 🙏 17:21 M maninak maninak says:@lorenz ❤️ maninak says:I believe --repo is a flag for `rad patch` commands 17:23 avatar Sebastian Martinez Sebastian Martinez says:rad patch --repo <rid> works Sebastian Martinez says:also for issue 17:24 LW Lars Wirzenius Lars Wirzenius says:TCL - Todayl Cloudhead Leanred 😃 17:30 L Lorenz Lorenz says:Correct. show uses cache, log does not. 17:33 M maninak maninak says:Gotcha, makes sense. Thank you, both. 17:33 LW Lars Wirzenius Lars Wirzenius says:I don't think I've used it either. Fintan had to leave. Lars Wirzenius says:i = rad issue ache 17:34 M maninak maninak says:`rad cach` is a great tip as a fallback, thank you! 17:34 Q qxotk qxotk says:Might be good to have a verbose mode showing if cache used. qxotk says:Got it. 17:36 J jan jan says:thanks that was super interesting! 17:36 R rudolfs rudolfs says:👏 17:37 avatar Sebastian Martinez Sebastian Martinez says:was great tyvm :applaud: 17:37 L Lorenz Lorenz says:Good sesh. 17:37 R rudolfs rudolfs says:was real good! 17:37 D Derick Derick says:I'd already figured out most of what you covered in the first hour. But it was really good to have you confirm it. 17:37 M maninak maninak says:That was very well delivered, the remarkable part was dope, all super insightful and not boring at any point throughout. 17:37 M Mihalis Mihalis says:Pretty good and informative! Thanks!

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully