thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuxuan Wang (Jira)" <>
Subject [jira] [Commented] (THRIFT-5164) Go middleware support
Date Mon, 06 Apr 2020 22:53:00 GMT


Yuxuan Wang commented on THRIFT-5164:

[~jensg] I'm not sure that the middleware design is very transferable between languages? In
go although this touches TProcessor, we are more relying on TProcessorFunction, and the code
that was generated by thrift compiler but not defined in the public library interface (yet,
mainly the name from ProcessorMap and AddToProcessorMap), which I think varies language by
language? For example I cannot find the equivalent of TProcessorFunction in the Java version
(but I'm not very familiar with that so I might be looking at the wrong direction); And on
python we have TProcessor.on_message_begin (,
which is kind of a quite different approach for a similar problem.

What I'm trying to say is that the middleware solution seems quite language specific and probably
doesn't make sense to make it too formal and transferable between languages?

> Go middleware support
> ---------------------
>                 Key: THRIFT-5164
>                 URL:
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Go - Library
>            Reporter: Yuxuan Wang
>            Priority: Major
> I saw that this idea was discussed before in THRIFT-4553, but want to reopen the discussion
to see if there's a change of mind.
> We (Reddit) recently implemented TProcessor level middleware support in our Baseplate.go
library, and we think that our implementation is generic enough that it might make sense to
contribute that into the thrift library. The related implementation are all in this file:
is an example of how a tracing middleware is implemented.
> If we think that's a good idea, then we can contribute that into thrift repo (with renames,
of course). One implementation detail I'm not sure is that whether we want to expand the TProcessor
interface to also include ProcessorMap and AddToProcessorMap, or do we want to keep the two
iinterfaces separate.

This message was sent by Atlassian Jira

View raw message