I’m currently curling a JSP running on the headless client. Everything works quite well - it logs in, passes a method some values, executes the method and logs out again.
In the event where all my client licences are being used by other users (and maybe even all three trial licences), it is critical that this curl be allowed to execute. To make sure the licensing will not stop the operation, as I see it I have three options:
Have a special user for this operation which is ALWAYS logged in. (is there a way I can do this?)
Kick another client off when the curl executes (not desirable)
Make sure I have more licences than I have users (this solution isn’t really desirable either, as the majority of users use this system for <10 minutes a week)
A login expires after idle for xxx minutes. If I am correct we can set this however to the time we want.
I understand what you ask because this is something I am facing also.
Why do you say the last option (reserve a login) is not desirable? All logins are concurrent users so when a client doesn’t log in for more than 10 minutes he/she won’t use licenses for more than 10 minutes. The only thing is the license for the headless client. Not a big deal I guess when it is so important to reserve it!
At least that is the road I (think I) will follow…
The last option isn’t desirable as although I have an expanding set of users, it would be rare that the number of concurrent users would exceeed the number of available licences. However, I’m concerned that the curl would fail in the case of all licences are being used, so I want to avoid taking that chance if I can.
Simply buying more licences to solve the problem would be a bit of a waste of money in this case, since there is only a slim chance the situation I’ve described would occur!
Now the client is application based and not session based. It means that it will only use ONE client!
But be carefull, it means also that the requests will be handled after eachother.
So for example, one client is doing a search and edit, and another client is doing the same for another record. If the first client wants to save the data back, you first have to do a search again, and than save, because the headless-client, was in other record.
Have a special user for this operation which is ALWAYS logged in. (is there a way I can do this?)
Yes, you can use a Batch Processor instead of CURL and develop a mini solution to do the task you need at the right time, it’s a kind of HC running on the server so you also have direct access to server HD, etc.
If you need to pass parameters to the batch solution you can use a special table accessible from the main solution and the batch solution.
IT2BE:
I am probably jumping to conclusions but that way you will also ‘reserve’ one client/license for the operation you want.
Right, but you could use this batch processor for multiple operations just implementing a table to feed data to it and a cron job to check the table every x seconds, a table like this:
operation_type | operation_creation_date | parameter A | parameter B | ...
do this today 13:20:15
do that today 13:25:00
and a method like:
- search in operations table all records with:
operation_creation_date > date_last_check
- loop foundset
- switch(operation_type) {} ...
and using the eval() functions you could also feed “live methods” to the batch processor.
I’m happy to pay a license for a feature like this one
Thanks for your suggestions - the problem has been sorted now. I now have all client machines on my network (about 800 of them) dumping their System Profiler/System Information data to XML and sending the XML to a postgres db via the curl every day. My servoy solution then parses the XML and updates my asset db accordingly. Now I always have up-to-date information for all machines on my network!