{"id":26576677,"url":"https://github.com/getsentry/hackweek-coda","last_synced_at":"2025-03-23T03:25:55.856Z","repository":{"id":189708096,"uuid":"681151461","full_name":"getsentry/hackweek-coda","owner":"getsentry","description":"A queue thing with a sprinkle of Italian","archived":false,"fork":false,"pushed_at":"2023-10-14T08:09:34.000Z","size":1422,"stargazers_count":27,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-09T23:58:40.360Z","etag":null,"topics":["tag-non-production"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getsentry.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,"governance":null},"funding":{"custom":["https://sentry.io/pricing/","https://sentry.io/"]}},"created_at":"2023-08-21T11:34:44.000Z","updated_at":"2023-09-21T05:32:04.000Z","dependencies_parsed_at":"2023-08-21T13:32:46.857Z","dependency_job_id":null,"html_url":"https://github.com/getsentry/hackweek-coda","commit_stats":null,"previous_names":["mitsuhiko/coda"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fhackweek-coda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fhackweek-coda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fhackweek-coda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsentry%2Fhackweek-coda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getsentry","download_url":"https://codeload.github.com/getsentry/hackweek-coda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245051045,"owners_count":20552990,"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":["tag-non-production"],"created_at":"2025-03-23T03:25:55.094Z","updated_at":"2025-03-23T03:25:55.828Z","avatar_url":"https://github.com/getsentry.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/mitsuhiko/coda/blob/main/assets/logo.png?raw=true\" alt=\"\" width=320\u003e\n\u003c/div\u003e\n\nMeet **Coda**, a hackweek project on a mission to revolutionize queue systems and simplify complex task workflows at [Sentry](https://sentry.io).\n\n# What's Coda?\n\nCoda is a hackweek project aimed at exploring alternative ideas for how queue systems can function. We extensively employ\nCelery at Sentry, and although Celery is not a bad project, it does not offer an ideal abstraction for many of the\nfunctionalities we intend to develop.\n\nWithin Sentry, some async jobs exhibit workflow-like behavior, relying on multiple tasks for their execution.\nThese tasks mainly rely on Redis as auxiliary storage to exchange data during the execution, resulting in many\nrather complex and challenging implementations, which can differ significantly.\n\nWe quite appreciate the design of [Temporal](https://temporal.io/), but unfortunately it is quite complex for many of our\nuse cases. Coda is our attempt at building a workflow engine that mixes simplicity with some of Temporal's ideas.\n\n# Example\n\nThis workflow starts two tasks. When the workflow reruns because for instance it\nfailed, it will not invoke tasks which have already yielded a result (as keyed by\n`cache_key`).\n\n```python\nimport coda\n\nfrom .tasks import normalize_event, store_event\n\n@coda.workflow()\nasync def process_event(project_id, event_data, **kwargs):\n    event_data = await coda.context.spawn_task(\n        normalize_event,\n        args={\"project_id\": project_id, \"event_data\": event_data},\n        cache_key=[event_data[\"event_id\"]]\n    )\n    result = await coda.context.spawn_task(\n        store_event,\n        args={\"project_id\": project_id, \"event_data\": event_data},\n        cache_key=[event_data[\"event_id\"]]\n    )\n    print(f\"Workflow finished with result {result}\")\n```\n\n# High-Level Design\n\nCoda consists of a **supervisor** responsible for spawning workers. Currently, there is only a Python client available.\nThe workers relay all their communication through the supervisor, connecting to neither a queue nor a state management\nsystem. All data is managed by the supervisor.\n\nThe supervisor's primary responsibility is to communicate with the actual workflow engine, which has not been\nimplemented yet. Consequently, all state data is stored directly in memory within the supervisor. This state is\nassociated with the workflow.\n","funding_links":["https://sentry.io/pricing/","https://sentry.io/"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsentry%2Fhackweek-coda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetsentry%2Fhackweek-coda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsentry%2Fhackweek-coda/lists"}