× 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.



Hi Alan,

first some inline comments to your thoughts:

What I am wanting to do is to create a project where the interface is not a
data queue but a socket server. I see if working as follows:
1. The main method will be the socket server.and will fork off threads to
run a socket worker each time a connection request comes in. I have found
code on-line doing just that using the Executor you are using.


AppServer4RPG ín its current version is using dtaqs to send packages of 512 bytes in both directions and only 3 components (´Sender.java, Receiver.jave and JVAGATE.RPGLE) would see any changes, if ths would be changed to using sockets communications. First step to enable this would be some refactoring to extract the base layer of communication. After this Socket communication could be added and made configurable and every installation could decide, what is working better in its environment.

2. Socket Worker will communicate with RPG service program running the
socket client and establish the connection. All the socket functions are
already built as part of my iProc project in a service program.

If this SRVPGM can send a package of a fixed length, it could be used to implement the base communication layer. It could be loaded dynamically by name and be plugged in alternatively to the existing DataQ version. JVAGATE has the logic to transport streams up to 65535 Bytes, this could be changed even to unlimited, if needed; no files needed, just passing and receiving streams.

3. Socket worker will receive the user name and password and establish a
JDBC connection to a iSeries database.
4. Socket worker waits for requests. The request will consist of a function
name and version.
5. Socket worker will translate Function Name and Version to a Java Class
through a lookup on an iSeries table through a separate class. I do this so
you can add security.

The only change I see, is shifting part of the configuration from global.properties to an as400 database file. If it's security, we should discuus if this is adding security and if there are alternatives.

6. Socket worker streams in a UTF-8 text files containing XML or JSON or
just text strings. The actual request to be processed. This is the one area
where I am still struggling a bit. The simplest way is to simply stream to
a UTF-8 text file and pass the name but I have got feedback on other
project that you never use files. It is too slow and you should put
everything in memory streams but this raises question about passing a
memory stream around.

This could be done with the current implementation (over DataQ). AppServer4RPG doesn't looka at the data it transports. The upper Layer (RPG) and the Eventhandler could talk PORDS2POJO (as used with JDBCGATE and CommandGate, JSON, or chinese-

7. Socket worker starts Java Class. Results are written to another UTF-8
text file or some kind of memory stream.
8. When worker get control back it streams the result back to the requester
and goes back to wait for the next request.

No additional work to do, it's included above.

So my question to you. This is substantially a new project. Communications
is pretty much completely rewritten. The AS400 class is gone. Should I
start a new project that just references your project or try to somehow fit
it into your project?

Appserver4RPG is Open Source, it's your choice to build another version or make a partly rewrite, or whatever you want. Another possibility could be to join the project and we could try to bring your thoughts into the existing project. Doing it this way, we must have in mind, that there are several installations out there, running in production.

Dieter

PS: maybe you should contact me out of the list, if you want.









As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.