New-age Transactional Systems - Not Your Grandpa's OLTP
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Mark Little on Dec 08, 2009
JAX-RS has been a standard for over a year and in that time there have been a number of implementations, such as RESTeasy, CXF and Jersey, the reference implementation. At the time it was finally ratified, Stefan Tilkov interviewed the specification leads, Marc Hadley and Paul Sandoz about their view on JAX-RS.
When the JSR was initiated, there were some doubts in the REST community about its chance of complying with REST’s key principles.
Marc thinks this goal has been met: I think the API encourages a resource-centric view and makes developers think about the identifiers of their resources and the methods they support. Declarative support for content negotiation works well and the default resource life-cycle encourages a stateless approach. If I had to identify a weakness it would have to be limited support for hypermedia as the engine of state - whilst we provide good support for extracting information from request URIs and building URIs to resources, its still very much left to the developer to use hypermedia in representations appropriately.
Paul agreed: Yes, this is probably the hardest area. JAX-RS provides a bunch of ways to construct URIs but there is no such URI binding facility with a modeling API, such as JAXB. I think there are some aspects we can explore in this respect, for example Henry Story’s RDF serialization.
The Java community has certainly seen an increase in the number of projects based on JAX-RS over the past 12 months and most people see this as a step in the right direction. However, not everyone agrees and recently Guilherme Silveira, the lead of the restfulie project, posted an interesting article comparing and contrasting his project with RESTeasy, though as several of the comments later pointed out, this should have more accurately been about JAX-RS and not any specific implementation. According to the resfulie site its aims can be summarized as:
CRUD through HTTP is a good step forward to using resources and becoming RESTful. Another step further into it is to make use of hypermedia-based services and the Restfulie gem allows you to do it very quickly.
In his posting, Guilherme points out several issues with RESTeasy [JAX-RS] that he believes makes it un-RESTful and which restfulie does not follow:
Jim Webber, whose writings have influenced restfulie, picked up on this posting:
Overall I think the theme of his analysis is accurate: RESTEasy doesn’t provide support for hypermedia out of the box, and that means it’s anything but RESTful.
However, he does go on to say:
But I don’t believe this is RESTEasy’s fault. In fact in the bizzaro-world that RESTEasy inhabits, I imagine it to be an exemplary citizen. Caught between the enterprise and the JCP, what choice would a sensible Java vendor have, other than to follow (and influence) the appropriate JSR? So it’s not RESTEasy (or Jersey, or CXF) that are at fault here, but the committee-driven process where folks with different goals and levels of understanding about REST have convened to drive out a lowest common denominator called JAX-RS (a poor name since at best JAX-RS provides a programmatic layer over a Web server).
Bill de hora in a comment to the post disagrees:
I've read this post and Guilherme's, looked at his framework and there's not much beef. I learned that JAXB == bad, but I use Jersey all the time on the server and on the client and have never used or had to use JAXB - that's internal to the implementation (transformation sugar for crappy type systems). Couldn't we taking potshots at almost *any* other "web" framework? Just think of the fun we could have with HttpClient or java.net.*. Just today I whipped up some nice client code on top of Abdera and Jersey client where the low level stuff is driven by links. It all works. If the problem is that the OO paradigm simply sucks for hypertext driven systems I'd buy that...
And Stefan Tilkov adds:
Restfulie makes some very specific decisions and comes up with a solution that is RESTful. But it's not a generic framework for building (any kind of) RESTful system. I don't think they compete, they address different problems domains.
And as John Nackman mentions to Guilherme on his original post ...
Interesting, but this isn’t really an objective analysis is it? At least on the part of RESTEasy you ignore the fact it is based on a standard. Or do you think that standards are not important for developers? I think a more thorough and objective discussion would be beneficial to the community as a whole.
So apart from stirring up a lot of discussions around whether or not the original article was accurate, does this mean JAX-RS has left too much unspecified? Are developers assuming too much from the current implementations? We'll give the last word to Bill Burke, RESTeasy lead:
RESTEasy and JAX-RS exist to help you write RESTful web services and clients. It is a tool. Hypermedia tends to be very application specific, so, IMO, there is only so much a framework can do before it starts to intrude too much into the design of an application. REST is architectural guidelines to help you write distributed interfaces. REST is not guidelines to help you write and design code. I got involved with JAX-RS because I thought it was the least intrusive way to help you write RESTful services. It gives developers a lot of flexibility on how they *implement* their RESTful services. IMPLEMENT is the KEY WORD here.
Note, we will be posting a separate interview with Guilherme later.
Paul and Marc's (spec leads) comments helped me to understand: JAX-RS helps with some keypoints in rest based systems and there is still room for improvement in the hypermedia space.
As Mike said: "does this mean JAX-RS has left too much unspecified? Are developers assuming too much from the current implementations? " and Bill's: "It gives developers a lot of flexibility on how they *implement* their RESTful services" its up to the developer.
We are looking for something that "constrains" the developer to be restful, so it seems its two different paths as Stefan mentioned. Nice summing up.
We are looking for something that "constrains" the developer to be restful, so it seems its two different paths as Stefan mentioned.
I think this is the key point. If you don't worry about the constraints and leave that up to the developer, then almost any platform out there could be considered "REST ready." However, many platforms and frameworks don't nudge developers in the right ways, and we have far too much inaccurate information out there regarding the REST constraints. For a framework to live up to the REST name, it should really push developers toward the constraints. Otherwise, it's just another framework. At best, it's CRUDEasy, though certainly REST is possible.
John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.
Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.
Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.
Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).
Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.
Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.
One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.
InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.
2 comments
Watch Thread Reply