Topics

Featured in Development

Peter Alvaro talks about the reasons one should engage in language design and why many of us would (or should) do something so perverse as to design a language that no one will ever use. He shares some of the extreme and sometimes obnoxious opinions that guided his design process.

Featured in AI, ML & Data Engineering

Today on The InfoQ Podcast, Wes talks with Katharine Jarmul about privacy and fairness in machine learning algorithms. Jarul discusses what’s meant by Ethical Machine Learning and some things to consider when working towards achieving fairness. Jarmul is the co-founder at KIProtect a machine learning security and privacy firm based in Germany and is one of the three keynote speakers at QCon.ai.

Featured in Culture & Methods

Organizations struggle to scale their agility. While every organization is different, common patterns explain the major challenges that most organizations face: organizational design, trying to copy others, “one-size-fits-all” scaling, scaling in siloes, and neglecting engineering practices. This article explains why, what to do about it, and how the three leading scaling frameworks compare.

I'm interested in comparing the following aspects of the JAX-RS implementations that extend beyond "pure" JAX-RS.

Which amongst others include:

Maturity of the product

Server-side Integration Strategies

Java Client API

Configurability

Security

Performance

Solomon states that "Jersey is meant as a reference implementation. RESTEasy is a playground for new ideas. CXF has an "enterprise version" supported by IONA. The Restlet project grew out of a desire to have a RESTful API alternative."

Although on the comments to the blog, Bill Burke counters:

RESTEasy is not just a playground for new ideas. We're actually going to be supporting it within JBoss very soon (as soon as I can get my hands on the TCK!) and have a number of large customers who already use RESTEasy breathing down our necks to do so.

In terms of ease of use, Solomon has this to say so far:

The problem you face is deciding an implementation. I found Jersey really easy to start with, although Bill [Burke] would argue that RESTEasy is just as simple. They both are meant to work with EJB.

Still, play around with Jersey... It shouldn't take you too long to get a HelloWorldService up and running, especially if you download NetBeans. I used Jersey and NetBeans for the first time, and was up and running within a half an hour, and that included downloads, installations and code surfing.

Folks at Sun are keen to distance Jersey from the traditional thoughts people have about "reference implementations":

When you get to "Product Purpose", make sure you consider Jersey as a "production-ready" product (bundled in GlassFish v3 "Prelude" shipping next month as a matter of fact). The team has just spent way too much time testing and improving the code to have it be dismissed as the "reference implementation" ! :)

Solomon's plan is to research each of those aspects and post updates in subsequent blog entries. A JAX-RS Spring Integration entry has already appeared.

The four current JAX-RS implementations provide Spring integration, even JBoss's RESTEasy.

He goes on to give a fairly brief description of the integration and in the case of Jersey references old material as Paul points out. It's a shame because there is a need for an in-depth comparison. Solomon concludes that:

There are really fantastic Spring/JAX-RS capabilities through out the four implementations, but I think that CXF takes my vote for "Best Spring integration in a JAX-RS product."

But obviously this is his opinion and others disagree. For example, Bill Burke asks:

I don't see how CXF Spring integration is any better than the rest. I don't see the need/reason for all the extra CXF-specific XML within a Spring XML file. The Spring integration provided by both RESTEasy and Jersey seam less intrusive than what is required by CXF. Or am I wrong?

To which Solomon replies:

annotation driven approaches work well if there is a single configuration being used per class which is pretty much what you need 90%+ of the time. The other 10%- requires multiple configurations of the same Resource in multiple contexts. I know that I'll need that 10%- type solution based on the requirements and current deployments of the functionality that I'm updating. [...] CXF gives you the additional ability to deploy the same Resource, configured differently (different JDBC sources, different service implementations and etc) through the same spring.XML file. Basically, annotations work great most of the time, but sometimes you have to fall back to external configuration alternatives for the decoupling benefits. The XML alternatives aren't as sexy as annotations, but they work for more complex configuration cases."

Maybe something that could have been brought out in a more detailed comparison?

Re: Need a new comparison

Your message is awaiting moderation. Thank you for participating in the discussion.

can anyone please let me know the pros and cons of resteasy vs jersey.if it helps : I am new to both the framework..Have prior knowledge of XML, JSON, Tomcat and MVC FrameWorks.I have used little bit of spring but new in JBOSS and EJB.Performance is the criteria.I need it for a eCommerce website supporting html5 (possibly running for all mobile platforms) and restful apis.