phasm-platform/ARCHITECTURE.md
Johan B.W. de Vries 90531a5b99 Idea
2023-04-10 16:31:51 +02:00

29 lines
799 B
Markdown

Controller (master)
Worker (minion)
API
Find a way to send typed data between instances
- As long as we match the types, we can copy the data
```py
from platform.http import SimpleRequest
#class SimpleRequest:
# method: bytes
# domain: bytes
# path: bytes
# query: bytes
# body: bytes
@exported
def handle_message(namespace: bytes, topic: bytes, kind: bytes, body: bytes) -> None:
SimpleRequest(b'GET', b'www.google.com', b'some/path', b'query=value', b'').send()
```
Preferably, the above automatically breaks it into an async function.
Possibly, everything async in Phasm is waiting for something to be delivered from the platform?
If this thing gets integrated as much as possible, then `from x import y` will get Phasm to talk to the server to get its type information.