Java News Brief (JNB): An Introduction to JAX-RS and Jersey
This month's OCI Java News Brief (JNB) is online now, in which Brian Gilstrap gives An Introduction to JAX-RS and Jersey.
Brian Gilstrap: If you aren't already involved in building RESTful web services, you may not be aware of JSR 311. JSR 311 is "JAX-RS: The Java™ API for RESTful Web Services". Its goal is to "develop an API for providing support for REST-ful (REpresentational State Transfer) Web Services in the Java Platform". If you aren't familiar with REST, you may want to read the Wikipedia page that describes REST. That page also has good links to other online resources regarding REST. In short, REST is an architectural approach to building robust, easy-to-use web services that are well-connected to themselves and easy to connect to each other. It follows the basic paradigm of the world wide web as you browse it every day, and is a powerful approach to building web services.
The JAX-RS specification describes an API for developers that greatly simplifies the process of building (RESTful) web services. The fundamental idea behind JAX-RS is that developers spend little or no time marshalling and unmarshalling requests and responses, and instead build Plain Old Java Objects (POJOs) for individual resources and for collections of resources. The JAX-RS implementation coordinates with the web server or container to make those resources available via URLs and to convert the HTTP requests into Java objects, and to convert Java object resource representations into HTTP responses. The reference implementation for JAX-RS is called "Jersey" and the project is hosted on the dev.java.net site. Jersey itself is implemented for Java 5 (and later) and can be integrated with a number of different containers and HTTP servers.
A particularly compelling way to use Jersey is to combine it with the Project Grizzly HTTP server. Project Grizzly provides a high performance HTTP server, and it makes building standalone web services amazingly easy. All of the examples presented here use this approach. However, Jersey can be just as well be integrated with many other web containers, including just about any standard servlet container or J2EE environment, such as Tomcat, WebLogic, or WebSphere.
In addition to the server-side API and implementation, Jersey provides a client API, used to write clients of RESTful Web Services. The client API is also used by service implementations which are themselves clients of other RESTful services.
Brian has been researching this topic for quite some time and wrote a series of blog entries as he went along. He will be presenting on this topic at the St. Louis JUG in November.
Incidentally, Brian first presented at the St. Louis JUG more than 12 years ago, in January 1998. The topic—RMI and CORBA. Distributed computing never gets old.
Anybody want to predict what topic Brian will cover at the JUG in 2021?
OK. Enough of the nostalgia nonsense. Go read the article. I will do that now!
OpenDDS 1.3 Released
Adam has announced a new release of OpenDDS, an open source implementation of the Object Management Group (OMG) Data Distribution Service (DDS) by OCI. It is implemented in C++ and supports C++ and Java bindings.
OpenDDS.org:Version 1.3 Released
We are pleased to announce the release of OpenDDS version 1.3!
- Improved OMG DDS 1.2 specification conformance:
- Communication Status entity structures and behaviors
- Implemented TRANSPORT_PRIORITY and LATENCY_BUDGET QoS
- Implemented the ReadCondition interface and associated operations on the DataReader
- Partially implemented the QueryCondition interface—only queries of the form "ORDER BY a[, b, c...]" have any effect
- Implemented DataWriter::wait_for_acknowledgements()
- Instance handles and related operations are now spec-compliant
- Fixed bugs in DURABILITY, PARTITION and LIFESPAN QoS
- Added a command-line utility, opendds_repo_ctl for controlling the DCPSInfoRepo server
- Deleting a DataWriter now blocks, for a configurable amount of time, until pending samples have been delivered by the transport.
- Added a Java Message Service 1.1 (JMS) provider built on top of OpenDDS
- Added Windows Mobile 6 as a supported platform
See the Release Notes for details.
Alex Miller: Strange Loop Sessions Announced!
Alex Payne, Charles Nutter, Guillaume Laforge, Alex Buckley, Bob Lee, Mark Volkmann, Jeff Brown, Mario Aquino, and more...
Alex Miller (on lambda-lounge mailing list): Check out the list here:
http://thestrangeloop.com/sessions/list
And some more commentary here:
http://thestrangeloop.com/blog/09/07/27/strange-loop-technical-sessions-announced
Several loungers will be presenting (Mark Volkmann, Mario Aquino, Ken Sipe, Jeff Brown, Matt Taylor) as well as a slew of other talks of likely interest to this group by people like Dean Wampler, Charles Oliver Nutter, Guillaume Laforge, Hamlet D'Arcy, and more.
Register here:
http://www.busyeventxp.com/strangeloop
Thanks! Especially to fellow loungers who helped vet the talks - Weiqi, Ken, and Scott. If you want to help me get the word out by blogging, tweeting, etc that would be helpful.
Alex
Alex Miller on TheStrangeLoop.com: I've also finalized the registration and fee schedule. The current registration price is just $75. For an awesome day and a half of technical talks, lunch, and a party, that's a heckuva bargain in my book. But it won't last long—that price is only available till August 14th. After that, the price goes up, so don't delay!
- $75 (till Aug. 14th, 2009)
- $110 (till Sep. 18th, 2009)
- $130 (till Oct. 21st, 2009)
- $150 (on-site Oct. 22nd, 23rd)
Friday Algebra Quiz: Find The Roots
Haven't posted a quiz for a while. Tom Wheeler's post on the SLUUG mailing list about 100 Things Your Kids May Never Know About prompted me to go on the internet looking for some of the things I remembered from my childhood.
And hours later (you know how it goes: first you go crazy with Google searches, then you get sucked into Wikipedia following hundreds of must-follow links, etc.) I landed here:
It's a college algebra text book from 1904. Does this look like what your college-age kids can handle now? How about you? Are you up to it?
Q: What are the roots of the equation x3 - 9x - 28 = 0?
Strict rules apply: No Mathematica, Maple, MATLAB, WolframAlpha, or any computerized algebra tools.
No Language Is Simple That Begins With...
... something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<blah xmlns="http://www.blahblahframework.org/schema/blahblahblah"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blahblahframework.org/schema/blahblahblah
http://www.blahblahframework.org/schema/blahblah/blahblah-blahblahblah-2.0.xsd">
<!-- YOUR CODE HERE -->
</blah>
C++0x Rejects Concepts Proposal
(Via Lambda the Ultimate.)
Danny Kalev (reporting for InformIT): On Monday, July 13th 2009 Concepts were dramatically voted out of C++0x during the C++ standards committee meeting in Frankfurt. This shocking news raises many questions and concerns. Unquestionably, these will be discussed in various forums in coming weeks and months. However, I will try to answer three burning questions here: What led to the failure of Concepts? How will the removal of Concepts affect C++0x? Will Concepts make a comeback in the near future?
Jeremy Siek (reacting on LtU): As one of the co-authors of the Concepts proposal, this was a particularly sad day for me.
As a casual observer of the C++0x process, I'm surprised at several levels:
- that the C++ community could deem something "too complicated";
- that something that is to simplify C++ could itself become so complicated;
- and that the C++ standards committee is capable of generating such shocking news
Looking at the bright side, C++0x will still have closures.
Another JUG Meeting, Another Messaging Protocol
Last night's presenter at the St. Louis Java Users Group is Kevin Nilson who gave a fascinating talk about Pushing Data to the Browser with Comet.
I came into the presentation not knowing what Comet is, exception what I heard on the internet. Kevin did a great job explaining what Comet is. The most valuable part of the presentation is the demonstrations Kevin did, which are fun and informative.
I'll let you read an article by Kevin himself to get the gist of what the subject matter is. I'll just show the words I wrote down during the talk:
- Jetty
- Pub/Sub
- Bayeux
- JASONp
- script tag
- XSS
- Cometd
- Long polling
- Channel
- Service channel
- Meta channel
- Server crash
- Client auto-reconnect
- JSON on the wire/HTTP
The background conversation at the JUG is also informative:
- Is Scala for real? Kevin told us its the hottest thing at Silicon Valley. Mark and I still have some lingering doubts. Mark is focusing on something called persistent data structures. I'm more of a Luddite, fearing the years of learning that I have to go through to be proficient in Scala.
- At the end of the session, when Brian went up the stage to run the Birthday Selector application to give away the goodies, Kevin Nilson mentioned the Wheel of Fortune application that Jim Weaver wrote for his JUG. Small world.
- Ken Totton (of OCI, where I work) is still looking for top notch Java architects and developers. Send me an email at "weiqigao at speakeasy dot com" if you are interested. A couple of other places are also recruiting.
- Brian asked a question about MigLayout. He's reading the OCI May Java News Brief on MigLayout. I gave him an meta-answer: "Just blog about how it doesn't work, and the MigLayout author will comment on your blog and show you the right answer."
Coming back to Cometd, I do have one reservation: It's another messaging protocol. This is the rare occasion when my Java duties intersect with my messaging protocol-watching duties. It reminds me something Paul says around the office: "You can always define a Pub/Sub protocol on top of a Request/Response protocol. And you can always define a Request/Response protocol on top of a Pub/Sub protocol."
This post also appears under the title "Kevin Nilson: Pushing Data To The Browser With Comet".
Kevin Nilson: Pushing Data To The Browser With Comet
Last night's presenter at the St. Louis Java Users Group is Kevin Nilson who gave a fascinating talk about Pushing Data to the Browser with Comet.
I came into the presentation not knowing what Comet is, exception what I heard on the internet. Kevin did a great job explaining what Comet is. The most valuable part of the presentation is the demonstrations Kevin did, which are fun and informative.
I'll let you read an article by Kevin himself to get the gist of what the subject matter is. I'll just show the words I wrote down during the talk:
- Jetty
- Pub/Sub
- Bayeux
- JASONp
- script tag
- XSS
- Cometd
- Long polling
- Channel
- Service channel
- Meta channel
- Server crash
- Client auto-reconnect
- JSON on the wire/HTTP
The background conversation at the JUG is also informative:
- Is Scala for real? Kevin told us its the hottest thing at Silicon Valley. Mark and I still have some lingering doubts. Mark is focusing on something called persistent data structures. I'm more of a Luddite, fearing the years of learning that I have to go through to be proficient.
- At the end of the session, when Brian went up the stage to run the Birthday Selector application to give away the goodies, Kevin Nilson mentioned the Wheel of Fortune application that Jim Weaver wrote for his JUG. Small world.
- Ken Totton (of OCI, where I work) is still looking for top notch Java architects and developers. Send me an email at "weiqigao at speakeasy dot com" if you are interested. A couple of other places are also recruiting.
- Brian asked a question about MigLayout. He's reading the OCI May Java News Brief on MigLayout. I gave him an meta-answer: "Just blog about how it doesn't work, and the MigLayout author will comment on your blog and show you the right answer."
Coming back to Cometd, I do have one reservation: It's another messaging protocol. This is the rare occasion when my Java duties intersect with my messaging protocol-watching duties. It reminds me something Paul says around the office: "You can always define a Pub/Sub protocol on top of a Request/Response protocol. And you can always define a Request/Response protocol on top of a Pub/Sub protocol."
That why this post will also be available under the title "Another JUG Meeting, Another Messaging Protocol". :)
JavaFX Application Goes Production, Opens Door For Musicians
(Via twitter (what else?).)
(As Seen On The INTERNET:
)
Weezer frontman Rivers Cuomo: "It's like a simplified version of any of these complex professional recording programs that no one like me knows how to use," said Weezer frontman Rivers Cuomo, who agreed to endorse the program although he says he normally refuses such requests. "It's going to open the door for a giant population of musicians out there."
Jim Weaver: One of the main reasons that Indaba chose JavaFX/Java is that it enables recording high-quality audio directly onto the client platform. This is achieved by leveraging the capability of JavaFX to call Java methods, and Java to call JavaFX functions. One person with whom we work closely is Bjorn Roche, who created a Java-based facility and API that interacts with the audio capabilities of the client machine. The JavaFX portion of the Console provides most of the UI, and uses the Java-based API when it needs to play a track, apply audio effects, render a sound-wave, or record music. This Java library then invokes JavaFX callback functions as it is doing its work.
It's great to see a real JavaFX application go online. Congratulations to Jim Weaver and the Indaba team. And let's not loose sight that this application is launched a mere seven months (and five days) after JavaFX 1.0 was released.
[Disclaimer: I'm not a musician, so I can't tell you how I would have liked or not liked this application.]
Have You Ever Seen This?
This is not a quiz. It's something that just happened to me. I'm just wondering if I'm the only one who are experiencing this.
[weiqi@gao ~]$ ls ls: cannot open directory .: No such file or directory
Google Chrome Operating System
Sundar Pichai, VP Product Management and Linus Upson, Engineering Director, Google: It's been an exciting nine months since we launched the Google Chrome browser. Already, over 30 million people use it regularly. We designed Google Chrome for people who live on the web — searching for information, checking email, catching up on the news, shopping or just staying in touch with friends. However, the operating systems that browsers run on were designed in an era where there was no web. So today, we're announcing a new project that's a natural extension of Google Chrome — the Google Chrome Operating System. It's our attempt to re-think what operating systems should be.
Oh, boy. An operating system that's small, fast-booting, and for a single application. What a concept.
Don't know how to react yet. Here's some random observations and thoughts:
- The blog entry was posted on 7/07/2009 09:37:00 PM, why so late at night?
- I got the news from an email alert from a traditional newspaper. Not on the web. Not from twitter or any blog posts.
- The first question that comes to my mind after reading the blog is Who? I'm always infinitely more interested in that part of the question than anything else, as demonstrated here 1523 days ago.
- I still have a PC operating system on three floppies. I run it inside qemu or VirtualBox
- This is good news for the people who have to do tech support work for their relatives. Just tell them to press the hard reset button to put everything back to factory settings.
- Who will announce the discovery of the first virus in the wild for GCOS? My bet is Symantec.
- I want one!
- Why?
- Because it's Google. And it will be cool. A new windowing system, who wouldn't want that.
- A new windowing system? We haven't had one of those for years. Does it support WS_OVERLAPPEDWINDOW?
- Could it be a replay of the PC story all over again? You know, your young IT staffer yells at the PHB: "We should henceforth do all of our development for the GCOS. Look at me, I did my application in fifteen minutes."
- But what about Java?
VirtualBox 3.0: Unusable For Me
I got all excited about the VirtualBox 3.0 release from Sun and upgraded to it on my Windows XP Pro and Ubuntu/amd64 boxes. Now my guests (Ubuntu, Fedora, OpenSolaris) would simply freeze after about five minutes.
I haven't investigated the issue further except that I have seen posts on the VirtualBox forum by people who are experiencing the same problem as I did.
So don't upgrade VirtualBox to 3.0 yet unless you want to try your luck or to help resolve the issue. Of course if you know a way around this problem and would like to share it I'd appreciate it very much.
Firefox 3.5 Means Never Having To Say I'm Sorry (For My Video Format)
Have you 3.5-ed yet?
I installed Firefox 3.5 on my Windows boxes, but not on my Linux boxes because Mozilla.org does not offer 64-bit Linux builds. One of the features of Firefox 3.5 is the support of the Ogg Theora video file format, which is the format of all of the screencasts I posted on this blog.
I use Ogg Theora because it is the native encoding format of the recordMyDesktop screen capture utility for Gnome. Since this format was not natively supported on Windows or Max OS X, every time I post one of my screencasts/demos, I have to put in a disclaimer—"Linuxy format, download VLC to view".
Not any more! Now you can view it directly in Firefox 3.5:
(The video is from an old blog entry of mine showing JavaFX 1.0 playing Ogg Theora video files on Linux.)
Let the next round of the browser war begin!