{"id":42482697,"url":"https://github.com/apposed/appose","last_synced_at":"2026-01-28T11:16:08.826Z","repository":{"id":319931779,"uuid":"648330542","full_name":"apposed/appose","owner":"apposed","description":"Interprocess environment manager 🧊","archived":false,"fork":false,"pushed_at":"2025-12-06T04:24:53.000Z","size":64,"stargazers_count":10,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-09T03:24:34.668Z","etag":null,"topics":["conda","deep-learning","interprocess","java","maven","pypi","python","shared-memory","shm"],"latest_commit_sha":null,"homepage":"https://apposed.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apposed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-06-01T18:12:06.000Z","updated_at":"2025-12-06T04:24:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8921947-b3bd-47d3-b1af-15d0d7e170f9","html_url":"https://github.com/apposed/appose","commit_stats":null,"previous_names":["apposed/appose"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apposed/appose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apposed%2Fappose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apposed%2Fappose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apposed%2Fappose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apposed%2Fappose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apposed","download_url":"https://codeload.github.com/apposed/appose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apposed%2Fappose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["conda","deep-learning","interprocess","java","maven","pypi","python","shared-memory","shm"],"created_at":"2026-01-28T11:16:06.839Z","updated_at":"2026-01-28T11:16:08.819Z","avatar_url":"https://github.com/apposed.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Appose\n\n\u003e [!NOTE]\n\u003e **QUICK START:** [Appose Workshop](https://fiji.github.io/i2k-2025-appose/)\n\n|   |   |\n|---|---|\n| \u003cimg src=\"https://docs.apposed.org/en/latest/_static/icons/hammer-solid-full.svg\" width=\"24\" height=\"24\"\u003e | **Build environments** based on community standards ([pixi](https://pixi.sh), [mamba](https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html), [uv](https://docs.astral.sh/uv/)) |\n| \u003cimg src=\"https://docs.apposed.org/en/latest/_static/icons/code-solid-full.svg\" width=\"24\" height=\"24\"\u003e | **Run scripts** in those environments as worker processes |\n| \u003cimg src=\"https://docs.apposed.org/en/latest/_static/icons/microchip-solid-full.svg\" width=\"24\" height=\"24\"\u003e | **Share memory** between processes to avoid copying data |\n|   |\n\nAppose is a library for interprocess cooperation with shared memory.\nBuild environments, run scripts, share data across Java, Python and more.\nThe guiding principles are *simplicity* and *efficiency*.\n\nAppose was written to enable **easy execution of Python-based deep learning\nfrom Java without copying tensors**, but its utility extends beyond that.\nThe steps for using Appose are:\n\n* Build an Environment with the dependencies you need.\n* Create a Service linked to a *worker*, which runs in its own process.\n* Execute scripts on the worker by launching Tasks.\n* Receive status updates from the task asynchronously via callbacks.\n\n## Goals\n\nPython, Java, and JavaScript, working in harmony, side by side.\nSeparate processes, shared memory, minimal dependencies.\n\n1. Construct an environment. E.g.:\n   * Java with dependencies from Maven.\n   * Python with dependencies from conda-forge.\n   * JavaScript/Node.js with dependencies from NPM (**planned**).\n\n2. Invoke routines in that environment:\n   * Routines are run in a separate process.\n   * The routine's inputs and outputs are passed via pipes (stdin/stdout).\n   * NDArrays are passed as named shared memory buffers,\n     for zero-copy access across processes.\n\n## Examples\n\nEach supported language/platform has its own implementation of Appose.\nYou can find examples for each language (calling out to other languages)\nin each implementation's README:\n\n* [Java](https://github.com/apposed/appose-java#examples)\n* [Python](https://github.com/apposed/appose-python#examples)\n\n## Workers\n\nA *worker* is a separate process created by Appose to do asynchronous\ncomputation on behalf of the calling process. The calling process interacts\nwith a worker via its associated *service*.\n\nAppose comes with built-in support for two worker implementations:\n`python_worker` to run Python scripts, and `GroovyWorker` to run Groovy\nscripts. These workers can be created easily by invoking the environment\nobject's `python()` and `groovy()` methods respectively.\n\nBut Appose is compatible with any program that abides by the\n*Appose worker process contract*:\n\n1. The worker must accept requests in Appose's *request* format on its\n   standard input (stdin) stream.\n2. The worker must issue responses in Appose's *response* format on its\n   standard output (stdout) stream.\n\n### Requests to worker from service\n\nA *request* is a single line of JSON sent to the worker process via its\nstandard input stream. It has a `task` key taking the form of a\n[UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier),\nand a `requestType` key with one of the following values:\n\n#### EXECUTE\n\nAsynchronously execute a script within the worker process. E.g.:\n```json\n{\n   \"task\" : \"87427f91-d193-4b25-8d35-e1292a34b5c4\",\n   \"requestType\" : \"EXECUTE\",\n   \"script\" : \"task.outputs[\\\"result\\\"] = computeResult(gamma)\\n\",\n   \"inputs\" : {\"gamma\": 2.2}\n}\n```\n\n#### CANCEL\n\nCancel a running script. E.g.:\n```json\n{\n   \"task\" : \"87427f91-d193-4b25-8d35-e1292a34b5c4\",\n   \"requestType\" : \"CANCEL\"\n}\n```\n\n### Responses from worker to service\n\nA *response* is a single line of JSON with a `task` key taking the\nform of a\n[UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier),\nand a `responseType` key with one of the following values:\n\n#### LAUNCH\n\nA LAUNCH response is issued to confirm the success of an EXECUTE\nrequest.\n```json\n{\n   \"task\" : \"87427f91-d193-4b25-8d35-e1292a34b5c4\",\n   \"responseType\" : \"LAUNCH\"\n}\n```\n\n#### UPDATE\n\nAn UPDATE response is issued to convey that a task has somehow made\nprogress. The UPDATE response typically comes bundled with a\n`message` string indicating what has changed, `current` and/or\n`maximum` progress indicators conveying the step the task has\nreached, or both.\n```json\n{\n   \"task\" : \"87427f91-d193-4b25-8d35-e1292a34b5c4\",\n   \"responseType\" : \"UPDATE\",\n   \"message\" : \"Processing step 0 of 91\",\n   \"current\" : 0,\n   \"maximum\" : 91\n}\n```\n\n#### COMPLETION\n\nA COMPLETION response is issued to convey that a task has successfully\ncompleted execution, as well as report the values of any task outputs.\n```json\n{\n   \"task\" : \"87427f91-d193-4b25-8d35-e1292a34b5c4\",\n   \"responseType\" : \"COMPLETION\",\n   \"outputs\" : {\"result\" : 91}\n}\n```\n\n#### CANCELATION\n\nA CANCELATION response is issued to confirm the success of a CANCEL\nrequest.\n```json\n{\n   \"task\" : \"87427f91-d193-4b25-8d35-e1292a34b5c4\",\n   \"responseType\" : \"CANCELATION\"\n}\n```\n\n#### FAILURE\n\nA FAILURE response is issued to convey that a task did not completely\nand successfully execute, such as an exception being raised.\n```json\n{\n   \"task\" : \"87427f91-d193-4b25-8d35-e1292a34b5c4\",\n   \"responseType\" : \"FAILURE\",\n   \"error\", \"Invalid gamma value\"}\n}\n```\n\n## FAQ\n\nQ: How about abstracting the transport layer so protocols besides pipes+JSON\n   can be used? Then Appose could work with pipes+pickle, and/or with Google\n   Protocol Buffers, Apache Arrow, NATS.io, over HTTP local loopback,\n   between machines on the cloud...\n\nA: It is tempting. But simplicity is an important core design goal, and\n   additional transport layer implementations would increase complexity.\n   There are already a plethora of existing solutions for interprocess\n   communication, RPC, and data sharing between processes on the same or\n   different machines. The reason Appose exists is to be less complicated\n   than those other solutions, while supporting dynamic construction of\n   subprocess environments, and access to large data in shared memory.\n\nQ: What about more data types for inputs and outputs? Appose could be plugin\n   driven, with extension libraries registering additional externalization\n   routines to convert their own favorite kinds of objects to and from JSON.\n\nA: Again, tempting! But nailing down (via either invention or reuse) a\n   plugin mechanism for each supported language would increase the size of\n   the codebase, and the modularization would make it more complicated to\n   depend on Appose. Have you included the right plugins in your dependency\n   set? Do they all have the right versions? Where is the bill of materials\n   keeping all of the dependencies in sync? Etc. For now, Appose strives to\n   be self-contained with all supported types handled by one single library\n   per target language.\n\n## Alternatives and complements\n\n* [CuVec](https://github.com/AMYPAD/CuVec)\n* [Apache Arrow](https://arrow.apache.org/)\n* [NATS.io](https://nats.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapposed%2Fappose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapposed%2Fappose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapposed%2Fappose/lists"}