Possible to have a persistent socket connection in an appser

Posted by Paul Radbone on 10-Dec-2014 05:14

Hi,

Is it possible to have a persistent socket connection in an appserver process, with a wait for, polling say, every second?

I've tried it and it just blocks any other requests to the appserver - Am I doing something wrong or is it just not possible?

I'm trialling the OpenEdge REST service and trying to work out the best way to get client requests sent over a socket from the appserver (which works ok) and then receive the responses back to the appserver for the client to pick up (the next time they poll).

It may be that an external process should pick up the responses over the socket and the appserver process should do a request on each client poll to see if it has any messages queued to send back?

Thanks,

Paul.

All Replies

Posted by Mike Fechner on 10-Dec-2014 05:21

“It may be that an external process should pick up the responses over the socket and the appserver process should do a request on each client poll to see if it has any messages queued to send back?”

Probably the best option. Have a java or .NET process handle the server socket and use the appropriate open client product to call into the AppServer. This will also allo to leverage multiple threads to deal with multiple network sessions in parallel.

 

Posted by Peter Judge on 10-Dec-2014 08:50

You would bind/ fully consume an agent process but I can't see why it wouldn't work. You wouldn't even need to poll – just use a wait-for 'u1' or something so you're in full control of when the wait-for terminates. If you don't want to consume a whole agent process, then you're out of luck.
 
Mike's answer is probably the best, practically, if you want the responses to the REST calls handled on the AppServer asynchronously.
 
If you have ABL clients you could look at making an sync call to the appserver – even though the Appserver code will execute synchoronously, you can process the response on the client in an async fashion. Depends what you're trying to achieve.
 
 
-- peter
 
[collapse]
From: paul.radbone@wins.co.uk [mailto:bounce-paulradbonewinscouk@community.progress.com]
Sent: Wednesday, 10 December, 2014 06:15
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] Possible to have a persistent socket connection in an appserver process?
 
Thread created by paul.radbone@wins.co.uk

Hi,

Is it possible to have a persistent socket connection in an appserver process, with a wait for, polling say, every second?

I've tried it and it just blocks any other requests to the appserver - Am I doing something wrong or is it just not possible?

I'm trialling the OpenEdge REST service and trying to work out the best way to get client requests sent over a socket from the appserver (which works ok) and then receive the responses back to the appserver for the client to pick up (the next time they poll).

It may be that an external process should pick up the responses over the socket and the appserver process should do a request on each client poll to see if it has any messages queued to send back?

Thanks,

Paul.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

This thread is closed