But I'm not looking for anything database-like, I want to make a server that has a large hash of bit::vectors and serves information about that collection. Hence I need access to an instantiated variable with instantiated objects. The counter was just a simple example to demonstrate the problem with implementing this with starman.
So I should either find out how to share it between workers, or I should find some single process solution perhaps.
Kind regards, Arjan.
Op vrijdag 17 augustus 2012 18:49:30 UTC+2 schreef Nuba Princigalli het volgende:
Static data can be shared by initializing them on the parent process (inside your app, with --preload-app option) and then referenced safely via the workers, but you can't update the data in the parent without using some kind of IPC mechanism. It's not just a problem with Starman it's a generic thing with forking multi processes.
> But I'm not looking for anything database-like, I want to make a server that has a large hash of bit::vectors and serves information about that collection. Hence I need access to an instantiated variable with instantiated objects. The counter was just a simple example to demonstrate the problem with implementing this with starman.
> So I should either find out how to share it between workers, or I should find some single process solution perhaps.
> Kind regards,
> Arjan.
> Op vrijdag 17 augustus 2012 18:49:30 UTC+2 schreef Nuba Princigalli het volgende:
> Hi Arjan,
> Static data can be shared by initializing them on the parent process > (inside your app, with --preload-app option) and then referenced safely via > the workers, but you can't update the data in the parent without using some > kind of IPC mechanism. It's not just a problem with Starman it's a generic > thing with forking multi processes.
> -- > Tatsuhiko Miyagawa
> On Aug 19, 2012, at 3:51 PM, arjan wrote:
> Hi Nuba,
> Thanks, I know redis, it's really cool.
> But I'm not looking for anything database-like, I want to make a server that has a large hash of bit::vectors and serves information about that collection. Hence I need access to an instantiated variable with instantiated objects. The counter was just a simple example to demonstrate the problem with implementing this with starman.
> So I should either find out how to share it between workers, or I should find some single process solution perhaps.
> Kind regards, > Arjan.
> Op vrijdag 17 augustus 2012 18:49:30 UTC+2 schreef Nuba Princigalli het > volgende: