Appose Documentation
Appose is a library for interprocess cooperation with shared memory. The guiding principles are simplicity and efficiency.
Appose was written to enable easy execution of Python-based deep learning from Java without copying tensors, but its utility extends beyond that.
Key Features
Zero-copy tensor sharing via shared memory
Simple API with minimal dependencies
Multi-language support - Java, Python, and more
Asynchronous execution with callbacks for status updates
Environment management - build isolated environments with dependencies
Flexible architecture - supports custom worker implementations
Quick Example
import appose
env = appose.system()
with env.groovy() as groovy:
task = groovy.task("5 + 6")
task.wait_for()
result = task.result()
# result == 11
Environment env = Appose.system();
try (Service python = env.python()) {
Task task = python.task("5 + 6");
task.waitFor();
Object result = task.result();
// result == 11
}
How Appose Works
The workflow for using Appose follows these steps:
Build an Environment with the dependencies you need
Create a Service linked to a worker process
Execute scripts on the worker by launching Tasks
Receive status updates from tasks asynchronously via callbacks
User Guide
- Getting Started
- Core Concepts
- Examples
- Python Environment Best Practices
- Choosing an Environment Manager
- Pixi: Single-Platform Quickstart
- Pixi: Multi-Platform Configuration
- Pixi: CUDA Feature Pattern
- Pixi: Apple Silicon and the
nometalPattern - Combining Features: Dev + CUDA
- Using a
pixi.tomlwith Appose - Detecting GPU Availability at Runtime
- Complete Example: TensorFlow Worker
- Summary of Best Practices
- Capturing Output
- Worker Protocol