Skip to content

Consider extending to the stateful case #2

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

Open
eslick opened this issue Mar 7, 2014 · 3 comments
Open

Consider extending to the stateful case #2

eslick opened this issue Mar 7, 2014 · 3 comments

Comments

@eslick
Copy link

eslick commented Mar 7, 2014

This is a great little library, but my use case involves a stateful worker with a simple channel into the web worker with messages coming back. It would be nice if you had a facility for standalone servants (butlers?:) that had more autonomy. The same calling convention might work, or a pair of core.async channels for input/output. LIke Brenton's recent example with Pedestal App.

@MarcoPolo
Copy link
Owner

You could probably make another 1 web worker servant pool, and interface just like before. Since you'd only have one webworker you could safely keep state.

Would that work?

@eslick
Copy link
Author

eslick commented Mar 10, 2014

I think that would work. However, maybe a pool of named servants? The name would be used to uniquely identify a worker that maintained a particular kinds of state and would be started with a standard call to a specific function that would set it up. Typical usage, of course, would be a single worker that maintained local state but was part of the same script. I ended up going in a different direction due to the tooling assumptions baked into Pedestal (build a separate custom script for each worker).

@MarcoPolo
Copy link
Owner

Contributions to add this in are welcome btw, I might not get a chance to add this for a while. I'm just adding things that I need.

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

2 participants