I want something like a static class variable, except when different applications load my assembly. I want them all to share the same variable.
I know that I can write to disk or to the database, but this is for the process that is used with sql queries, and this will probably slow it down too much (actually I'm going to check these parameters, but I ask this question by time b / c I don't think this would be an acceptable solution).
I would prefer to use a solution that will entail the least overhead in the deployment, and I do not mind if the solution is not so easy to create, if it will be easy to use when I am done.
I know that there are some persistent memory frameworks. I have not tested any of them yet, and perhaps one of them would be perfect, so feel free to recommend it. I also completely agree to write something myself, especially if it makes deployment easier for me.
Thanks in advance for any suggestions!
Edit: Looks like I was looking at a very simple solution. My problem was that SQL provided only 8000 bytes of space for serializing data between calls to the aggregated SQL function that I wrote. I read an article on how to compress your data and get the most out of these 8000 bytes, and suggested that I can do nothing more. As it turned out, I can set MaxBytes = -1 instead of a range from 0 to 8000 to get up to 2 GB of space. I believe that this was something new that they added to the 3.5 framework, because there are various articles that talk about this 8000 byte limit.
Thanks to everyone for the answers, though, since this is a problem that I wanted to solve for other reasons in the past, and now I know what to do if I need a very simple and quick way to communicate between applications.
source share