-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Multi-threading, concurrency, agents #272
Conversation
Would it be feasible to utilize actix in Yew for this? |
@kellytk I've tried to use actix in the first attempt, but it tied with tokio and uses a little different approach. |
@deniskolodin just FYI, i am planing to split actix into two packages. actix-core will depend on only on futures. and actix will provide tokio integration. |
@fafhrd91 Thank you for bringing Erlang world to Rust! I like it! 💪 I use your framework a lot and it will be great to make some improvements for make it suitable for this framework. I replaced a context with a link to an environment. I feel it's better, because developer doesn't need to carry the reference everywhere. For me it also will help to use the same code for different parties. Regarding After: Anyway I used some similar structs like actix, Thank you for the information about |
I can not remove |
@deniskolodin the changes introduced here appear to move Yew towards an ECS design, is that correct? |
To avoid conflicts with the same name of an implementation
@kellytk It's similar to ECS approach, but actually it closer to CSP. Like with Erlang: a process is not an entity of "physical world", but it an entity who does part of its job. In other words: the actor is not an a record in a database, it's a handler which services database interaction completely. |
Workers become more compact with simple type specification.
To store that id to sets.
bors r+ |
272: Multi-threading, concurrency, agents r=DenisKolodin a=DenisKolodin This is a series of bold experiments and I really love 💓 this PR. It makes this framework a **multi-threaded** (it's not a joke) and brings actors model everywhere. Now your yew frontend-apps will be more _Erlang_ or _Actix_ apps like 🚀 Also, I've removed a context. Completely! Components simplified. Now it's an actor which you could connect to and interact with messages. Other benefit is your components could interact each other #270 Since this PR will be merged the framework turned into multi-threaded concurrency-friendly frontend framework. Sorry me for buzzwords overload ) It still need Routing #187 and fixes of the most issues. I'll get to that. But extra benefit of this PR: it fixes major emscripten issues #220 Remaining: - [x] Add CHANGELOG.md - [x] Update README.md - [x] Create issue: Send `Connected` notification for `Private` agents (#282) - [x] Create issue: Send `Connected` notification for `Public` agents (#282) - [x] Create issue: Implement `Global` kind of agents (based on `SharedWorker`) (#283) - [x] Create issue: Add components interaction example (#284) Co-authored-by: Denis Kolodin <deniskolodin@gmail.com>
Build succeeded |
FWIW I've found Riker, which apparently is not coupled in that way. |
This is a series of bold experiments and I really love 💓 this PR.
It makes this framework a multi-threaded (it's not a joke) and brings actors model everywhere.
Now your yew frontend-apps will be more Erlang or Actix apps like 🚀
Also, I've removed a context. Completely! Components simplified. Now it's an actor which you could connect to and interact with messages.
Other benefit is your components could interact each other #270
Since this PR will be merged the framework turned into multi-threaded concurrency-friendly frontend framework. Sorry me for buzzwords overload )
It still need Routing #187 and fixes of the most issues. I'll get to that.
But extra benefit of this PR: it fixes major emscripten issues #220
Remaining:
Connected
notification forPrivate
agents (Send Connected notification for Private and Public agents #282)Connected
notification forPublic
agents (Send Connected notification for Private and Public agents #282)Global
kind of agents (based onSharedWorker
) (Implement Global kind of agents (based on SharedWorker) #283)