Python functions as REST objects, with clustering, load balancing and state replication; no containers or orchestration.

0 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
HTTPS
https://gitstable.com/git/askrobots/dbbasic-object-primitive.git
SSH
ssh://git@gitstable.com:2222/askrobots/dbbasic-object-primitive.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

Dan Q Consolidate duplicate QUICKSTARTs on the top-level file 503f830 7 months ago History
__init__.py · 1.8 KB · 57 lines
1"""
2Object Primitive: A new computing paradigm.
3
4Where code, data, and execution are unified into network-accessible objects.
5
6The Object Primitive System provides:
7- Protocol-agnostic access (REST, gRPC, WebSocket, MQTT, 9P, etc.)
8- Implementation-agnostic execution (Python, C, Rust, GPU, ASIC)
9- OS-agnostic deployment (Linux, macOS, Windows, BSD, Plan 9, etc.)
10- Self-logging objects (objects log to themselves)
11- Automatic versioning (complete history)
12- Self-healing and resilient (designed for chaos from the start)
13
14Core Philosophy:
15- The endpoint is the eternal truth (business logic)
16- Everything else is swappable (protocols, implementations, storage, OS)
17- This is NOT an ORM (we isolate stability, not hide complexity)
18- We don't care what changes (vendors, hardware, protocols, databases)
19
20Example:
21 >>> from object_primitive import ObjectPrimitive
22 >>>
23 >>> # Define an endpoint
24 >>> def GET(request):
25 ... return {"result": process(request)}
26 >>>
27 >>> # Create object primitive
28 >>> obj = ObjectPrimitive("/myservice", GET)
29 >>>
30 >>> # Accessible via any protocol
31 >>> # - HTTP: curl http://server/myservice
32 >>> # - 9P: mount server:/endpoints /mnt
33 >>> # - WebSocket: ws://server/myservice
34 >>> # - MQTT: pub/sub to myservice
35
36Architecture:
37 The stable invariant (endpoint logic) sits at the center.
38 Three dimensions of abstraction surround it:
39 - Protocol (how accessed)
40 - Implementation (how executed)
41 - OS (where runs)
42
43 Write once. Access anywhere. Execute with anything. Run everywhere.
44"""
45
46__version__ = "0.1.0"
47__author__ = "Dan Q"
48__email__ = "danq@dbbasic.com"
49
50# Core exports (will be populated as we implement)
51__all__ = [
52 "__version__",
53 # Core primitives (to be added in Phase 1)
54 # "ObjectPrimitive",
55 # "EndpointLoader",
56 # "VersionManager",
57]