This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Licensing Question

 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about licensing. I am using ServerManagedPolicy that is provided in the sample application. If the user ever returned as licensed then I don't want to do any checks and simply allow. I don't understand the purpose of checking after we already know the user is licensed. Why do we have second "if" in the following code?

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably for the reason stated--looks like the value is cached, and they're making sure the value hasn't expired?
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply. What I am trying to understand is what is the rationale for expiring a license. I think for most applications once they are licensed, then its license will not expire. I think all I need to do is add another variable to the cache which will determine the beginning of the trial period and then I can simply use that to determine if trial period has expired. Please let me know what you think.

Thanks
Imad
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not the license that expires, it's the information on the device that the license is valid. The device checks in periodically with the license server, and in between it relies on cached information on the device. But eventually the information expires, and the app must be able to check in with the license server, or it will consider itself unlicensed. That's the case being handled here.
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Lester. I don't want to frustrate you with my stupid questions but one last one. It's more of a business question than a technical one. Once the license server responds with a response of "Licensed" (which I think it will only respond once application has been purchased) then I cache this response and use it for good. The only reason I would check the server again is when for some reason my cached response was wiped out.

So what is the business need for the device to check the license periodically with license server?

Thanks
Imad
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The license might be withdrawn due to the client violating its terms and conditions, or it might be time-limited to begin with. Licenses are not generally a "turn it on once, and then it's good forever" thing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic