I'm setting up a proxy service that gets a request and fulfills it by requesting data from another service, extracting a subset of the returned data, then returns it to the client. It's transient data, so no DB is needed. (I will likely have a way of managing authorized users. But this data doesn't need to be saved.)
I want to be able to set what amounts to 'session variables' -- the client sends some data once, then makes one or more requests that use that data. If it needs to change, it can just update it.
For example, the remote API needs its own API key. Instead of adding that to every request, I'd like to send it with some other data that is used for a bunch of following requests.
The alternative is to send one gigantic request and get back a collection of reply data.
But there doesn't seem to be any notion of a 'session' with XData that I can find.
What if I put a TList<...> or TDictionary<...> in the service implementation?
The problem is, I don't know what the lifetime of this thing is. So if I send a Put request to set a variable defined in the service, then send a Get request to read it, does it persist?
I know there's automatic object management, but it's not clear to me if that's the same thing.
As an example, I'm working with the Swagger demo that's got some math functions in it. Suppose you wanted to define a simple filter function that takes a 3x3 convolution matrix. You might want to pre-define several of them to use, named M1..M6 say. Then you apply one of these to any number of data samples. So you have an array or Dictionary of these that you define first. Then you send a series of requests that specify which one of these pre-defined matrices, M1..M6, to use as the filter. (In my case, the pre-defined data can be rather large, and I'd prefer not to have to send it with each request since it rarely changes for a given batch of requests.)