Hi,

We're currently considering different RPC alternatives, and we're looking at using Thrift with the binary protocol over sockets, with the server implementation in cpp and client implementations in as many languages as possible, and I have a few questions.

First, some RPC mechanisms support the idea of objects; instances of interfaces that can be specifically addressed. If we, for example, were to create an interface to administrate virtual servers for Apache, it is IMHO much cleaner to

$object = $remote->getObject("/virtual.hostname");
$object->setServerAdmin("blahblah");
than
$remote->setServerAdmin("/virtual.hostname","blahblah");
(you'd have a bunch of methods, all of which start with the vhost parameter).

I can't seem to find anything similar in Thrift at the moment. Did I just miss it? If I didn't, are there any plans for functionality of this kind?


Second, it often is very useful to know where a request came from and how we got here. For example, it might be beneficial to limit the amount of requests per second per source IP, and for that we'd need the context the call came through. This could also be used to cache data on a per-client basis, and is useful for logging. Is there an easy way to get this from inside the interface implementation in your program?

Best regards,
Thorvald

Reply via email to