{"id":16092311,"url":"https://github.com/alecthomas/tuplespace","last_synced_at":"2025-03-18T06:30:57.420Z","repository":{"id":12308589,"uuid":"14941295","full_name":"alecthomas/tuplespace","owner":"alecthomas","description":"A RESTful tuple space server","archived":false,"fork":false,"pushed_at":"2023-12-02T01:41:17.000Z","size":108,"stargazers_count":21,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-28T07:49:35.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"TetraEtc/slack-deleter","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alecthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-05T01:54:48.000Z","updated_at":"2023-12-02T01:41:21.000Z","dependencies_parsed_at":"2024-10-27T17:23:50.075Z","dependency_job_id":"aca18a51-e84f-4bd0-84b1-5d298c67b207","html_url":"https://github.com/alecthomas/tuplespace","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"6ee65947f2a8e258934132ff433434f1773281d6"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2Ftuplespace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2Ftuplespace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2Ftuplespace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alecthomas%2Ftuplespace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alecthomas","download_url":"https://codeload.github.com/alecthomas/tuplespace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243907622,"owners_count":20367257,"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":[],"created_at":"2024-10-09T16:06:57.725Z","updated_at":"2025-03-18T06:30:57.146Z","avatar_url":"https://github.com/alecthomas.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A tuple space server for Go. [![Build Status](https://travis-ci.org/alecthomas/tuplespace.png)](https://travis-ci.org/alecthomas/tuplespace)\n\nThis is an implementation of a [tuple space](http://www.mcs.anl.gov/~itf/dbpp/text/node44.html) as a [Go RPC service](http://golang.org/pkg/net/rpc/).\n\n- \"Tuples\" are maps.\n- Tuples are inherently unreliable and may disappear at any time, including before their timeout.\n- Tuples can be matched using arbitrary expressions. eg. `age \u003e 36 \u0026\u0026 id % 2 == 0`.\n- Senders can wait (with optional timeout) for a tuple to be processed by a receiver.\n- Subsequent reads may return the same tuple.\n- Take operations are performed inside a [reservation](#reservations).\n\n## Example\n\nIn two separate terminals, run the following commands at the same time.\n\nSend a tuple and wait for it to be processed:\n\n\t\t$ curl --data-binary '{\"tuples\": [{\"age\": 20}], \"ack\": true}' http://localhost:2619/tuplespaces/users/tuples\n\t\t{\"s\":201}\n\nRead a tuple (also marking it as processed):\n\n\t\t$ curl http://localhost:2619/tuplespaces/users/tuples\n\t\t{\"s\":200,\"d\":[{\"age\":20}]}\n\n## Operations\n\nThe following operations are supported:\n\n- `Read(match, timeout) -\u003e Tuple` - Read a single tuple from the tuple space.\n- `ReadAll(match, timeout) -\u003e []Tuple` - Read all matching tuples from the tuple space.\n- `Send(tuple, expires)` - Send a tuple.\n- `SendMany(tuples, expires)` - Send many tuples at once.\n- `SendWithAcknowledgement(tuple, expires)` - Send a tuple and wait for it to be processed.\n- `Take(match, timeout, reservationTimeout) -\u003e Reservation`\n\n`TakeAll()` is not supported. To support such an operation in a distributed environment would require server-server coordination, which is explicitly outside the scope of this implementation.\n\n## Features\n\n### Reservations\n\nA reservation (`Take()`) provides timed, exclusive access to a tuple. If neither a `Complete()` nor a `Cancel()` are called on the reservation before the reservation times out, it is returned to the tuple space.\n\n### Scalability\n\nDue to the constraints around the provided operations, the tuple space service can be scaled by simply adding nodes. Clients discover new server nodes by periodically reading all tuples from a management space. All clients connect to all servers simultaneously.\n\n- `Read()` should be issued to multiple servers at once. One result is then used, and the remainder discarded.\n- `Take()` should be issued to multiple servers at once. One reservation is then used and the rest are cancelled.\n-  `Send()` and `SendWithAcknowledgement()` should be sent round-robin to all servers.\n\n### Installation\n\nInstall the server and client with:\n\n```bash\n$ go get github.com/alecthomas/tuplespace/bin/tuplespaced\n$ go get github.com/alecthomas/tuplespace/bin/tuplespace\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecthomas%2Ftuplespace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falecthomas%2Ftuplespace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecthomas%2Ftuplespace/lists"}