Kiril Kirov
Kiril Kirov

Reputation: 38173

Non - blocking RPC invocation, using gSoap

Is this even possible?

I know, I can make a one-way asynchronous communication, but I want it to be two-way.

In other words, I'm asking about the request/response pattern, but non-blocking, like described here (the 3rd option)

Related to Asynchronous, acknowledged, point-to-point connection using gSoap - I'd like to make the (n)acks async, too

Upvotes: 15

Views: 1722

Answers (4)

Cort Ammon
Cort Ammon

Reputation: 10903

You need a way to associate requests with replies. In normal RPC, they are associated by a timeline: the reply follows the response before another response can occur.

A common solution is to send a key along with the request. The reply references the same key. If you do this, two-way non-blocking RPC becomes a special case of two one-way non-blocking RPC connections. The key is commonly called something like request-id or noince.

Upvotes: 1

vanto
vanto

Reputation: 3142

I guess you would need to run the blocking invocation in a separate thread, as described here: https://developer.nokia.com/Community/Wiki/Using_gsoap_for_web_services#Multithreading_for_non-blocking_calls

Upvotes: 0

Rocker
Rocker

Reputation: 25

You can have client - server on both end. For example you can have client server on system 1 and system 2. (I specify sender as cient and receiver as server). You send async message from sys1 client to sys 2 server. On recieving message from sys1 you can send async response from sys 2 client to sys1 server back. This is how you can make async two way communication.

Upvotes: 0

Anand Rathi
Anand Rathi

Reputation: 786

I think that is not possible by basic usage, The only way to make it two way is via response 'results of the call'

But you might want to use little trick 1] Create another server2 at client end and call that server2 from server Or if thats not you can do over internet because of NAT / firewall etc
2] re architect your api so that client calls server again based on servers responce first time.

Upvotes: 0

Related Questions