{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/notes/issues/106","repository_url":"https://api.github.com/repos/ipfs/notes","labels_url":"https://api.github.com/repos/ipfs/notes/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/notes/issues/106/comments","events_url":"https://api.github.com/repos/ipfs/notes/issues/106/events","html_url":"https://github.com/ipfs/notes/issues/106","id":130220578,"node_id":"MDU6SXNzdWUxMzAyMjA1Nzg=","number":106,"title":"idea: support for transactional groups of writes","user":{"login":"ianopolous","id":179418,"node_id":"MDQ6VXNlcjE3OTQxOA==","avatar_url":"https://avatars0.githubusercontent.com/u/179418?v=4","gravatar_id":"","url":"https://api.github.com/users/ianopolous","html_url":"https://github.com/ianopolous","followers_url":"https://api.github.com/users/ianopolous/followers","following_url":"https://api.github.com/users/ianopolous/following{/other_user}","gists_url":"https://api.github.com/users/ianopolous/gists{/gist_id}","starred_url":"https://api.github.com/users/ianopolous/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianopolous/subscriptions","organizations_url":"https://api.github.com/users/ianopolous/orgs","repos_url":"https://api.github.com/users/ianopolous/repos","events_url":"https://api.github.com/users/ianopolous/events{/privacy}","received_events_url":"https://api.github.com/users/ianopolous/received_events","type":"User","site_admin":false},"labels":[{"id":988459924,"node_id":"MDU6TGFiZWw5ODg0NTk5MjQ=","url":"https://api.github.com/repos/ipfs/notes/labels/candidate_open_problem","name":"candidate_open_problem","color":"a6fcc8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-02-01T00:46:00Z","updated_at":"2018-09-27T01:05:54Z","closed_at":null,"author_association":"MEMBER","body":"I had a brief discussion with @whyrusleeping and wanted to start the ball rolling on a public discussion here.\n\n**Motivation:**\nThe ability to implement an ACID database or other transactional system in a highly concurrent environment. In my use case with Peergos I am imagining many users concurrently writing to the same IPFS daemon. This means that the GC will essentially need to be called at random relative to each thread. Each user will be building up trees of objects using object.patch, before eventually committing (pinning). \n\n**Implementation:**\nWhat I had in mind was an optional parameter to all IPFS write commands which was a transaction ID (and maybe a timeout as well). Then all writes are tagged with this temporary ID within a transaction. IPFS just keeps a map from transaction ID to a set of hashes, and these form new object roots during GC. Then when a transaction is complete you could call a completeTransaction(tid) which dumps the mapping (or let it time out). This gives you **guarantees** that an object you've just written won't be GC'd regardless of the GC activity before you are finished with it. \n"},"comment":{"url":"https://api.github.com/repos/ipfs/notes/issues/comments/424920799","html_url":"https://github.com/ipfs/notes/issues/106#issuecomment-424920799","issue_url":"https://api.github.com/repos/ipfs/notes/issues/106","id":424920799,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDkyMDc5OQ==","user":{"login":"Stebalien","id":310393,"node_id":"MDQ6VXNlcjMxMDM5Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/310393?v=4","gravatar_id":"","url":"https://api.github.com/users/Stebalien","html_url":"https://github.com/Stebalien","followers_url":"https://api.github.com/users/Stebalien/followers","following_url":"https://api.github.com/users/Stebalien/following{/other_user}","gists_url":"https://api.github.com/users/Stebalien/gists{/gist_id}","starred_url":"https://api.github.com/users/Stebalien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stebalien/subscriptions","organizations_url":"https://api.github.com/users/Stebalien/orgs","repos_url":"https://api.github.com/users/Stebalien/repos","events_url":"https://api.github.com/users/Stebalien/events{/privacy}","received_events_url":"https://api.github.com/users/Stebalien/received_events","type":"User","site_admin":false},"created_at":"2018-09-27T01:05:54Z","updated_at":"2018-09-27T01:05:54Z","author_association":"NONE","body":"Not really. We'll probably use sessions with this but it's mostly orthogonal."}}
{"actor":{"display_login":"Stebalien"}}