Client Pooling with HeadlessClient Plugin

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

Client Pooling with HeadlessClient Plugin

Postby goldcougar » Mon Jul 12, 2010 3:53 am

In the rest_ws plugin for restful web services, client pooling is built into the plugin. It would be nice to have this same option in the HeadlessClient plugin. I have written some code in a module to simulate pooling (simple round-robin approach) with headless clients, but real pooling can only be done in the java side of the plugin.

This is useful for some customers I have that deal a lot with third-party API's where lots of requests are sent off server-side via some API, and then when the responses are received they update the database to record the response. However, some requests can take a while to process, but you don't want to have to spawn a new headless client instance for each individual request.
Scott Butler
iTech Professionals, Inc.
SAN Partner

Servoy Consulting & Development
Servoy University- Training Videos
Servoy Components- Plugins, Beans, and Web Components
Servoy Guy- Tips & Resources
ServoyForge- Open Source Components
User avatar
goldcougar
Servoy Expert
 
Posts: 682
Joined: Sun Jan 08, 2006 7:15 am
Location: Cincinnati, OH

Re: Client Pooling with HeadlessClient Plugin

Postby jcompagner » Mon Jul 12, 2010 12:25 pm

So we currently have the option to create a new client or to reuse an existing client.

and a JSClient instance on the server is a 1-1 with something on the server (so that you could also share and know the state on the server between calls)

But if you want you can try to create a pooling option inside the plugin by creating another createClient method where you have an extra boolean that tells the server to use a pool (of clients with a specific solution loaded)
And then the queueMethod also gives this boolean so that the server knows that it can use a randomly client that is not used yet.

Problem is that in this mode getDataProviderValue especially with an empty "currently executing function" argument doesnt make any sense..

But create a patch and we will see how it works out :)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8214
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests