How to share adaptation state among transactions?

Asked by Neil Dave' on 2011-06-02

ECAP- XAction : need to persist adaptation instances by [UA, Client IP and other parameters] : how do I persist a specific instance of an ecap xaction [ adapter or service] on a request?

Scenario: need to adapt a user/client instance browsing many sites changing [the ads,artifact] served based on session [src,dest, UA, ...].

Question information

English Edit question
eCAP Edit question
No assignee Edit question
Last query:
Last reply:
Alex Rousskov (rousskov) said : #1

An eCAP adapter is not destroyed when an eCAP transaction ends, so there should be no problem with using global variables and such. Your eCAP adapter can maintain some kind of a global variable/object (in RAM or even on disk) that will maintain state across multiple eCAP transactions.

It is up to you how to define "session" based on HTTP message information. Niether HTTP nor eCAP API has a notion of a "browsing session" or "adaptation instance", but your adapter code may define those as needed.

If you are using Squid and want to share information among adaptation transactions that apply to the _same_ master transaction (i.e., the HTTP request, the corresponding HTTP response, and all the associated eCAP/ICAP exchanges), please see the adaptation_masterx_shared_names option in squid.conf.documented.

Can you help with this problem?

Provide an answer of your own, or ask Neil Dave' for more information if necessary.

To post a message you must log in.