473,505 Members | 15,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

static vars/ com/ win-service: What is the best solution?

Hello all,
I have an middleware that has to be accessed from two different
applications, win-form and asp-form. the middleware uses a file to store and
retrieve information. I want to economize the IO and to read/write to the
file only when the application stops, and meanwhile to store the information
in memory data structure.
My program has evaluated throw the following steps:
1) I made the middleware as a dll project. The data structure was static,
and was initialized on the initialization of class (on the static
constructor). the problem was that the two application has created two
different data structures, and were not synchronized.
2) I converted the middleware into a COM object, and I enforced the maximum
pool size to be 1. In this case everything was ok, but I looked for a better
solution, without enforcing the max pool size (too sophisticated, not
straight forward).
3) I converted it to a windows service (an exe file). The problem now is
that I can not create references from the applications to the middleware
(only dll are allowed as references).

My question is what is the best solution for the above problem?
Any one another type of solution?

thanks, David
Jul 19 '05 #1
0 1373

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3561
by: Thomas Mlynarczyk | last post by:
Hello, Is there a way to access a static variable defined inside a function from outside that function? Something like the following: function foo() { static $bar = 'stuff'; // more code }
1
1577
by: nick | last post by:
hi, i have to run php 4 on IIS 6 on win 2k and something seeminly really weird is happening. the first few times i hit the page, any vars posted from the form and any session_vars don't seem...
5
2739
by: Marijn | last post by:
I'd like to know how compilers usually handle static variables that are declared inside a function (as opposed to static class-members). Like in: int counter(){ static int c=0; ++c; return c;...
9
2474
by: vp | last post by:
Can I safely assume that all static variables are initialized as NULL or zero, depending on the types of the variables, no matter on which platform that app is compiled ? Thanks for your help, ...
3
7316
by: Dave | last post by:
Are there any issues with concurrency on static methods creating instances such as in the data access code below? Or if I wanted to expand it to use an ADO.NET transaction and having two users...
2
1363
by: r.roest | last post by:
Hi, I'm looking for a way to fill static vars from a different c-file. Here is what I want to do: file1.c static DEBUG calling function X using DEBUG to display information calling...
10
1744
by: John A Grandy | last post by:
Say I have Class1 which contains static Class2 var1 = new Class2(); Is Class2 constructor code only executed if var1 is referenced in the code-execution path ? Or is Class2 constructor code...
18
2518
by: Ronald Bruck | last post by:
I have several routines which are used millions of times in my programs, using the Gnu multi-precision software's floating-point reals (see <http://www.swox.se/gmp>). These are of type mpf_t, and...
55
6150
by: Zytan | last post by:
I see that static is more restricted in C# than in C++. It appears usable only on classes and methods, and data members, but cannot be created within a method itself. Surely this is possible in...
16
2025
by: Joe Strout | last post by:
One thing I miss as I move from REALbasic to Python is the ability to have static storage within a method -- i.e. storage that is persistent between calls, but not visible outside the method. I...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5613
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.