Comments (2)
So there's a lot here, and if you find an answer isn't clear, let me know and I'll try and clarify it.
ractor
is fully async-await in it's handlers, including startup and shutdown routines- As you mentioned, we do have supervision but probably a bit of a different syntax than
actix
from my understanding
- For web-sockets style use-case, we would create child actors which are each responsible for read and write separately. The parent actor is then your multiplexor, so you interact with that for fully-structured frames (or objects if you want to handle serialization in those layers). An example is our network session handler in
ractor_cluster
. This could probably be added as a wrapped helper, but unlikeactix
we don't have a "context" here which can interact with. - For a database actor, we already are async handlers so you should be good-to-go out of the box
- Since
tauri
is built ontokio
it "should" work fine. But I'm not that familiar withtauri
so you'd need to try it. - So for thread-blocking work, I'd recommend using
tokio::task::spawn_blocking
to push onto CPU-bound tasks to not block the main runtime executor. This yields aJoinHandle
which you can await on within the normaltokio
Task inside the actor's handler. The linked examples from tokio show waiting on a blocking task without blocking the high-performance threads. - We have
ActorRef<TMessage>
(after the open PR merges #89)
from ractor.
Hey @slawlor Thank you for taking a look into this.
Indeed too much going on, I am going to do some testing, and wait the mentined PR mergs.
The issue can be closed. I should come back in case of questions.
Thank you once again.
from ractor.
Related Issues (20)
- How to communicate between local actors and remote actors across hosts using ractor? HOT 1
- quickstart bugs HOT 1
- protobuf-src build requires autotools, which is not available on windows (by default) HOT 4
- bug in monte_carlo example HOT 2
- SpawnErr is misleading HOT 3
- Bidirectional linking can cause stack overflow on actor shutdown
- `CallResult` should return errors that occured handling the message HOT 2
- Add `Scope`-> `GroupName` mapping HOT 3
- Mod Driver Aplikasi Fake GPS HOT 1
- About section needs update for async-std
- Support `async fn` in traits. HOT 1
- Request for TCP Echo Server Example with TcpListener and TcpStream as Actors HOT 1
- Enum contains type of itself HOT 4
- Add support to downcast a BoxedMessage to get a reference to it's wrapped type without consuming it HOT 4
- When panic=abort is on, panic is not captured. HOT 1
- Lifetimes do not match method in trait HOT 2
- Subscriber-Driven OutputPort Subscriptions
- Enhancing OutputPort Backpressure Handling via RecvError::Lagged Management and Buffer Configurability HOT 6
- `post_stop` of children are being called when supervisor fails. HOT 1
- Not depend protobuf-src on windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ractor.