Currently we are saving all SOAP requests to a log file (rolling, one per day). When I get a request about who did what, when, how often etc - then I need to resort to heavy duty text manipulation in order to extract that information. My idea was to save those SOAP requests to a database where I could perform some queries.
A SOAP request consists of a header and an envelope. Within the header is the username of the one invoking the action. Within the body of the envelope, the first element is the WS method name, followed by all the parameters to the method. Each WS method obviously has different parameters:
- SOAP request
- Envelope
- Header
- Username = XXX
- Body
- WS name
- WS Parameters (different between methods, hierarchical)
- WS name
- Header
- Envelope
I'd like to construct queries like these without too much difficulties:
- Which WS methods has user XXX invoked within certain period
- How often was a each WS method called
- Show me all requests made to WS XXX where a particular parameter to the WS was YYY (e.g. every call the "changeParty" where the partyId = 123)
Is this something that would be ideally suited to a "Document store type of database" / NoSQL, such as CouchDB/MongoDB? Would this be hard to set up? Any alternative suggestions / recommendations / thoughts?
Thanks!
EDIT:
- In most cases I think I'd be fine with an index on: user, WS method, requestDate. Any other field would probably not be indexed (although I would do some filtering on them). As it is for auditing purposes only, it wouldn't have to be lightning fast.
- I was thinking about putting NoSql server on the monster app-servers that we have and give the "real underlying" database (DB2) a break from any kind of logging as it is in pretty heavy use.