• Post Reply Bookmark Topic Watch Topic
  • New Topic

Controlling instances..  RSS feed

 
Dave Brown
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Just trying to decide the best approach in controlling the number of instances of a swing based application.

I.e. If a customer buys my product and I give them 3 user licenses, I only want the customer to be able to run 3 seperate instances of the app on their network. I also want to control the application so it only allows one instance per computer but thats a different matter.

Just wondering what people would use to attack this, is something like RMI appropriate ?

Thanks,
 
Paul Clapham
Sheriff
Posts: 22832
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The higher-level architecture is that you have a licence server program that runs at a central location. It has the maximum number of allowable copies built into it (and any other licencing "features" such as expiry dates). Then the first thing the application itself does is to connect to the licence server and see if there are any available licences, etc, etc.

You might find it easier to use a customized socket protocol rather than RMI, which might be a bit of overkill for this application. Or not. Depends how much you like RMI.

Back at the architecture level, you need to make very certain that when the user closes the application, it goes to the licence server and gives back the licence it has been holding. Even if the user closed the application by logging off Windows. As soon as your server gets out of sync with the clients, you're going to run into trouble. You'll need to provide a method of restarting the licence server. And when you do that, then the clients were running at that time now have "rogue" licences that are not accounted for by the server. And so on.

Or you could use the method that IBM uses, which is to sell the customer N licences and then just ship them the software and let them deal with conforming to the N limit.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!