Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from JSON to declarative language #1

Open
masp opened this issue Jun 28, 2022 · 0 comments
Open

Switch from JSON to declarative language #1

masp opened this issue Jun 28, 2022 · 0 comments

Comments

@masp
Copy link
Collaborator

masp commented Jun 28, 2022

Right now to describe a process pipeline you define a JSON "hoser" file that basically defines a static graph of processes connected by links. The problem is the static nature of it prevents it from being easily used on a CLI to debug and modify the graph in real time, which could be very useful for human interfaces (and monitoring tools).

Instead, let's switch the runtime to using one, declarative language that looks like:

VAR {"name": "stdin"} # Starts unbound
VAR {"name": "stdout"}
START {"name": "grep0", "proc": "grep", "argv": ["-f", "cats"]} # Start grep process (no inputs/outputs yet)
START {"name": "grep1", "proc": "grep", "argv": ["-f", "dogs"]} 
LINK {"src": "stdin", "dst": "grep0[stdin]"} # Connect inputs/outputs
LINK {"src": "grep0[stdout]", "dst": "grep1[stdin]"}
LINK {"src": "grep1[stdout]", "dst": "stdout"}

This declarative logic makes it simpler to compose programs and to extend pipelines after they've been created dynamically is also much simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant