in reply to Re: LWP::UserAgent non-blocking calls
in thread LWP::UserAgent non-blocking calls

This is for a modular framework with a webserver and configurable workers. The workers automatically have database connections and Net::Clacks access.

The workers and non-forking, single threaded. And i prefer to keep it that way to simplify development and debugging. And no, using something like redis is definitely not an option, a lot of my stuff runs on embedded cash registers that only sport 4-8 gigs of RAM...

PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
Also check out my sisters artwork and my weekly webcomics
  • Comment on Re^2: LWP::UserAgent non-blocking calls

Replies are listed 'Best First'.
Re^3: LWP::UserAgent non-blocking calls
by bliako (Abbot) on Oct 22, 2024 at 09:42 UTC
    This is for a modular framework with a webserver and configurable workers.The workers automatically have database connections and Net::Clacks access.

    That's great. You already have a database and a communication bus, exactly what functionality redis/D-Bus, in my suggestion, would have provided. The crucial question is why, if and when the workers block (as workers do regularly block), the whole system blocks? I would decouple the workers from the "system", whatever that is, even more. Use the bus to send requests to the LWP worker (edit: LWP worker script) which posts its response, when it comes, to the bus+db and poll the bus (non-blocking) at the supervisor. I guess it is simpler for me to say these than to implement or adjust an already implemented system.