ietf-openproxy
[Top] [All Lists]

Re: P: single assignment semantics

2003-10-29 13:31:04

Alex Rousskov wrote:
Thus, depending on the design, a proxy may continue to read response
body while the service is doing its thing and the interpreter instance
is waiting.

In fact, in most cases, a complete body will _not_ be available at any
single time -- it is just too big to cache (the service can cache the
body if it needs to, but the proxy may not).

I agree and that's in fact why I think P programs should not be allowed to reference message bodies. In my opinion, P programs should only serve as high-level filters that invoke OPES services based on message header values (e.g. HTTP content-type) and maybe system and environment variables (e.g. system time). If a P program triggers the execution of a service, then the service logic within that service can evaluate all message properties including the message body to determine if there is a need to process the message. I don't think it's a good idea to move that kind of service logic into P programs. By restricting P programs in this way we would also render the copy vs. reference question essentially a non-issue simply because we can assume that message header values are always small and copy operations would not have a significant performance impact. I would therefore favor the 'programmer-friendly' constant approach over the macro approach or any combination thereof.

-Andre