Author Topic: Network lock for dummies?  (Read 1372 times)

0 Members and 1 Guest are viewing this topic.

Lost_in_()

  • Guest
Network lock for dummies?
« on: September 20, 2016, 10:15:31 PM »
I have a user of a routine I have written wanting to use it for only a specified number of users on their international network.  I have had no exposure to working with networks, only having worked on stand-alone pc's.  My paper 'solution' is to have a password file, which already exists for my routine, expanded to have the number of licences encoded within it.  Each time a users runs my routine checks if there is capacity to allow the running, - subtracting one from available licences on startup and adding back on when routine has finished.  Forseeable problems are of course if a PC stops working when using my routine, forever reducing the available licences.

I believe I can use (getvar "acadprefix") to find the network drive that the routine is stored on? 

Does this sound a reasonable method and has anyone had a similar request and willing to share their solution?

Many thanks

Pete

MickD

  • King Gator
  • Posts: 3666
  • (x-in)->[process]->(y-out) ... simples!
Re: Network lock for dummies?
« Reply #1 on: September 20, 2016, 11:51:55 PM »
I think a license borrow scenario would work best.
That is, the user checks out the license which updates the count on the license server. When the user has finished they put it back. You could also time stamp the license so it is revoked on the user's computer and reinstated back on the server just in case they don't return it or there is a network problem.
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

Lost_in_()

  • Guest
Re: Network lock for dummies?
« Reply #2 on: September 21, 2016, 12:12:27 AM »
Thanks MickD,

Using a timeout is a good suggestion.