sitemule / ILEastic

Embedded application server for ILE on IBM i
Apache License 2.0
58 stars 29 forks source link

Fail fast if job is not started with ALWMLTTHD(*YES) #13

Closed m1h43l closed 4 months ago

m1h43l commented 6 years ago

Currently there is only a message which tells you that the thread could not be started when a request comes in. I think it would be better to test on startup if the current job has the parameter "allow multithreading = *yes". This job attribute could be retrieved with the system API QUSRJOBI, format JOBI0400, "Allow multiple threads".

NielsLiisberg commented 6 years ago

It is correct, however some times it can be useful to start it serialized - so the "servlet" is called sequentially. ( like it was popping data from a data queue) . What do you think ?

m1h43l commented 6 years ago

Sequential call: I would not block the REST service itself but let the servlet take the request and let it queue the data without blocking the REST service itself.

So my answer would be "No". I can't think of a use case where it would be reasonable to have the REST service itself blocked. (Which does not mean that there is none in the world =) ).

NielsLiisberg commented 6 years ago

Well - we actually use this feature in out IceBreak server that "also" has this feature. Typillaly for retrofitting old RPG (batch) code to ba able to do transactions. Yes is blocks and queues up request .. ( just like classic CGI programs) ...

But maybe it have to be a flag in the config object: SerializeServlet = *ON ... i.e switched off by default. Does that sounds like a solution to you ?

Thank you so much for your feedback - And please note that ILEastic now supports both PUT, GET, POST etc. or what ever HTTP methods you throw at it. If it has a playload it will available

m1h43l commented 6 years ago

Having it in the configuration with default = *off sounds very good to me.

NielsLiisberg commented 5 years ago

Also for FASTCGI - only one process is valid.... when we come to FASTCGI ..

m1h43l commented 2 years ago

@NielsLiisberg : Does this "serialized processing" even work with ILEastic? I thought ILEastic always tries to create a new thread on a new request.

m1h43l commented 4 months ago

To support different models of running an ILEastic service we will just keep it the way it is now.