in reply to multiprocess run-time data structure sharing in Mojolicious web app ...
Hi,
I don't understand "reload a metatable from UI ( to tell to the Application Layer to reload the meta-data)" ... does that mean that the update is triggered by a user client action?
Anyway it doesn't matter: yes, I think you should use Redis caching, and I don't think you have to make it as complicated as pub/sub. Just update the cached values in Redis when they change in the DB. If your Mojo workers persist for many requests, you can combine with a hynotoad -s restart, which would gracefully kill any serving requests and spawn new ones reading from the updated cached values.
Both Redis and the Perl Redis interface are very stable. We use them extensively in our busy Mojo apps at $work.
Edit: For multi-process data sharing in general, see MCE and MCE::Shared.
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: multiprocess run-time data structure sharing in Mojolicious web app ...
by YordanGeorgiev (Acolyte) on Jan 30, 2020 at 14:34 UTC | |
by YordanGeorgiev (Acolyte) on Feb 09, 2020 at 19:35 UTC |