× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I may be missing your point Patrick - but your comment re persistence of CGI jobs is not correct.

For the most part persisted CGI jobs are basically a web implementation of a conventional 5250 one-user-one-signon-one-job scenario. In pother words if a request comes in from a specific endpoint it will always connect to the same server instance. That way you get to leave files open, keep variable content, etc. just as with a 5250 job. They still exist and I suspect are what all of the Open Access handler folks like Profound and Look use.

CGI jobs, in terms of the programs that run in them, are persistent in their own way - in other words once a program is initiated in one it stays around unless through its own actions or an error it terminates (LR on in RPG, end of run unit in COBOL, RCLACTGRP, etc.). What you _can't_ control without going the persistence route is whether you get connected to the _same_ instance of a program because your request may be allocated to a different thread. That's why CGI programs normally have to have some kind of state store/restore logic.

That said - Don's approach is a commonly used one but you can also have a pre-start job that just runs its own sockets interface - for example. Any non-interactive job can be restarted and will persist as will the state of the programs running within them unless you take actions to have them terminate.


Jon Paris

On Oct 25, 2021, at 5:31 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-2024 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.