{"id":28932378,"url":"https://github.com/juspay/purescript-logoot-core","last_synced_at":"2026-02-03T08:05:49.041Z","repository":{"id":58225420,"uuid":"125940550","full_name":"juspay/purescript-logoot-core","owner":"juspay","description":"A library for creating a collaborative real-time editor using commutative replicated data types","archived":false,"fork":false,"pushed_at":"2018-03-21T01:44:50.000Z","size":41,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-22T16:57:24.021Z","etag":null,"topics":["ces","crdt","logoot","purescript"],"latest_commit_sha":null,"homepage":null,"language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juspay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-20T01:01:56.000Z","updated_at":"2024-07-24T15:14:38.000Z","dependencies_parsed_at":"2022-08-31T04:10:16.556Z","dependency_job_id":null,"html_url":"https://github.com/juspay/purescript-logoot-core","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/juspay/purescript-logoot-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fpurescript-logoot-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fpurescript-logoot-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fpurescript-logoot-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fpurescript-logoot-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juspay","download_url":"https://codeload.github.com/juspay/purescript-logoot-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juspay%2Fpurescript-logoot-core/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264139571,"owners_count":23563250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ces","crdt","logoot","purescript"],"created_at":"2025-06-22T16:42:01.183Z","updated_at":"2026-02-03T08:05:48.981Z","avatar_url":"https://github.com/juspay.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# purescript-logoot-core\n\nThis package defines the core Logoot algorithm as described in \"Logoot: A\nScalable Optimistic Replication Algorithm for Collaborative Editing on P2P\nNetworks\" by Stéphane Weiss, Pascal Urso and Pascal Molli.\n\nWherever possible, it tries to be polymorphic in its types.\n\nThe core identifier generation algorithm is not a direct port of the imperative\npseudocode found in the paper; it has been modified to fit a more functional\nstyle of programming.\n\n# Usage\n\nThis package is only useful for identifier generation. In an actual collaborative\neditor, the following will need to be implemented:\n\n1. Sending messages to other peers (you can use `encodeJSON` on identifiers for this)\n2. Receiving messages from other peers (similarly for `decodeJSON`)\n3. Assigning identifiers to atomic elements in the document.\n4. Retrieving elements based on identifiers.\n5. Retrieving document history for newcomers.\n\nNote that since identifiers generated are unique and totally ordered,\nit makes sense to use a fast (i.e. O(log n)) search algorithm, like\na simple binary search, to retrieve identifiers.\n\nAlso, if server CPU cyles are not an issue, it may be worthwhile to keep a \"current document state\" that holds a list of active identifiers and document elements, then broadcast that to a new user upon connecting. The alternative is to transmit the whole document history and let the user recompute the latest document state.\n\nFor convenience you can use the `Logoot.Types.History` module for encoding and decoding history.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fpurescript-logoot-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuspay%2Fpurescript-logoot-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuspay%2Fpurescript-logoot-core/lists"}