in reply to Re: Registering various app states at run-time
in thread Registering various app states at run-time

Well, it is a network server and already finished. I want to add this feature so that I can monitor it all the time with some second app. (Currently, server is writing errors and warnings to a log file.) I am considering using a Net::Shared module.
  • Comment on Re^2: Registering various app states at run-time

Replies are listed 'Best First'.
Re^3: Registering various app states at run-time
by salva (Canon) on Feb 13, 2006 at 13:28 UTC
    Net::Shared doesn't look like a good option to me. Looking at its source code I have found that it forks a new process that acts as a TCP server that is where state is maintained. The problem is that it is a blocking server an so, any stalled connection will cause your full server to stall.

    Besides that, the overhead could be actually higher than that of just writting the state to disk.

    Other modules like IPC::Shareable using shared memory should be a better option.

      > Net::Shared doesn't look like a good option to me
      I agree. I ran it's example programs and the client dies all the time with the message "Address already in use at ssrpt_c.pl line xx".

      I will try your suggestion.
      Thanks!