Skip to main content

Transparent remote object proxying

Project description

Invisibles

Transparent remote method invocation. Same object, same usage, different location.

What It Does

You have an object. You want to move it to another process, another node. The code that uses it doesn't change.

# Local
result = service.add(5, 3)
data = await service.fetch("key")

# Remote - identical
result = proxy.add(5, 3)
data = await proxy.fetch("key")

Sync methods stay sync. Async methods stay async. The proxy matches the remote object's API exactly.

Architecture

Two connection channels, each doing what it's good at:

  • Sync connection - reentrant serving pattern, handles sync methods and protocol operations
  • Async connection - message pump with asyncio futures, handles async methods natively

Both share a Protocol instance that manages boxing, dispatch, and proxy creation. See docs/architecture.md for details.

Key Concepts

  • Service - any Python object exposed remotely, no base class needed
  • Connection - per-client RPC channel (sync or async), wraps netkit transport
  • Proxy - client-side transparent handle, created automatically during unboxing
  • Protocol - shared RPC state: boxing, dispatch, object registry, proxy caching
  • Dispatcher - how sync method calls are run (inline, threaded, or shared)

Deployment Scenarios

Object type Clients Execution Setup
Sync, not thread-safe Single Serialized SyncServer + InlineDispatcher
Sync, not thread-safe Multiple Serialized SyncServer + SharedDispatcher
Sync, thread-safe Multiple Parallel SyncServer + ThreadedDispatcher
Async / Mixed Any Async on server loop SyncServer + AsyncDispatcher

See docs/scenarios.md for the full matrix.

Python Protocol Support

Works transparently over RPC:

  • Method calls (sync and async)
  • Attribute access
  • Iterators and generators (for x in proxy)
  • Async iterators (async for x in proxy)
  • Context managers (with proxy)
  • Async context managers (async with proxy)
  • Operator overloading (+, -, *, [], in, len, etc.)
  • Callable objects (proxy(args))
  • Exception propagation (including custom exception classes)
  • Nested objects (methods returning objects that are themselves proxied)

Docs

License

Apache-2.0 - See LICENSE.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invisibles_py-0.1.0.tar.gz (97.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invisibles_py-0.1.0-py3-none-any.whl (78.6 kB view details)

Uploaded Python 3

File details

Details for the file invisibles_py-0.1.0.tar.gz.

File metadata

  • Download URL: invisibles_py-0.1.0.tar.gz
  • Upload date:
  • Size: 97.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for invisibles_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 77401a37fd4e8b82e8ce31d69bb2f03a5c2472a5e8c85d9d472ccf13ca977a6a
MD5 6c170f3b8e70dd2b4c59e8b183179579
BLAKE2b-256 a6577fb130a327faa3dcfdf40402e94639e9c791c93838b7979380fda4b5ee41

See more details on using hashes here.

Provenance

The following attestation bundles were made for invisibles_py-0.1.0.tar.gz:

Publisher: publish.yml on nustackdev/invisibles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file invisibles_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: invisibles_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 78.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for invisibles_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0383de804a300972848ea7e9caaa2d1308ba661c9fda17fba26cbdd73655e1c0
MD5 099f8464a3de45495fde424f36e0f8ac
BLAKE2b-256 1f7d301d3295e1cf211355e0f1a2dd2b8344e77861cac9f6e87efc1921bf9485

See more details on using hashes here.

Provenance

The following attestation bundles were made for invisibles_py-0.1.0-py3-none-any.whl:

Publisher: publish.yml on nustackdev/invisibles

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page