thekid/rfc — Issue #72: RFC 0072: Initialization and Interrupts of ServerProtocols
Author: thekid
Created: 2011-10-09 14:52:37+00:00
State: closed
Labels: implemented, rfc

Scope of Change
====
peer.server.Server classes will call the additional protocol method
initialize().

Rationale
====
Certain protocols may need setup logic.

Functionality
====
New method in ServerProtocol interface:

```php

```

The initialize method of the protocol will be called on start of the process,
e.g. in peer.server.ForkingServer and PreforkingServer everytime a child is
forked.

Security considerations
====
n/a

Speed impact
====
Little.

Dependencies
====
- ListenerWrapperProtocol will be changed to implement initialize().

Related documents
====
- http://experiments.xp-framework.net/?arena,peking
Experiment

Comments
====
- gellweiler, Tue Sep 12 15:45:59 CEST 2006
The method names should be discussed. Currently there is only
an implementation for peer.server.PreforkingServer in
http://experiments.xp-framework.net/?arena,peking,peer,server/PreforkingServer.class.php

- friebe, Wed Sep 13 14:19:51 CEST 2006
initialize() is OK, though I think it should be complemented by a
finalize() method. In addition, I think it would be benefitial to
make these optional (e.g., by adding an additional interface called
Initializable).
I don't especially like the idle() method, which is called
"sporadically" - non-deterministic, in other words.

- friebe, Tue Oct 24 17:32:14 CEST 2006
Implemented the initialize() part of this RFC.