Development > Coding and development discussion

Some thoughts about a new structure

<< < (2/2)

Alreadythere:
The idea is just to reduce the number of php instances running. This would mean you could go down to one window, but in my plans I don't want to mess in any way with the current structure of the log files.

About modules loading/unloading: I'm not sure if it is possible to reload class definitions, I think we'd always end with a "Class already defined" fatal error if we try. That's assuming we find a reliable way to load the same file in different versions. So to get a new version of the same module working you would have to restart the whole php instance. Which would mean all bots managed by that BotManager instance. Loading new module files in an already running bot should be possible though.

Khalem:
Reducing the number of PHP instances running alone is worth the change ;)

Having a bot manager will also open up other avenues that could be fun, including allowing external management, be it a web interface or a windows/linux GUI app.

As for the the lack of process forking on Windows, we already detect if we are running on windows or not, and if there are real benefits to it, it would be worth allowing linux users to take advantage of it. Forking would be a necessity if we where to do external management for example.

One important thing in all this would be what happens with the bot manager and the other bots if one of the bots crashes if it's the same process versus being a child of the bot manager?

Alreadythere:
Afaik with fork only the child process crashes on a critical error. So I think it would be the same with the php version, though I've never tested it. If all is running in the same process without any childs all bots managed by that instance of the BotManager will crash. At least I think that would be the case. Guess I should test it sometimes.

Normal disconnects or shutdowns wouldn't be a problem though.

Navigation

[0] Message Index

[*] Previous page

Go to full version