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.
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.
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:
Is that what you were looking forCode:<int:service-activator input-channel="inChannel" . . .> <bean class="foo.bar.MyThriftClient"/> </int:service-activator>
Oleg Zhurakousky
Spring Integration team
http://twitter.com/z_oleg
http://blog.springsource.com/author/ozhurakousky/
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?
Thanks,
Mark
Mark Fisher
Spring Integration Lead
SpringSource, a division of VMware
http://www.springsource.com
http://www.springsource.org/spring-integration
http://blog.springsource.com/main/author/markf
Hi,
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.
Hi,
When thinking about supporting Apache Thrift we may also look at supporting other common protocols as well:
- Thrift - http://thrift.apache.org/
- Protocol Buffers - http://code.google.com/p/protobuf/
- Avro - http://avro.apache.org/
- MessagePack - http://msgpack.org/
Cheers,
Gunnar
Gunnar Hillert
SpringSource/VMWare, Spring Integration team
SpringSource Team - Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/ghillert
http://blog.hillert.com/
http://blog.springsource.com/author/ghillert/
Hi,
Does the current version of Spring support Apache Thrift? I want to run Thrist server inside my Jetty container.
Thanks.
Regards,
Rakesh
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... https://github.com/SpringSource/spri...ONTRIBUTING.md
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware