Replies: 1 comment 4 replies
|
@aslakknutsen and myself have been discussing this recently. One option that came up was indeed adding a Now, I think it's important to differentiate between what possibly " |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
Praxis constructs pipelines synchronously but has no asynchronous phase for preparing pipeline-scoped resources before serving traffic.
For example, a Praxis AI pipeline may use PostgreSQL to store and rehydrate OpenAI Responses. Today, the listener can start and report Ready before the store connects. The first request may then discover invalid credentials or an incompatible schema and fail during request processing.
Lazy initialization also adds first-request latency and can race across concurrent requests. Application-specific startup logic cannot fully solve this because Praxis core owns dynamic pipeline reload and publication.
Proposal
Add an asynchronous activation phase between pipeline resolution and publication:
On startup, activation must succeed before listeners serve traffic. Failure prevents startup.
On reload, replacement pipelines for existing listeners must activate before being swapped into service. Failure discards the replacements and leaves the current pipelines operational.
--validateand--dumpresolve pipelines without running activation or accessing activation dependencies.Activation is pipeline-scoped, not an
HttpFilterorTcpFilterlifecycle method. The immediate consumer is PostgreSQL-backed storage in Praxis AI.Database schemas, migrations, request-time retries, and unified state management are separate concerns.
Example
A Praxis AI pipeline uses PostgreSQL to store and rehydrate OpenAI
Responses.
Today, the listener can start before the store connects. Kubernetes
reports the pod as Ready, but the first request discovers that the
credentials are invalid or the schema version is incompatible and
fails during request processing.
With pipeline activation, Praxis connects and validates the store
before publishing the pipeline. Invalid credentials fail startup; on
reload, they reject the replacement while the existing pipeline keeps
serving.
Related
All reactions