I have an ordinary windows service that processes a large data set and stores it to a DB. This windows service also acts to host a WCF service that serves the processed data up to one or more GUIs.
Currently the WCF service has to hit the DB at least once to get the data for the client, but the size of the data set is such that this is extremely slow, and eats up a lot of memory because of the duplication of data. Ideally I would like to share the results of the data processing directly (in memory) with the WCF service. Is there a way to do this?
Yes, using a distributed cache engine.
Basically, the distributed cache engine is a separate process running on one or more machines, that manages a cache. This cache sites in it's own process, and typically the cache engine provides an API for accessing that data
The main options are
- Windows Server AppFabric caching - http://msdn.microsoft.com/en-us/library/ff383731.aspx
- Memcachd - http://memcached.org/, the Windows build is here http://code.google.com/p/memcached/wiki/PlatformWindows