Cactus v2

This page is for discussing the Cactus v2 architecture proposal.

Status (13/02/2004)

Socket listener vs passing parameters to server side

There's a need to reconcile test code that is executed on the client side and test code executed on the server side. In other words a test that starts on the client side needs to be continued on the server side. There's also a need to pass back test result from server side to client side.

There are 2 options for doing this:

There are pros and cons of each approach:

Feature

Socket listener

Parameter-passing

Genericity

yes

no (depends on the protocol)

Concurrent tests

no

yes

My preference goes to the Socket listener solution. I wish we could find a way to make it work for concurrent tests. -- VincentMassol

Why won't socket listener work for multi-threaded tests? --NickLesiecki I have answered on the Cactus mailing list. Should this question be removed? -- VincentMassol

CactusTestSetup vs Static variables

In order to load configuration parameters + setup the socket listener we need to have some initialization code. There are 2 possibilities:

Both have pros and cons. However, the biggest drawback for the first solution (CactusTestSetup) is that it does not offer a solution on the server side (there is no JUnit Test Runner on the server side). Thus for the server side, there is only a single generic solution I can imagine: using a generic Aspects to intercept Cactus user-defined Aspects and using a static variable to remember if the Cactus system has already been initialized. Note that using Java system properties would be enough for passing configuration data but not enough for a proper initialization phase (which is needed for example if we're using a component-based approach like PicoContainer). The other problem with the TestSetup solution is that it is more complex for Cactus users who need to wrap all tests in a test suite.

Thus, I think the Aspect initialization is probably the best route. Any other idea? -- VincentMassol

Cactus2AlternatePropsoal -- ArchimedesTrajano

Cactus2Proposal (last edited 2009-09-20 23:55:40 by localhost)