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



Just wanted to run some things by you.

I have been looking through the source code and think I have reached a
point where I have a pretty good idea how the Jva4Gate is working.

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?

i appreciate your work on this.


On Sat, Aug 15, 2015 at 12:09 AM, D*B <dieter.bender@xxxxxxxxxxxx> wrote:

@ Alan:

Appserver4RPG is a living project, thow it might be not directly used by
much people. It's the base layer of ArdGate and Commandgate, which have
lots of productive installations all over the world. There is a
Presentation out in the web from an european common congress, search for
AppServer4RPG.pdf (if you don't find it, drop me a mail and I will send it
to you).
AppServer4RPG is designed to let your own code run on it; your java code
has to implement an interface and its name has to be added to the
configuration and afterwards you could "call" it from RPG. It will run
asynchronous in a preloaded JVM (very fast, stable and scalable). Put all
needed jars in the lib directory of the AppServer4RPG installation and
start the Server, no fiddling with classpath needed. The java part of
AppServer4RPG provides Session handling and a Context Object to hold your
statefull data.
If you are looking for an example with some more details than in the above
mentioned pdf, you should have alook to CommandGate, its very tiny (only 5
Java classes) and has all basics to see how it is working.


D*B
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.