easysoa/EasySOA — Issue #73: Message API : store and reuse for replay & simulation
Author: mdutoo
Created: 2011-12-01 12:07:03+00:00
State: open

Store HTTP exchanges using monit's Message API, then use it for simple replay and simulation, then in parallel improve it according to the following uses and prototype these uses.

HTTPMonit / Servlet : forward(Message), discoverService(Message), record(Message), monit(Message, conf)
WS/RSMonit / CXF : discoverService(), record(), monit() on Message ; AND / OR on Object ?
ArchivedExchangeStore.store(Message), store(decoratedMessage)

DefinitionInferrer : inferDefinition(restMessages)

All components below rely on message contents (req, res, other ex. timings) having a model able to load & parse them and address (get/set) primitive value elements within. This model can rely on the (possibly inferred) definition, but not necessarily (ex. in req/res body, xpath or jsonpath is enough). Definition is mostly useful for working WITHOUT sample messages (by allowing to generate some, like SOAPUI does ; or to select an element / field).

The best client is always the actual client application. By listening to its exchanges, it allows to input service parameters, but also select a field by inputting a well known value.

ImplicitCorrelator : correlate(Messages, env, conf{ valuesToLookFor }) return correlatedFields
Correlations : reqResCorrelation, envCorrelation (IP / host), conf(ex. userInputValue)Correlation, (, apiCodeCorrelation)
Decorator : decorate(Messages, correlatedIdentifyingFields, correlatedSegmentingFields)
Asserts : (schemaAssert, ) correlatedFieldAssert, contains/regexpAssert, templateAssert, (codeAssert,) slaAssert
Templatizer : (re)templatize(Messages, correlator : correlatedIdFields, variables : someCorrelatedFields, asserts : someOtherCorrelatedFields)
TemplateEditor : setEditable/load/edit/save(reqOrResTpl)

ReplayTemplatizer : many templatize()
TemplatizedExchangeStore : store(PlayableMessages)
ExchangeReplayClient.replay(env, one PlayableMessage { reqTpl, correlationsBesidesReqRes, asserts }, env(, userOrConfParams)), .start(DefinitionFieldChooser, CorrelationFieldChooser)

SimulationTemplatizer : many templatize()
ExchangeSimulator.start(set of PlayableMessage { correlator, resTpl, variableCorrelationsBesidesUserInput }, env(, confParams) ), .start(DefinitionFieldChooser, CorrelationFieldChooser)
ExchangeReplayClientStore, ExchangeSimulatorStore ?