|
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.
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.
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.
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.
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.
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?
As an Amazon Associate we earn from qualifying purchases.
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.