thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Reynolds <>
Subject Re: Thrift for usage on mobile clients?
Date Tue, 01 Mar 2016 22:47:34 GMT
Thrift is a serialization protocol, on top of which there is an RPC
protocol (an expanded serialization protocol).
These serialization protocols are agnostic about transport -- data
could come from strings, streams, files, whatever.
The RPC protocol is a data-request, data-response protocol, but also
is agnostic about HTTP/websockets, etc...
It has no notion of connections persistence (other than an expectation
of a response to an RPC request), or IP addresses, or sockets.
Thrift's HTTP wrapper that manages that but seems like its largely
independent from the serialization - as it should be.

So, in short can *can* do what you want, but you need to add your own
wrapper that *uses* thrift for serialization/RPC.
Its totally possible to multiplex bi-directional RPC on the same
connection/websocket (both client and server can initiate RPC requests
over a data route that can established independently to thrift).
However you need to add a wrapper that prefixes messages with a short
header to say what the role of each message is.
Is it an RPC request (dispatch to a 'Processor' object), or is it an
RPC response (dispatch to the 'Protocol' object)?
The header could be as simple as a single byte prefix.

- Stu

On Tue, Mar 1, 2016 at 9:09 AM, j.barrett Strausser
<> wrote:
> We have two different architectures.
> 1. If I need to send a mobile client a message I wait until the mobile
> client checks in e.g. the pattern is for the mobile client to ask and not
> to tell.
> 2. Some clients we run in a VPN so we essentially have a static ip provided
> by the Virtual IP.  This uses a fair amount of bandwidth and the VPN
> gateway becomes a SPOF.
> I would highly suggest going with option #1.
> Thrift does support SSL but some clients I don't think yet support Client
> and Server validation. In our case we built authentication that runs inside
> of SSL.
> -b
> On Tue, Mar 1, 2016 at 11:51 AM, Matt Chambers <> wrote:
>> > On Mar 1, 2016, at 11:44 AM, Thomas Witkowski <
>>> wrote:
>> >
>> > 1. But if the back-end wants to make a remote procedure call to a mobile
>> device, so the back-end is the client and the mobile device is the server,
>> the mobile device must open the connection in some way before, as the
>> mobile device's IP is a dynamic IP. This is, what I thought by "register"
>> to the back-end.
>> The mobile device would report into the server, but  then the server has
>> connect back to the client.  So you need thrift servers on both ends.
>> >
>> > 4. You are right here. Does Thrift supports SSL to secure a service?
>> >
>> Yes
> --
> @deepbearrito

View raw message