Does anyone know of a way to reduce this time, as it can make things quite slow when numerous requests are made? It doesn't seem to be a network-related issue.
Many thanks in advance.
------------------------------
Simon Hawkins
General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
Does anyone know of a way to reduce this time, as it can make things quite slow when numerous requests are made? It doesn't seem to be a network-related issue.
Many thanks in advance.
------------------------------
Simon Hawkins
General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
A little further information: The way we use these API's is for internal (to our organisation/domains) updating purposes - not public/external access. So typically there would be hundreds of calls consecutively, but from the same user/machine/VS programme.
Just checking whether this Connection Pooling would benefit our scenario? It sounds to me as though it would.
In which case I would love to test it via a D3 evaluation system ID. Do I get in touch with the MBS boys in Melbourne to do so?
------------------------------
Simon Hawkins
General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
A little further information: The way we use these API's is for internal (to our organisation/domains) updating purposes - not public/external access. So typically there would be hundreds of calls consecutively, but from the same user/machine/VS programme.
Just checking whether this Connection Pooling would benefit our scenario? It sounds to me as though it would.
In which case I would love to test it via a D3 evaluation system ID. Do I get in touch with the MBS boys in Melbourne to do so?
------------------------------
Simon Hawkins
General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
A little further information: The way we use these API's is for internal (to our organisation/domains) updating purposes - not public/external access. So typically there would be hundreds of calls consecutively, but from the same user/machine/VS programme.
Just checking whether this Connection Pooling would benefit our scenario? It sounds to me as though it would.
In which case I would love to test it via a D3 evaluation system ID. Do I get in touch with the MBS boys in Melbourne to do so?
------------------------------
Simon Hawkins
General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
Also, remember whether you are calling a subroutine or doing a query you might have a delay in that routine as well. It is best to test the routine by itself so you know how long it takes it to do its thing.
Posted 07-14-2022 19:56
------------------------------
Doug Averch
------------------------------
Does anyone know of a way to reduce this time, as it can make things quite slow when numerous requests are made? It doesn't seem to be a network-related issue.
Many thanks in advance.
------------------------------
Simon Hawkins
General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
I would recommend it.
--
Alex Polglaze
The Book-Keeping Network
(08) 9349 9189
+61 419 776 348
apolglaze@book-keepingnetwork.com.au
https://www.book-keepingnetwork.com.au
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
------------------------------
Chris Wolcz
Senior Software Developer
Execontrol Global Solutions
Clifton Park NY US
------------------------------
Also, remember whether you are calling a subroutine or doing a query you might have a delay in that routine as well. It is best to test the routine by itself so you know how long it takes it to do its thing.
Posted 07-14-2022 19:56
------------------------------
Doug Averch
------------------------------
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
------------------------------
Chris Wolcz
Senior Software Developer
Execontrol Global Solutions
Clifton Park NY US
------------------------------
No - I don't receive any errors at all. The problem for me is purely the amount of time each call takes.
------------------------------
Simon Hawkins
Group General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
Also, remember whether you are calling a subroutine or doing a query you might have a delay in that routine as well. It is best to test the routine by itself so you know how long it takes it to do its thing.
Posted 07-14-2022 19:56
------------------------------
Doug Averch
------------------------------
The subroutines I use are just momentary file updates, so I'm pretty sure it's just the current necessity to open a new connection each time that's causing the delay. Also for my purposes, an occasional re-connection wouldn't be a problem - it's just the cumulation of hundreds of calls at three seconds each that slows things down.
So I will test connection pooling as per Brian's advice and Alex's recommendation.
------------------------------
Simon Hawkins
Group General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
Does anyone know of a way to reduce this time, as it can make things quite slow when numerous requests are made? It doesn't seem to be a network-related issue.
Many thanks in advance.
------------------------------
Simon Hawkins
General Manager
Queanbeyan Leagues Club
Queanbeyan NSW AU
------------------------------
- Do not have any expectations on first invocation - the connection pool server process will be a 'tabula rasa' - i.e. blank.
- Leave the connection pool server process in the state in which anyone else would want to find it, leaving nothing behind - e.g. record locks.
- If you need to have commonly re-used shared objects such as file handles that are opened once and once only and the kept open then put these in specific COMMON block variables and use program logic and matching boolean flags in COMMON so that they are opened once and once only. These will persist on the connection pooling server process and can be re-used by subsequent invocations. You can use one of two approaches here:
- Open all files on first invocation in case needed - this simplifies logic a little but at the expense of a potentially significant delay if a lot of files are opened in one fell swoop.
- Only open a file as it is needed by the application - this is generally a better approach if not all calls to a connection pooling process require all the files.
Regards
JJ
------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------
- Do not have any expectations on first invocation - the connection pool server process will be a 'tabula rasa' - i.e. blank.
- Leave the connection pool server process in the state in which anyone else would want to find it, leaving nothing behind - e.g. record locks.
- If you need to have commonly re-used shared objects such as file handles that are opened once and once only and the kept open then put these in specific COMMON block variables and use program logic and matching boolean flags in COMMON so that they are opened once and once only. These will persist on the connection pooling server process and can be re-used by subsequent invocations. You can use one of two approaches here:
- Open all files on first invocation in case needed - this simplifies logic a little but at the expense of a potentially significant delay if a lot of files are opened in one fell swoop.
- Only open a file as it is needed by the application - this is generally a better approach if not all calls to a connection pooling process require all the files.
Regards
JJ
------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------
Testing a batch of 110 consecutive calls, it took just a few seconds (after waiting three seconds for the initial connection). This would have taken more than five minutes with the original non-CP license. So I was very pleased with the result.
I had anticipated upgrading all three of our sites (D3 Servers) if I was happy with the results, but these CP licenses aren't cheap. So I've purchased for just one site, and am now using Super Q Pointers for communication between servers, which for our purposes is a perfectly good workaround for a more-economical outcome.
Thank you everybody for your assistance on this topic - all of your comments and suggestions were very helpful.
------------------------------
Simon Hawkins
Group General Manager
Canberra Raiders Group
Queanbeyan NSW AU
------------------------------
Testing a batch of 110 consecutive calls, it took just a few seconds (after waiting three seconds for the initial connection). This would have taken more than five minutes with the original non-CP license. So I was very pleased with the result.
I had anticipated upgrading all three of our sites (D3 Servers) if I was happy with the results, but these CP licenses aren't cheap. So I've purchased for just one site, and am now using Super Q Pointers for communication between servers, which for our purposes is a perfectly good workaround for a more-economical outcome.
Thank you everybody for your assistance on this topic - all of your comments and suggestions were very helpful.
------------------------------
Simon Hawkins
Group General Manager
Canberra Raiders Group
Queanbeyan NSW AU
------------------------------
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
Our three D3 servers are geographically spread out, but fortunately the communications within our domain are quite stable.
I will test the outcome by physically unplugging one of the remote D3 server's ethernet connection to see what happens.
------------------------------
[Simon] [Hawkins]
[Group General Manager]
[Canberra Raiders Group]
[Canberra] [ACT] [Australia]
------------------------------
Our three D3 servers are geographically spread out, but fortunately the communications within our domain are quite stable.
I will test the outcome by physically unplugging one of the remote D3 server's ethernet connection to see what happens.
------------------------------
[Simon] [Hawkins]
[Group General Manager]
[Canberra Raiders Group]
[Canberra] [ACT] [Australia]
------------------------------
Recommendations
OSFI programming:
As far as adding resiliency to the existing OSFI programming techniques, only a few changes need to be made:
- Any program (foreground or phantom) that opens OSFI files needs to have the following statements executed before opening, reading or writing OSFI files:
- EXECUTE \\NET-ERRORS (SL\\ CAPTURING JUNK
- The L options tells the system "log RFSE's, don't stop and prompt the user for intervention, don't drop to debugger".
- The S option suppresses echoing of the NET-ERRORS state, probably redundant with CAPTURING JUNK clause.
- EXECUTE \\SET-REMOTE-CLOSE (N\\ CAPTURING JUNK
- Normally when remote files are opened, the file handle is cached by D3 and never explicitly closed, even by a CLOSE statement. This was done to enhance throughput. Setting remote close on allows explicit closing of remote files so that cached handles for no-longer-available resources do not linger to cause problems, as in a temporary network problem.
- Any program accessing OSFI files should keep them open for as narrow a window as practically dictated by throughput need. Ideally when a single record is going to be read and then written, the flow should be:
- Open
- Read and/or Write
- Close
- EXECUTE \\NET-ERRORS (SL\\ CAPTURING JUNK
within the inner loop, not opened at the top of the program and closed at program termination. Exceptions would be when processing a significant number of records in a short period of time where the preferred flow should be:
- Open
- Read and/or Write all records
- Close
within the inner loop.
- In programs that open more than one OSFI file, it's a good idea for any OPEN/ELSE logic to close all OSFI files opened in the program to make sure that none get missed. Example:
- OPEN RMTFLE1 TO FILE1 ELSE GOTO EXIT
- OPEN RMTFLE2 TO FILE2 ELSE GOTO EXIT
Then at exit:
- CLOSE FILE1
- CLOSE FILE2
In the event that the first OPEN was successful and the second OPEN failed, the first file needs to be closed on exit, and it doesn't hurt anything to close a file that was never successfully opened.
- All WRITEs performed on OSFI files should use the ON ERROR clause to recover from a failed write.
- Any ELSE clause on a failed OSFI OPEN or ON ERROR clause on a failed OSFI WRITE should handle a graceful close of all OSFI files and exit from the program, and optionally a wait and retry cycle. To the degree that an ELSE clause on a failed read can be certainly attributed to a network error (and not merely a record that genuinely does not exist) should follow the same cleanup and exit path and optional wait and retry cycle.
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
Recommendations
OSFI programming:
As far as adding resiliency to the existing OSFI programming techniques, only a few changes need to be made:
- Any program (foreground or phantom) that opens OSFI files needs to have the following statements executed before opening, reading or writing OSFI files:
- EXECUTE \\NET-ERRORS (SL\\ CAPTURING JUNK
- The L options tells the system "log RFSE's, don't stop and prompt the user for intervention, don't drop to debugger".
- The S option suppresses echoing of the NET-ERRORS state, probably redundant with CAPTURING JUNK clause.
- EXECUTE \\SET-REMOTE-CLOSE (N\\ CAPTURING JUNK
- Normally when remote files are opened, the file handle is cached by D3 and never explicitly closed, even by a CLOSE statement. This was done to enhance throughput. Setting remote close on allows explicit closing of remote files so that cached handles for no-longer-available resources do not linger to cause problems, as in a temporary network problem.
- Any program accessing OSFI files should keep them open for as narrow a window as practically dictated by throughput need. Ideally when a single record is going to be read and then written, the flow should be:
- Open
- Read and/or Write
- Close
- EXECUTE \\NET-ERRORS (SL\\ CAPTURING JUNK
within the inner loop, not opened at the top of the program and closed at program termination. Exceptions would be when processing a significant number of records in a short period of time where the preferred flow should be:
- Open
- Read and/or Write all records
- Close
within the inner loop.
- In programs that open more than one OSFI file, it's a good idea for any OPEN/ELSE logic to close all OSFI files opened in the program to make sure that none get missed. Example:
- OPEN RMTFLE1 TO FILE1 ELSE GOTO EXIT
- OPEN RMTFLE2 TO FILE2 ELSE GOTO EXIT
Then at exit:
- CLOSE FILE1
- CLOSE FILE2
In the event that the first OPEN was successful and the second OPEN failed, the first file needs to be closed on exit, and it doesn't hurt anything to close a file that was never successfully opened.
- All WRITEs performed on OSFI files should use the ON ERROR clause to recover from a failed write.
- Any ELSE clause on a failed OSFI OPEN or ON ERROR clause on a failed OSFI WRITE should handle a graceful close of all OSFI files and exit from the program, and optionally a wait and retry cycle. To the degree that an ELSE clause on a failed read can be certainly attributed to a network error (and not merely a record that genuinely does not exist) should follow the same cleanup and exit path and optional wait and retry cycle.
------------------------------
Brian S. Cram
Principal Technical Support Engineer
Rocket Software
------------------------------
My previous post bravely asserted "fortunately the communications within our domain are quite stable", which turned out to be a rookie error, as links dropped out on Saturday afternoon, and with the Super Q Pointers still trying to tick away, things blew up in a big way.
So I will incorporate your OSFI suggestions into my programming and then give it a good test.
------------------------------
Simon Hawkins
Group General Manager
Canberra Raiders Group
Canberra ACT Australia
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.