We have a j2ee/spring/hibernate/tomcat web application already running on production. We are planning to integrate with a 3rd party service(recurly) which provides a ruby client lib. They don't have a java client lib yet. Th开发者_开发知识库eir service is RESTful and their client is a thin custom wrapper over ActiveResource. I can think of a few ways to do this:
a) jruby?
b) Run a simple ruby xml rpc daemon that calls the actual ruby lib internally ? I believe xml rpc is easy in java.
c) Thrift ?
d) Implement a java lib that talks to their RESTful service(more dev time?)
What would be the quickest way to do this ?
Given that it's a simple REST API (for example, see http://support.recurly.com/faqs/api/accounts), I'd just replicate the ruby library in Java, it should be simple enough, could get you some karma on recurly guys if you can/will share it back and will avoid any integration or compatibility problems that might arise using an external daemon or jruby or thrift (the more components you add to your code, the more fragile it gets.)
Not necessarily the quickest but the safest route IMO. See here for what to use to implement the library if you deem it necessary.
精彩评论