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

[Agents] Components cannot receive initial state when connecting to non-worker agents #1127

Closed
jstarry opened this issue Apr 25, 2020 · 4 comments
Labels
A-yew-agent Area: The yew-agent crate feature-accepted A feature request that has been accepted and needs implementing feature-request A feature request

Comments

@jstarry
Copy link
Member

jstarry commented Apr 25, 2020

Is your feature request related to a problem? Please describe.
Non-worker agents cannot respond to a connection directly

Describe the solution you'd like
New trait for synchronous non-worker Agents which allows agents to respond immediately when it's connected to.

@jstarry jstarry added the feature-request A feature request label Apr 25, 2020
@Follpvosten
Copy link

Follpvosten commented May 8, 2020

I would be very much looking forward for such a trait!

Currently, an (admittedly very small, nitpicky) downside of using Agents for managing shared component state is that every message is getting serialized, which theoretically wouldn't be required if everything's running synchronously on the main thread (if I got that right).
So removing the Serialize/Deserialize bound on Input and Output could be another potential benefit of this, along with a very small performance improvement that might come with that.

@jstarry jstarry changed the title [Agents] Non worker agents cannot respond to connection / msg synchronously [Agents] Components cannot receive initial state when connecting to non-worker agents May 15, 2020
@happysalada
Copy link

Does the title of this issue mean that there is a way for a component to receive a state when connecting to a worker agent?

I have been looking for a way to have a synchronous connection, exactly for the purpose of receiving initial state. I couldn't find anything, in the examples and the code that would enable a worker agent to do this.

to be clear, I looked at the multi-threaded and the pub_sub example.

I would be keen on adding an "Initial state from agent" example if I knew where to begin.

@jstarry
Copy link
Member Author

jstarry commented Jul 24, 2020

@happysalada there isn't currently a way. But it would be a very nice feature to add!

@mc1098 mc1098 added A-yew-agent Area: The yew-agent crate feature-accepted A feature request that has been accepted and needs implementing labels Sep 20, 2021
@ranile
Copy link
Member

ranile commented Jan 2, 2022

Non-worker agents are gone as of #2295

@ranile ranile closed this as completed Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew-agent Area: The yew-agent crate feature-accepted A feature request that has been accepted and needs implementing feature-request A feature request
Projects
None yet
Development

No branches or pull requests

5 participants