473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Want multiple copies of a DLL to run...

Hi,

I have written a VB.Net Class Library to handle TCP message traffic between
a client and a server. (i.e. I have exposed Props/Methods to a caller and
handle the gory details regarding encryption and msg handling back and fro
to the server in the DLL.)

For a single client, this all works swell.

Now I am endeavoring to create a LOAD TESTER which is nothing more than a
means to generate LOTS of meaningful traffic to my server.

So, I have tried to write a simple routine which creates n-threads each
trying to create its OWN COPY of the DLL i.e. each thread's start routine
has ...

dim myDLL as theDLLCls
myDLL = New theDLLCls

But I get all kinds of weirdy errors in the DLL's handlers.

Everything I've read so far is all about using SyncLock around the areas
using variables in the DLL, etc etc etc... but thats NOT what I want.. .in
fact the problem is that my DLL is essesntially NOT STATELESS... it MUST
remember particular things about ITS connection which WILL BE DIFFERENT in
all other connections. So SynckLocking isn;t corrrect because I DON'T WANT
ANOTHER thread mucking with the data.

So, how does one go about ensuring that fresh, unique copy of the DLL class
gets used in each thread that is spawned??

BTW I have ALL variables in the class as PRIVATE, but of course there are
"public" properties and ethods to allow the caller to get to the member
(private) variables.

Any and all ideas are most welcome.

regards,
tob
Nov 24 '06 #1
2 1116
BTW I have ALL variables in the class as PRIVATE, but of course there are
"public" properties and ethods to allow the caller to get to the member
(private) variables.

Any and all ideas are most welcome.
Why don't you wrap all of the properties (private and public) into a "State"
class, passing a new instance as an argument to the DLL for each thread you
have? Whenever you call a method on the DLL, you pass the state instance
for whichever thread you are making the call on behalf of.



Nov 24 '06 #2
"Robinson" <to******************@myinboxtoomuchtoooften.comwr ote in
news:ek*******************@news.demon.co.uk:
>
>BTW I have ALL variables in the class as PRIVATE, but of course there
are "public" properties and ethods to allow the caller to get to the
member (private) variables.

Any and all ideas are most welcome.

Why don't you wrap all of the properties (private and public) into a
"State" class, passing a new instance as an argument to the DLL for
each thread you have? Whenever you call a method on the DLL, you pass
the state instance for whichever thread you are making the call on
behalf of.



Hi....

I appreciate your suggestion but your asking me to "lug around" a ton of
TCP, and message states, and other stuff that the DLL was meant to handle
all by itself.

Isn't there a way to simply make sure that each NEW of the DLL is really
NEW?

regards,
tob
Nov 24 '06 #3

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

Similar topics

11
by: Dan Stromberg | last post by:
We will soon have 3 copies, for testing purposes, of what should be about 4.5 terrabytes of data. Rather than cmp'ing twice, to verify data integrity, I was thinking we could speed up the...
6
by: Paul | last post by:
In real life situation, do we ever come across a situation where we would need two base objects in an object. A snippet is worth 1000 words (: so... class Base { }; class Derived1:public Base...
4
by: Don Seckler | last post by:
I am building an application to track the distribution and returns of copies of magazines. Copies of a magazine that are unsold are returned by the retailer to the wholesaler. They are...
3
by: Rob Meade | last post by:
Hi all, I have created 7 web custom controls for 7 sections of our template. I have them currently on my local pc - where vs placed them...the plan was that I would create these - throw them...
2
by: Michel Esber | last post by:
Hello, I have an environment that contains V8 (FP 11) and V7 (FP13) Linux servers. One of our applications reads data from V8 servers and writes summarized data into V7 servers that can´t be...
3
by: Aliriazi | last post by:
All, I have created a simple database, which includes a receiving table and outgoing table in my receiving table I have a multiple entry of the same fields. I am trying to create a query that...
6
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. ...
3
by: Shortstuff12345 | last post by:
I have a database where I'm trying to do some root cause analysis on design changes. Each design change could have multiple root causes associated to the change. I'd like to try to setup the data...
12
by: eyalco | last post by:
I have a report which I need to copy in 2 different lables. I've set a table with numbers from 0-10 (0 gets "original and all the others get "copy"). The caption is changed by IIF - so now all is ok....
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.