Software protection: Dave Mortimer's License Number Server

  • Thread starter Thread starter Mortime Business Software
  • Start date Start date
M

Mortime Business Software

Hello All.

Please find below an extract from my statement of requirements that I am currently writing for myself. I would be most grateful if you would examine it, and get back to me with any developments which may occur to you.

From a remote, central location, Dave Mortimer's License Number Server supervises the local running of n live processes at a time of an application. My applications utilise the lightening speed of local processing and the convenience of local data storage. Any customer is assured that their data is stored on their own machine. Customers are also offered the safety of remote data storage if they want it. If a customer chooses to back up their data remotely with us, then they will be given full insert/update/delete facility on their data.

It matters not whether your suggestions for development are regressive or progressive. Just say whatever you think. Your comments will be most welcome no matter how trivial you think they are.

Dave Mortimer's License Number Server (from now on called simply 'server') is intended to ensure that purchasers of copies of the precious will be treated fairly whilst protecting me from those viscious, unscrupulous hobbits.

Thanks for your help,

Dave
----------------------------------------------------------------
2.4.1 Purchased software

There is no restriction on the number of copies of a product that a customer may install on different computers, but there will be a limit on how many application processes that will be allowed to run at any given time. This limit is specified by the license that the customer purchased, which could be any one of a 1-user, 2-user, 3-user, ..., n-user license.

After the customer has paid for the product through our online bank, a unique license number is generated for that copy of the product and stored on the server along with the above mentioned limit. The server then sends a 'thank you' page to the user which displays a download hyperlink for the copy along with the license number.

When a copy of the application is first installed by the customer, the copy will not know the license number. This means that if an application process was to start up at this time, it would be unable to submit the license number to the server to get permission to run. Therefore, during the installation process, the installer will ask the user to enter the license number. The license number will then be stored in a place accessible to the application at run time, and it will thus be possible for the application to get permission from the server to run as long as the license number is valid and the limit has not been reached.

When an application process starts up, it sends a message to the server asking for permission to run. This message includes the license number. The server checks the number of available slots for the license number, and if the number of available slots is greater than zero, then the server stores the IP address of the application process in a list of running processes. The server then sends the application process permission to activate, and decrements the available slots for that license by 1. Otherwise, if the number of available slots is zero (which means that number of running processes for the license is equal to the limit), then the server sends a message to the application process denying permission for it to activate, and places the application process at the back of a queue of processes waiting for permission to run. The processes in the queue are identified by their IP addresses.

When an application process closes down, it informs the server by sending a message to it. If there are any processes in the queue of waiting processes, then the server gets the IP address of the process at the head of the queue, and sends it a message telling it that it now has permission to run. Otherwise, if the queue is empty, then the server increments the number of available slots by 1.

An application process may fail without informing the server. For example, if there is a power cut at the application's end, then the application process will not have the chance to inform the server that it has ceased running. This will leave the server's list of running processes and count of available slots incorrect. The list of waiting processes will also be incorrect if this list is not empty because if a running application process closes down, then the waiting process at the head of this queue should be contacted. The server cannot be expected to know about such remote problems as soon as they occur, so it is up to the customer to inform the server. When the server has been informed about the problem, it will attempt to send each of its listed running processes a message. If the server does not receive a response from a process, then the server deletes the process from the list of running processes and decrements the count of available slots accordingly. A part of the server's periodic maintenance schedule will also include this task.

If the primary server fails, then the system will switch to a secondary server running on a different computer. If an application process requests permission to activate and does not receive a response from the primary server after a certain number of connection attempts, then it may assume that the primary server is currently unavailable, and should connect to the secondary server. To facilitate this, we must ensure that the secondary server has access to the same data that the primary server was using when it failed; i.e. for each license, the available slot count, the list of processes which were running, and the queue of waiting processes. Therefore, the secondary server needs to be kept up to date with this data during the normal day-to-day running of the primary server. When the primary server comes back online, it does not need to do anything because when an application process shuts down and then starts up again, it will make its initial request to the primary server, and will only try to contact the secondary server if the primary server does not reply.
----------------------------------------------------------------

Do you agree?

Do you have anything to add to, or subtract from, the above.

Please let me know.

Cheers,

Dave
 

Latest Articles