External aux service

Open discussion forum. For topics that do not fit anywhere else.

Moderator: POL Developer

Locked
daneel
New User
Posts: 12
Joined: Fri Feb 03, 2006 5:47 am
Contact:

External aux service

Post by daneel » Mon Apr 02, 2007 4:06 am

Hello :)

I don't know if this is the precise place where to post this, sorry in advance if it's not..

Anyway, here's my problem: I want my POL (095) server to be able to use a simple Java service that will be hosted in the same host where POL runs.

I'd like to do this because otherwise I'd have to implement the same thing in POL which is not so simple. This Java program is a very simple server, so I'd like POL to talk to it.

Now, all I know about this is that POL can listen on a certain port and receive and send packets through the net connection, but can't instead start a conversation itself.

So, what's the best way to accomplish the task? The only one I see by now is making POL listen on a port and then at start-up, after launching POL, launch the Java service for it to wait for packets from POL which represent requests for service.

But this isn't so good for many reasons.. for example, I can't "spawn" new instances of the Java services on demand because it's not POL who starts the conversation (unless I complicate the protocol very much).

Do you have any suggestions?

Thank you :-)

tartaros
New User
Posts: 28
Joined: Tue Mar 27, 2007 6:30 am
Contact:

Post by tartaros » Mon Apr 02, 2007 6:15 am

have the java program periodically try to connect to the given port and/or check for running processess, and if you see POL, try connecting...

User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm
Location: Nederland, Texas

Post by tekproxy » Mon Apr 02, 2007 6:19 am

You could also write a third program that establishes a connection with POL and whenever POL sends a command, it would connect to your Java server and relay the information. Actually, that program would be handy in general since adding outgoing aux connections probably wont exist in POL for a while.

Locked