doubts-----Original Message----- From: Christopher Lenz [mailto:[EMAIL PROTECTED] Sent: 18 October 2003 21:55 To: Cactus Developers List Subject: Re: Use HTTP header instead of unique ID?
Vincent Massol wrote:Nick has started a unique id generator to support execution of concurrent cactus tests. However, there might be a better solution: return the test result in an HTTP header in the same HTTP response.
There might be issues with this solution. I think that I had somenow...about this in the past but I can't recall any good reason right:-)
How would we pass an exception thrown on the server side back to the client? That's really the only reason I see why we have two requests currently.
What is the problem of passing the exception in a header? It is a string.
But the exception includes a stack trace, which is pretty long, and includes newlines that need to be escaped. I.e. it's not something you'd put in a header normally.
More importantly, there's the problem of *when* the exception header is added to the response. If the error occurs when the response headers have already been committed, we have a serious problem, because there's no way to pass the exception back to the client.
If it works, it will solve several issues: - prevent 2 HTTP requests which will be faster
BTW, our primary speed problem is that these 2 requests are also 2 connections. The keepalive plan-item should help a lot here.
(the- support use cases where people using cactus have a load balanceralsosecond request to get the test result is balanced on another server)
If two requests are made with the same session, they should get processed by the same server (a spec requirement IIRC). So we couldmaintain the session (if created) between the two requests.
That would only work with sticky load balancers but we don't want to assume anything.
AFAIK that's a basic assumption of the servlet spec.
Given the requirement that we don't want to require the creation of sessions, and assuming that it is impossible to switch to a single-request model (see above): wouldn't the problem with clustering also be solved by assigning a unique ID with every test? I think it would.
-chris
-- Christopher Lenz /=/ cmlenz at gmx.de
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
