Announcement Announcement Module
No announcement yet.
Thrift? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Thrift?

    Hi all,

    Are there any plans to offer functionality to interact via Apache Thrift? Has anyone here used Spring Integration with Thrift, perhaps over AMQP? I'd be very grateful to hear about any such experiences.

  • #2
    I've never heard of Apache THrift, but looking at it now it seems like there is not much or anything that needs to be done. The way I understand it Apache Thrift will generate client code fo you in the language of your choice and Java is one of them. So once the Apache Thrift RPC code is generated you can simply invoke it using Service Activator. For example:
    <int:service-activator input-channel="inChannel" . . .>
          <bean class=""/>
    Is that what you were looking for


    • #3
      Actually, I have considered Thrift support for a while, and we could probably add implementations of our Serializer/Deserializer strategies at first. It might even be a candidate for inclusion in the "data-commons" module rather than spring-integration itself. One issue is that the model is generally coupled to the generated classes, and that's something that we can't handle generically, of course.

      Can you explain a bit more about what you have in mind for your particular use-cases?



      • #4

        Thanks for your replies.

        I'm afraid I don't really have any hard-and-fast requirements. I've been playing with Spring Integration and AMQP recently, but have been asked at work to implement a set of systems that communicate via Apache Thrift, which I know little about.

        It appears to me that Thrift solves two problems - intermediate data representation, and client/server stubbing. It's weakness as I understand it is that it's a point-to-point communications system between two known points, increasing coupling and not allowing for things like publish/subscribe models. This could be overcome by sandwiching a messaging system between Thrift endpoints, but this seems like a bloated solution.

        Have I misunderstood Thrift? I'm thinking some kind of Thrift serialization adapters/transformers for Spring Integration would be a benefit to some.


        • #5

          When thinking about supporting Apache Thrift we may also look at supporting other common protocols as well:




          • #6

            Does the current version of Spring support Apache Thrift? I want to run Thrist server inside my Jetty container.




            • #7
              There is not currently any built-in support but, as Mark said last year, we'd like to get support into the framework at some point.

              That said, it's easy to write your own POJO that can use any technology (such as Thrift) and simply drop it into a Spring Integration as a <transformer/>, <service-activator/> etc.

              If you'd be interested in contributing something, we'd be happy to take a look...