New UserManager plugin: manage Servoy server and clients

We are proud to announce a new member of our family of plugins and beans: the UserManager plugin.

The UserManager is a client/server plugin that allows developers to build a complete server management system right into their solution without the need to use the server’s admin page.

Use the UserManager to get detailed information on connected clients, shutdown clients, automatically disconnect idle clients, send messages to clients, execute methods in remote clients, start batch processors and run methods in them to perform time consuming tasks on the server, …

The plugin features:

Application Server

  • get system information of the Servoy server
  • get database connection infos
  • get the server’s log file (or a given number of lines)
  • get and set properties in the Servoy properties file
  • restart and shutdown the server
  • send message to all connected clients
  • start a headless client
  • automatically disconnect idle clients after a given idle time (can be set for smart and web clients independently)

Client

  • get system information of a client
  • send a message to the client
  • check if a client is alive
  • get login and idle time
  • get open solution name
  • close solution
  • shutdown a client
  • set client specific maximum idle times
  • store and retrieve additional information (for example a list of install plugins, department information etc.)
  • run a global method

The plugin also offers several convenience methods:

  • getAllSolutions (used by clients)
  • getClientByUID to get a client directly
  • getClients to get all connected clients
  • getHeadlessClients to only get headless clients
  • getSmartClients to only get smart clients
  • getWebClients to only get web clients
  • copyFileToServer
  • get and set settings in the current client

For more information about the UserManager plugin please visit our website.

Congratulations Patrick!
I tried the plugin and it’s really awesome!
It’s a great tool especially for managing large webclient deployments.

Thanks, Nicola!

Today we released 1.1 of the plugin, which adds the ability to copy files from the server. Also new is a feature that resets the i18n messages on the server, so the next client receives a “fresh” set of messages.

Cool!
How is the upload working? Is it possible to upload files in background?

It could be done, but currently it does not do that. Your method waits until the file is fully transferred.

Cool!
How is the upload working? Is it possible to upload files in background?

That should be doable with the DataStream Plug-in.
It could be that we have to modify the progress dialog but that is it.
The DataStream Plug-in is built especially for this task :)

BTW Nice work Patrick! Really impressive…

Hi all,

Have people using this plugIn been able to get the executeMethod, maxIdleTime and shutdown functions to work for the client object? I don’t know if I’m doing something wrong, or if there is a problem with the plugIn. I have 2 clients connecting to a solution on an app server and have confirmed that theClients is the client I want to shutdown and none of the following works:
* _theClients*.shutdown();*_ _*_
*_ <em>_theClients*.executeMethod('globals.logout()');*_</em> <em>_*
*_</em> <em><em>_theClients*.setMaxIdleTime(1);*_</em></em> <em><em>_*
I placed a dialog and application.output in globals.logout() to see if it is even being called at all, and it is not. Sending messages to this client works, closeSolution() also works. What am I missing?
Thanks,
-Jeremy

I am not 100% sure what you say works or does not work. There are a few errors in your code example:

  1. executeMethod requires a reference to a method and not a String. If you pass something in ‘’, you pass a String. So change that to

theClients*.executeMethod(globals.logout);*
2. setMaxIdleTime() does not exist. What exists is a property maxIdleTime. So change that to
theClients*.maxIdleTime = 1*
The installer that you used to install the plugin also installs a sample solution into Servoy/solutions. You might want to check that out. It demonstrates most of the functionality.
I hope this helps.
Patrick

Thank you for that correction, but running the correct code does not work as I expect either. Setting the property maxIdleTime does not seem to work. I see on the app server that it initiates a search for idle clients, but does not disconnect any.

I thought I was able to get executeMethod to work when running a single client from developer when the method is in single quotes. Figured executeMethod might parse the string to determine the method to run, since I can’t find any documentation there’s no way to be sure. However, when having 2 clients connected to an app server I tried both with and without quotes and neither worked.

Can anyone confirm that they have gotten executeMethod, maxIdleTime (property setting), and shutdown to work for the client object when being execute from client A on client B when both are connected to the same app server?

If I didn’t mention this in my first post, executeMethod works as expected for me when I run it from a smart client launched from developer. I’m the only client connected so I’m executing a method on my own connection. This works, but is trivial, it’s the above situation that does not seem to work.

Again, please have a look at the sample solution. It is called servoy_plugins_de_UserManager.servoy and is installed into Servoy/solutions. There is sample code for almost all aspects of the plugin. I just tested and had no problems executing a method from one client on another running off a Servoy server.

I apologize for my confusion. I was citing my experiences from a trial version I downloaded that expired a week ago. However, a client of mine has purchased 10 developer licenses and unlimited client deployments and reported experiencing some similar problems and some differences to my experience with the trial version which is what I was initially trying to report, but the reasons for this report was not what I originally assumed. I think we’ve narrowed in on the problems using the purchased and registered versions of the plugIn and I will try to explain as clearly as possible:

It seems we need to register the plugIn every time we launch servoy, otherwise the plugIn will not run the method steps and the method will halt, similar to when the 30 minute trial window expired. So we added the registration method call to the startup method, and have found that sometimes we also need to shutdown SQL Anywhere after registering the plugIn in order to get the plugIn to work. That seems to be the crux of the problem. Only one of the 10 developer licenses is currently being used.

Another question, once we figure out how to get the maxIdleTime property working, does anyone know if that property is in milliseconds, minutes, or what unit?

Thanks.

maxIdleTime is minutes.

And yes, if you use a trial version, it will stop to work 30 minutes after you launched Servoy. Also, the register() method actually registers the client on the server. It is recommended to do this in the onOpen method of your solution. You can manually register a client with the server by calling updateClientInfo(), but the register method does that for you.

If you or your customer has any problems with the plugin, I suggest you contact us via support@servoy-plugins.de. The Servoy forum is not really the right place to discuss third party plugin issues.

Yes, thank you for the support email. We’ll continue the issues there.

I’m glad we were at least able to discern that it appears to be licensing/registration problems rather than problems with the plugIn itself. Although I’m still not sure what the maxIdleTime property and shutdown() function are supposed to be doing, but since executeMethod works then we are all set really.