I want to create a Windows Service (CS) which shall keep some data objects in memory for 12 hours or more. This windows service (CS) shall call a WCF service (DS) or Database to populate the reference data.
From the Web Site (WS), I need to access those data objects from the windows service (CS) so that I dont need to call WCF service or Database.
Earlier I achieved something similar to this by using .NET Remoting (MarshalByRefObject).
I am trying to something similar to distributed caching. Reference data calls from web site to WCF service or database take longer time. So I planned to have Windows (WCF) service which loads all the reference data during off-peak hours and keep it in its memory. My web site will directly access the data objects from memory.
How can I do that same in WCF ? I mean achieving .Net Remoting in WCF...
Update: Thanks everyone. I created a WCF Library and hosted in Windows service. Have a static hashtable to keep the data objects in memory. Clients access the objects using TCP. Its fast now.
Thanks JK
If I understand your question properly, what you are looking for is a cache server such as Redis or Memcached. There are a number of .NET clients available for these and other such technologies. For Redis, I suggest you check out the ServiceStack Redis client.