473,473 Members | 1,484 Online
Bytes | Software Development & Data Engineering Community
Create 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 1366

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

Similar topics

2
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
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
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
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
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
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
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
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
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.