Multiple values for license lease times in turbofloat

Hello there,

We have a scenario that our product would like to handle.

In our product we want to allow our customer's to request for an extended license lease time, (Many nodes could request for different lease times) so that they can work for the extended time that they requested being offline/online without the app having to constantly check with the server for the lease expiration/timeout etc.

Also, the config file has only a single value for license lease time.

Can we have a workaround with the current version of turbofloat to do something like this?

Thanks!Srinivas

No, if a customer want the lease length to be longer then they can set that. But it's up to the administrator of the TurboFloat Server to set (i.e. the customer), not individual instance of your app.

So the customer has to modify the server config file and increase the license lease time ?

Hi Wyatt,

I did not want to create a new thread so posting in the same one. There is one more doubt i would like to clear regarding turbo float.

What does this flag "TF_E_LEASE_EXISTS" mean? How should this be handled ? Whats the difference between this and "TF_E_NO_FREE_LEASES" ?

Also, when the callback is called with the status "TF_CB_EXPIRED" do we have to explicitly call TF_DropLease and TF_Cleanup?

Any help regarding this will be invaluable!

Thanks.

If you open TurboFloat.h every single error code is listed with a full description (scroll to the bottom of the file):

/* MessageId: TF_E_LEASE_EXISTS Message code (in Hex): 0x6 Message code (in Decimal): 6


 MessageText:


 The lease has already been acquired. TurboFloat automatically renews the lease when it needs to based on the information the TurboFloat Server provides.*/#define TF_E_LEASE_EXISTS           ((HRESULT)0x00000006L)
/* MessageId: TF_E_NO_FREE_LEASES Message code (in Hex): 0x5 Message code (in Decimal): 5


 MessageText:


 There are no more free leases available from the TurboFloat server. Either increase the number of allowed floating licenses for the TurboFloat server or wait for one of the other leases to expire.*/#define TF_E_NO_FREE_LEASES         ((HRESULT)0x00000005L)
Also, when the callback is called with the status "TF_CB_EXPIRED" do we have to explicitly call TF_DropLease and TF_Cleanup?

Nope, when "TF_CB_EXPIRED" then the lease is already expired and the TurboFloat Server already dropped it. Again, see the documentation:

/* Called when the lease has expired and couldn't be renewed. You   should disable your app immediately when this return code is called.   Of course give your user a way to save the current state of their   data and/or request a lease renewal from the server.


   In other words, don't make the user mad. Make sure you test this   extensively with real end-users so you get the best behavior.*/#define TF_CB_EXPIRED               ((HRESULT)0x00000000UL)