Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Andrew Bastien
    @volundmush
    What kind of approach are people taking to make a Riker application that involves networking?
    George Malayil Philip
    @georgemp
    Hi. are there any examples out there on how to send a message to an actor, and, await it’s response (perhaps, something similar to the one on actix with it’s Ping). I guess if i’m sending a message from an actor, i could include it’s address in the send, and, message a response back. But, what if i’m sending it from main etc?
    oh..i guess i’d use the ask pattern
    George Malayil Philip
    @georgemp
    if i send a message between two actors (say, add 2 + 2) - in order to handle the response (assuming, i do a send back from the compute actor to the asking actor), would my message necessarily also need to include a id of sorts? Wondering what would happen if i send two messages (2,2) and (3,3) one after the other? would the responses be sent back in order? thanks
    Daniel Olano
    @olanod
    @georgemp I haven't confirmed it yet(and perhaps you did already?) but my assumption is that because messages arrive to the letter inbox in order because you send them in order from the same place and from there are handed one by one to the handler, on the way back the same should happen and you would get things in order unless you do some async stuff when processing the messages
    George Malayil Philip
    @georgemp
    @olanod thanks..i ended up trying to just use tokio msg channels directly instead of Riker..might revisit it, if that doesn’t work out :)
    vepqrtx
    @vepqrtx_gitlab
    Is it possible to configure riker to use the Tracing logger? It seems that when I start my actor system it hijacks the logging away from Tracing?
    vepqrtx
    @vepqrtx_gitlab
    Also, is it possible with the built in config implementation to pull in environment variables? the Config crate supports this but it doesn't seem to occur in my testing.
    vepqrtx
    @vepqrtx_gitlab
    Also how do I compose async functions within riker actors?
    Isaac Trumper
    @itrumper_gitlab

    @olanod - did you ever find a way to run a future to completion from within an actor's recv method? Just using block_on results in the error

    cannot execute LocalPool executor from within another executor: EnterError

    and trying to use the ctx.run() method complains about a lifetime issue as the future that I'm trying to execute is a method on an S3 bucket client from rusoto. Thanks!

    Isaac Trumper
    @itrumper_gitlab
    Never mind, was implementing it incorrectly. The docs work as expected. The key was using the move keyword
    Isaac Trumper
    @itrumper_gitlab
    Annnnd I was wrong again. Even using the pattern defined by the docs doesn't work and I end up with the same error. @leenozara any advice?
    Isaac Trumper
    @itrumper_gitlab
    I'm thinking that part of the issue is that I'm using Riker within the Tokio runtime, which is why the error message complains about using an executor from within another executor
    Isaac Trumper
    @itrumper_gitlab
    Trying to use the tokio runtime errors with a specific error stating that I am not inside the Tokio executor (even though my main fn uses it...)
    Isaac Trumper
    @itrumper_gitlab
    For anyone else that has this issue, which is generally described as trying to use the Riker actor system within another runtime, you do need the top-level runtime to execute futures. So, when using the Tokio runtime, I needed to get a handle to it via tokio::runtime::Handle::current() and then pass this handle around to the actor system whenever an actor needed to be able to block on a future. Hope this helps others! I think this should be added to the docs, and if I get motivated I may submit a PR for this.
    shikazu
    @shikazu
    Hey! Can anyone give me a hint how i can achieve something like the remote actor feature, because it's mentioned but not implemented as far as I can say. I want to be able to split up the actors between multiple machines and maybe someone has already done that? Thanks!
    Jeon Wooje
    @kiwiyou
    Hello! I'm trying to make a web game using websocket and riker, but I can barely find any resources about how to connect them (e.g. feeding websocket messages into actors, using tokio runtime with riker because some of websocket crates depend on it). Has anybody tried to use websocket with riker?
    3 replies
    olexiyb
    @olexiyb
    Can someone with merge rights take a look into riker-rs/riker#145 request. Github actions much better then travis. Travis has contant problems and slow.
    Lee Smith
    @leenozara

    Version 0.4.2 is now available. Special thanks to @olexiyb and @nothingismagick for:

    • Updated to use stable dashmap
    • Fixed clippy and pre-commit errors
    • Migration from Travis to GitHub Actions

    Next up we'll be expanding on the migration to GHA to improve cadence with regards to code merges and version releases. Thank you to the team and community.

    [dependencies]
    riker = "0.4.2"
    nothingismagick
    @nothingismagick
    :wave:
    prassee
    @prassee
    curious to know about remote actors support
    prassee
    @prassee
    any one tried to communicate actors in two host via tokio
    nothingismagick
    @nothingismagick
    we are working on using libp2p-noise (XX flavor handshake) for remote actors (sort of like the ask pattern here: https://riker.rs/patterns/ )
    nothingismagick
    @nothingismagick
    (should say, with we, I meant an external group, not officially riker or anything.) hopefully tomorrow will have merged in the code and can share a link here.
    Rohan Sircar
    @rohan-sircar
    Hi, Riker looks to be great! It would be great to have the ability to model state machines though. I use Akka Typed to model state machines with Actors a lot in Scala.
    Linus Behrbohm
    @mankinskin
    Does anyone know what to do about 'there is no timer running, must be called from the context of Tokio runtime' when using Context::run? riker-rs/riker#150
    Norman Jefferies
    @njeff3_gitlab
    Hi I was wondering also about remote capabilities. Is it possible to have separate processes access one ( the same ) actor system?
    kporika
    @kporika
    how do we run riker under tokio runtime ?

    [tokio::main]

    async fn main() -> std::io::Result<()> {
    let rt = tokio::runtime::Handle::current() ;
    let sys = ActorSystem::new().unwrap(); // how do i add rt to the sys handle
    Linus Behrbohm
    @mankinskin
    @kporika See this issue riker-rs/riker#150
    Does anybody have a suggestion for how to access to an actor from a future spawned with Context::run? I would basically like to use self when running a future using ctx.run(async move { self.data = something().await; }) but of course that doesn't work. Can I use messages?
    Linus Behrbohm
    @mankinskin
    Using a message enum and myself.tell works
    shafqatevo
    @shafqatevo
    Hi everyone, quick question, what's the per-actor memory overhead in Riker? In Akka, for example, the overhead is said to be around 360 bytes. In Pony, the overhead is object+256 bytes.
    prassee
    @prassee
    is pony still around .... if so its good to know
    Jess Bowers
    @jessbowers
    Pony hasn't been updated since 2018
    shafqatevo
    @shafqatevo
    Pony community is steadily growing and they're doing some updates to the lang runtime with https://github.com/jemc/mare
    Bringing some ideas from Project Verona of Microsoft, where one of the Pony creators, Sylvan Clebsch is working on an evolution of Rust and Pony ideas.
    Isitha Subasinghe
    @isubasinghe
    Hey all
    Just a quick question
    Does anyone know how to have actors messaging each other (cycles)
    Rohan Sircar
    @rohan-sircar
    @isubasinghe You have to follow this pattern basically, but in Rust and with actor references -
    class A(var b: Option[B])
    class B(a: A)
    
    val a = new A(None) // instance of B does not exist yet
    val b = new B(a)
    a.b = Some(b) // update reference to B
    That's Scala pseudocode
    werner291
    @werner291
    :wave: Riker looks neat, gonna try it! Though, how can stop the main thread from terminating while the system is still running? All of the examples appear to simply have the thread sleep 500ms before exiting. Is there some kind of sys.hold_until_done()?
    Isitha Subasinghe
    @isubasinghe
    @rohan-sircar Thankyou I will use that pattern
    Rohan Sircar
    @rohan-sircar
    @isubasinghe let me know if you face any problems
    Fernando Hackbart
    @fernando.hackbart_gitlab
    Hello, I am starting with Riker (and Rust) but have some experience with Akka, I am trying to create an actor from within another actor, but not figuring out how to obtain the actor system (normally in Scala we inject it as an implicit variable), do I need to pass the actorSystem reference to the actor that needs to create actors as propoerties? Thx.
    Fernando Hackbart
    @fernando.hackbart_gitlab
    I think I found it &_ctx.system.
    Tyler Jones
    @ghalsk:matrix.org
    [m]
    How do you know what the response type is for a given message and actor?
    Tyler Jones
    @ghalsk:matrix.org
    [m]

    https://riker.rs/faq/

    Riker Cluster is currently in development

    Where is this being developed? I dont see a branch for it the main riker repo, and I havnt found a riker-cluster repo, nothing in riker-patterns/branches

    Tyler Jones
    @ghalsk:matrix.org
    [m]
    Also, where are the configuration options for the actor system documented?