-
Notifications
You must be signed in to change notification settings - Fork 39
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
Load workers dynamically #175
Comments
After starting working on this issue, I noticed some challenges here. Currently, we're registering specific routes for every worker and use the Then, I added a For this reason, I had to invert the approach. Now, I plan to register all the static files in specific routes and then, use the All this complexity comes from the fact that we're also supporting "pretty" routes in the What do you think @ereslibre? |
Why we cannot continue following this approach? Routes would be the discovered ones from the filesystem, plus the ones registered through the API. We might error out if an API call tries to register a path that clashes with an existing one, be it a discovered one or a previously registered path.
If there is no other way, we can serve the public folder at I think it would be great to have a diff to discuss on for being more specific. |
The problem is the route collision. Currently, this is the chain we have:
We cannot register new routes in actix after the server starts. For that, we need to rely on a
This simplifies the approach, but limits the usability of the
Sure, let me open a draft and we can continue the discussion there 👍 |
Is your feature request related to a problem? Please describe.
When you start Wasm Workers Server, it retrieves all the workers in the given location (remote Git repo or local folder). After this initialization, it cannot add new workers on the fly and it requires you to restart the entire server.
Since we have an administration panel (#167), it would be nice to allow creating new workers on the fly or even edit existing ones. This is also related to the ability of "watching" running workers and reloading them (#157)
Describe the solution you'd like
I would like Wasm Workers Server to load new workers dynamically. Instead of a static list of
Routes
and a fixed set of URLs, thewasm_handler
should receive any request that was not managed by other handler. Then, it iterates over theRoutes
and find the one that can reply it. TheRoutes
struct must be mutable, so we can add new workers / routes under demand.That approach opens new uses cases like the ones mentioned above.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: