[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vb.net count concurrent users

Posted on 2005-04-24
14
Medium Priority
?
469 Views
Last Modified: 2008-01-09
what would be the best way in a windows app to track concurrent yours of our system. I would prefer not using dongles but still want to limit use.

thanks in advance
greg
0
Comment
Question by:Autoeforms
  • 3
  • 2
  • 2
  • +2
11 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 13853388
Although a mutex is most frequently for process synchronization, it is commonly used to check for multiple instances of a program.

One can, however, also use mutexes to count program instances by included an instance count within the sought mutex name.  For example:

canicontinue=false
for i=1 to maxcount
     (
     soughtmutexname="myspecialmutexname" + i.tostring
     if soughtmutexname not in use
         (
         canicontinue=true
         exit loop
         )
     )

if not canicontinue
   (
   program already has maxcount instances
   )

0
 
LVL 8

Author Comment

by:Autoeforms
ID: 13853664
i am a little confused, how does this work exactly when the clients are running of the server
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 13854388
I need a little bit more information ... this is an app that people download / use ?

Could you just keep a centralized server to handle a registration process?

Is there any sort of communications being run with a centralized server ?

Greg
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:Autoeforms
ID: 13854415
it will be run on a server
i had thought about creating a semaphore and refreshing it while the user is on the system. that way i could time it out after 5 or 10 minutes so they don't end up locking up users if the disconnect abnormally
g
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 672 total points
ID: 13854526
that is a possibility but there are easier ways ...

is this a single server system or multiple (i.e. farmed)?

Chances are you will need to maintain info on unique users anyway, can a user reasonably have more than one connection?

Greg
0
 
LVL 22

Assisted Solution

by:cookre
cookre earned 664 total points
ID: 13855508
There's still a bit of confusion.

If it's actually running ON the server (a la Terminal Services), that's not so bad.

If it's running on the client, i.e., the client runs a shortcut or bat file that references the exe on the server, then that's a bit more problematic.  And, as gregoryyoung hinted at, if the program can be called up from more than one server, that's even worse.

0
 
LVL 10

Expert Comment

by:Eduard Ghergu
ID: 13856342
Try to use a single server as a license server. You can buy a dedicated solution or you can develop your own one.
The ideea is to use sockets and count the connections to your license server.
0
 

Expert Comment

by:GregWeber
ID: 13857206
what solution would you recommend buying or how would i setup the socket counting i have never done that

thanks
0
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 13858684
does the app maintain a connection to the server ?

When you are talking about tracking concurrent users I assume from above that you mean those who are running the program / connected to your servers at that moment. What does your server look like? how do you maintain your connections? This is a basic functionality of the server to count the number of concurrent connections.

Greg
0
 

Expert Comment

by:GregWeber
ID: 13859001
the app code be running of the server on the client via a short cut.
it could also be running on the client and merely connected to the datbase.

I am fearing my only way to control this accurately is with dongles or by keeping a count a database table which presents other problems.
0
 
LVL 10

Assisted Solution

by:Eduard Ghergu
Eduard Ghergu earned 664 total points
ID: 13864233
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Introduction to Processes
Loops Section Overview

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question