Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Concurrent async calls in TclSOAP

22 views
Skip to first unread message

pal...@yahoo.com

unread,
Jul 1, 2008, 9:18:27 AM7/1/08
to
I'm writing a JSON-RPC client implementation, and thought it would be
best to tack it on to TclSOAP as another option alongside XML-RPC and
SOAP.

One thing I have not figured out about the package is how it deals
with multiple async calls from the application code. For example,
(from the TclSOAP docs)

proc gotInfo {window data} { ... }
SOAP::configure getInfo -command {gotInfo .frame1.edit} ...

So when I invoke the getinfo call, it will call back the gotinfo proc
which will (say) insert the returned result in to the text widget.

Now if I want to have multiple simultaneous async calls to getinfo
(with multiple parameters, say) and want to display the results in
different windows, how would I do that? There does not seem to be a
token or other handle that the interface provides to be able to
distinguish between results from multiple calls. Since the async
command callback is associated with the rpc call definition, and not a
specific invocation, the application itself cannot use an additional
token in the callback arguments to distinguish multiple calls.
(Actually, it can but will need to create separate rpc stubs for each
call to the same remote proc which would be really tacky).

Am I going about this wrong or is this a legitimate shortcoming in the
TclSOAP package?

/Ashok

Gerald W. Lester

unread,
Jul 1, 2008, 10:16:10 AM7/1/08
to
pal...@yahoo.com wrote:
> I'm writing a JSON-RPC client implementation, and thought it would be
> best to tack it on to TclSOAP as another option alongside XML-RPC and
> SOAP.
>
> One thing I have not figured out about the package is how it deals
> with multiple async calls from the application code. For example,
> (from the TclSOAP docs)
>
> ... There does not seem to be a

> token or other handle that the interface provides to be able to
> distinguish between results from multiple calls. Since the async
> command callback is associated with the rpc call definition, and not a
> specific invocation, the application itself cannot use an additional
> token in the callback arguments to distinguish multiple calls.
> (Actually, it can but will need to create separate rpc stubs for each
> call to the same remote proc which would be really tacky).
>
> Am I going about this wrong or is this a legitimate shortcoming in the
> TclSOAP package?

IMHO, this is a design flaw. It should take it on the invocation (or have a
async invocation call).


A side issue, there have been several post over the last couple of months
about JSON-RPC -- have ya'll coordinated efforts?

Lastly, would JSON-RPC make more sense being added to the Web Services for
Tcl rather than TclSOAP, i.e. what level is it really at? (Mind you I'm not
familiar with JSON).


--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+

pal...@yahoo.com

unread,
Jul 2, 2008, 1:15:42 AM7/2/08
to
Googling did not show up anything concrete for a Tcl implementation of
JSON-RPC. Hence I starting hacking at TclSOAP. If someone else is
already doing this (JSON-RPC, not JSON), I'd happily back off :-)

Regarding your other question, JSON-RPC really competes with SOAP and
XML-RPC so would seem to fit in TclSOAP, rather than Web Services.

For now, I'll stick to TclSOAP's async model (single outstanding call
for a specific RPC) . Doing anything else would seem to break TclSOAP
backward compatibility.

/Ashok

On Jul 1, 7:16 pm, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:

0 new messages