thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Chung <>
Subject Re: How to detect client abort?
Date Mon, 28 Jan 2013 18:50:40 GMT
I'm reading a lot into your question, so apologies if I'm not answering the
correct question...

Basically, it's very difficult to get "exactly once" semantics in a client
server environment...over the ANY environment...without
esoteric frameworks like transactional queues or two-phase-commit
protocols. And the Thrift libraries are not going to help you in this
manner at all (unless you decide to implement your own transport).

You will have to implement something similar to what credit card processors
do to prevent duplicate transactions: allow the client to tag a request
with a client side transaction id and retry safely in the case of an
ambiguous response (aka lost response). This implies that the server has to
behave in an idempotent pays attention to client generated
transaction ids, takes precautions not to execute them twice, and formats
the response to a duplicate request (because the client retried)
identically as if it were the initial request.

Same with a cancellation operations.

These client generated transaction ids would be defined in the IDL as part
of the application level protocol.

In transactional theory, the client is acting as the transaction manager.

On Mon, Jan 28, 2013 at 2:13 AM, Vivek Goel <> wrote:

> Hi,
> I am using C++ thrift library.
> Is there a way to detect client abort and cancel the  request on server
> side?
> If not.
> What should be the best way to achieve this type of functionality?
> regards
> Vivek Goel

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message