I have done all of this in C for an open source project that I was working
on. I had pre-start jobs running in my own subsystem and I would spawn a
job to perform programming work that came from a socket program.

It would perform the work which could be of any length but what I ended up
doing was using a User Queue to return a result which worked fine.

So what I had was a program running a PC in either C# or Java that
communicated with a socket server on the IBM I. That program was written in
C.

Received the request, looked up to see if it had Job running and created
one if it did not and then sent that request to a pre-start job and got
back the response through a user queue.

It would probably work just as well using a data queue. I abandoned the
project because I didn't want to get into encrypting traffic from the PC to
the server.

Anyway I would be willing to share some code if you are interested.


On Mon, Oct 25, 2021 at 2:32 PM Don Brown via MIDRANGE-L <
midrange-l@xxxxxxxxxxxxxxxxxx> wrote:

I am not sure if this will fit your requirement but we like data queue's
in this scenario.

For example we include data from an external microsoft sql server on some
enquiries.

To achieve this we have a "monitor" program that;
- receives requests on a data queue,
- processes the request and
- puts the results on a different data queue

So all the overhead in startup of the monitor is only once.

And if needed I could start another monitor if higher volume is required.

Cheers

Don







From: "Patrik Schindler" <poc@xxxxxxxxxx>
To: "Midrange Systems Technical Discussion"
<midrange-l@xxxxxxxxxxxxxxxxxx>
Date: 26/10/2021 04:34 AM
Subject: Prestart Jobs for speeding up TCP/IP servers
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxxxxxxxx>



Hello,

when re-reading the Work Management PDF, I was hoping to find information
about prestart jobs in an SBS. Apparently these are *only* for SNA based
(APPC) communications. I've also read elsewhere that the older IBM http
server can run CGI programs in a "persistent mode", where a CGI ends after
serving requests, but isn't deactivated. But that's considerably long ago,
so please take my claim with a grain of salt. ;-)

What do I want to achieve? Currently, my tests show that spawn()'ing a job
from inetd takes stunning 2-3 seconds on my 150. We're talking about a
tiny (64 kBytes on disk) C application opening one database file.

https://en.wikipedia.org/wiki/Inetd

I feel that using some kind of prestart job somehow might lessen the time
until the job is ready to run. It would be perfectly okay if the *first*
start of the application after an IPL or restricted state or some other
disruptive system maintenance task isn't sped up. But subsequent
connections should be handled faster.

I'm also not exactly bound to use inetd. For the time being, it eases
testing and development, because I don't need to take care of the TCP
sockets stuff. But in the long run, I want to have a standalone TCP server
running in its own SBS together with child jobs serving requests.

What's your suggestion to achieve this "persistence"? Is that a real-world
scenario for named activation groups where applications which finished
their work stay active?

My preferred programming language for that application is C. But since
this is a general topic, I post my question here.

Thanks!

:wq! PoC

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com




--
This email has been scanned for computer viruses. Although MSD has taken
reasonable precautions to ensure no viruses are present in this email, MSD
cannot accept responsibility for any loss or damage arising from the use of
this email or attachments..
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.