Giter Club home page Giter Club logo

Comments (2)

slawlor avatar slawlor commented on August 13, 2024

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
  1. 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 unlike actix we don't have a "context" here which can interact with.
  2. For a database actor, we already are async handlers so you should be good-to-go out of the box
  3. Since tauri is built on tokio it "should" work fine. But I'm not that familiar with tauri so you'd need to try it.
  4. 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 a JoinHandle which you can await on within the normal tokio Task inside the actor's handler. The linked examples from tokio show waiting on a blocking task without blocking the high-performance threads.
  5. We have ActorRef<TMessage> (after the open PR merges #89)

from ractor.

uwejan avatar uwejan commented on August 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.