LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement 'floating' license in my app

Hi!,
 
We have an application which will be delivered to the customer as an installer.
 
I want to know how to implement 'single concurrent floating license locked to MAC address of ethernet card' scheme?
To describe the phrase: The user has a LAN with one PC designated as 'server'. The SQL database will sit on this server.
Our application can be installed on any number of client machines which are part of the LAN. However at any given time, the application can run from ONLY one client. Also, the application will check for a specific ethernet card on the server.
 
To my knowledge the solutions needs to do the following (I could be wrong and/or there might be more efficient methods):
 
1. The application on each client needs to ping the server at app start and check for correct MAC (this is something we know how to do, suggestions are still welcome)
 
2. There should be some service running on the server that keeps track of how many client machines are running the app. The service will communicate to the client app a true or false message. True if no other client is running the app. False if one of the client machine is using the app.
 
3. The app on client machine needs to talk to this service (running on server) and take permission.
 
Quentions:
 
A. How do we program 2. and 3. ?
 
B. Do periodic checks whether an active client is really online ad running the app. This is required to handle scenarios like when a client lost network connectivity/crashed/forgot to logout from the server.
 
Point B is not critical and a solution which omits it is still welcome. A simple way out will be that user has to restart service on server.
 
Thanks,
Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 1 of 12
(2,824 Views)

Oops forgot to add specs, here they are:

All computers are either Win2000 Prof. OR WinXP Prof.

LAN is Ethernet 10/100MB

Dev is on LV 7.1

Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 2 of 12
(2,813 Views)
I don't have any answers to your specific questions but it sounds to me like the whole thing could have been implemented with a single installation of the application on the server and using Remote Panels on the client machines. With a single Remote Panel license, only one client can connect and take control at a time. All of this is built into the connection and license manager and you don't have to write any extra code.
Message 3 of 12
(2,813 Views)
Are you looking for suggestions as to how this could be arranged, or do you need help on the coding itself?
 
One arrangement would be to make a simple TCP/IP application (it can be converted to a service, you can find a description of that here on the zone) that the clients are programmed to connect to. When a client connects and requests access the server checks its status and sends back a yes/no. The client reacts: yes -> continues to do its job / no -> stops and tells the user why....
 
Refine this arrangement by making the server keep a list of the waiting clients, scan the connections every now and then (the client is made to keep a connection as long as it wants the access) and grant access to the one next in line when the active one drops out. This way you handle transitions better because the clients can stay connected to the server for a certain time waiting to be granted access(10-60 seconds e.g.) .
 
You could skip implementing a ping from the client to the server by having the access server check the MAC address upon startup and then just hand it over to the clients when they ask for access (or make the clients tell the server what the MAC should be when they ask for access and the server can answer with a yes, wait (no) or invalid-MAC....
 
As for the coding of this client-server solution there are some good examples here on the zone, take a look at this one e.g.:
 
 
In this archive you will find a folder named Multiple Clients. Have a look at the SERVER - PARALLEL.vi, it shows you how to handle connections in parallell. In you case you could use a solution that handles the clients sequencially as well as there is no need to do large parallell data transfers, but the parallell option is more flexible in the long run.
 
Message 4 of 12
(2,808 Views)

Dennis, Thanks.

I have never before used Remote Panels (RM) but from what I have just read, it is worth exploring. I cannot use it for this immediate problem because my application is ready and just another 4-5 days from final delivery. I have LV 7.1 FDS (with app builder) and if I am not wrong that means I do not have the ability to run RM for an exe. I probably need to buy a 5/20/50 user license which I cannot do right away.

Also, what are the caveats when using RM? In my case the dbase an the service is to run on one of the important servers and I would like to keep the apps on it to a minimum.

Last, could you point me to a doc or webpage that discusses RM for LV 7.1 in detail?

- Gurdas

Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 5 of 12
(2,794 Views)

Mads, thanks.

My requirement

Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 6 of 12
(2,791 Views)

Mads, thanks.

My requirement is

Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 7 of 12
(2,791 Views)
Mads, thanks.
 
My requiement is even simpler than the sequential mode you discuss. I do not need to keep sending data to various clients sequentially. A new client machine can run the app only and only when the current client machine logs out and closes the app.

To put in very simple words, I want a service to run on the server that checks if any client machine is 'connected' and if yes, it should disallow (send a no signal) to any additional client machine. When the existing client user logs off (by clicking a button) the service will set its 'users' ounter to zero and thus answer the next request for status with 'yes'.
I will try out the download you have suggested.
 
If my answer means the solution is simpler, kindly state the same.
 
- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 8 of 12
(2,790 Views)
Every version of LabVIEW comes with a least one license for remote panels. The professional version comes with 5 licenses. With one license enabled, you can install the LabVIEW run-time on as many clients as you want but the license manager will only permit one to gain control at any one time. You will only need to purchase additional licenses if you want multiple clients connected. Creating the remote panel is pretty simple with the web publishing tool. Ussually, once you have a working VI, you don't have to make any modifications to enable one or many users to access the app. The requirements for the remote panel are similar to the exe that you've already created. It would get installed on the server along with the web server. It's on the clients that you save. Presumably, they would already have a browser installed (I don't know how well anything besides Internet Explorer works) and the LabVIEW run-time engine alone. Many users provide a link on the remote panel web page to NI's site to install the run-time engine.
0 Kudos
Message 9 of 12
(2,785 Views)
Dennis,
 
Heres the RM product description from NI:
"Using the remote panel feature in LabVIEW, you can remotely control your LabVIEW application over the Web -- with no additional programming. With only two mouse clicks, you can embed your front panel in a standard Web browser. Then, designated users can control your applications remotely from a standard Web browser without installing LabVIEW.
New with LabVIEW 7 Express, your NI LabVIEW Professional Development System purchase includes five remote panel licenses. With remote panels, users on the network can interact with the LabVIEW application running on your system through a standard Web browser window. Your NI LabVIEW Full Development System purchase includes one remote panel license. No activation is necessary for these connections. If you want users to access a stand-alone executable version of your application, you will need to purchase additional 5, 20, or 50-license packages."
My concern is the last sentence. Does it mean the license bundled with PDS and FDS work only with Vis and on a PC with the LV installed? If its an EXE?
 
Also, following terms from your reply are unfamiliar to me:
1. License Manager
2. Web Publishing Tool
3. Web Server
Are these included with FDS (+ app builder)? Where can I look them up?
 
My tight delivery timeline might not allow for adopting new technology. But this sure is interesting and I plan to adopt it for future projects.
How robust and dependable are Remote Panels? Is it something very new and thus not very mature?
 
Thanks,
Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 10 of 12
(2,763 Views)