<?xml version="1.0"?>
<rss version="2.0">
<channel>
  <title>Weiqi Gao&#039;s Observations - rest tag</title>
  <link>http://www.weiqigao.com/blog/tags/rest/</link>
  <description>Sharing My Experience...</description>
  <language>en</language>
  <copyright>Weiqi Gao</copyright>
  <lastBuildDate>Fri, 11 May 2012 12:48:36 GMT</lastBuildDate>
  <generator>Pebble (http://pebble.sourceforge.net)</generator>
  <docs>http://backend.userland.com/rss</docs>
  
  <image>
    <url>http://pebble.sourceforge.net/common/images/powered-by-pebble.gif</url>
    <title>Weiqi Gao&#039;s Observations</title>
    <link>http://www.weiqigao.com/blog/</link>
  </image>
  
  
  <item>
    <title>Java News Brief (JNB): An Introduction to JAX-RS and Jersey</title>
    <link>http://www.weiqigao.com/blog/2009/07/31/java_news_brief_jnb_an_introduction_to_jax_rs_and_jersey.html</link>
    
      
        <description>
          &lt;p&gt;This month&#039;s &lt;a href= &#034;http://www.ociweb.com/&#034; &gt;OCI&lt;/a&gt; Java News Brief (&lt;a href= &#034;http://jnb.ociweb.com/jnb/jnbAug2009.html&#034; &gt;JNB&lt;/a&gt;) is online now, in which &lt;a href= &#034;http://viewfromthefringe.blogspot.com/&#034; &gt;Brian Gilstrap&lt;/a&gt; gives &lt;a href= &#034;http://jnb.ociweb.com/jnb/jnbAug2009.html&#034; &gt;An Introduction to JAX-RS and Jersey&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href= &#034;http://jnb.ociweb.com/jnb/jnbAug2009.html&#034; &gt;Brian Gilstrap&lt;/a&gt;: If you aren&#039;t already involved in building RESTful web services, you may not be aware of &lt;a href= &#034;http://jcp.org/en/jsr/detail?id=311&#034; &gt;JSR 311&lt;/a&gt;. JSR 311 is &lt;a href= &#034;http://jcp.org/en/jsr/detail?id=311&#034; &gt;&#034;JAX-RS: The Java™ API for RESTful Web Services&#034;&lt;/a&gt;. Its goal is to &#034;develop an API for providing support for REST-ful (REpresentational State Transfer) Web Services in the Java Platform&#034;. If you aren&#039;t familiar with REST, you may want to read the &lt;a href= &#034;http://en.wikipedia.org/wiki/Representational_State_Transfer&#034; &gt;Wikipedia page that describes REST&lt;/a&gt;. 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.&lt;/p&gt;

&lt;p&gt;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 &lt;a href= &#034;https://jersey.dev.java.net/&#034; &gt;reference implementation&lt;/a&gt; for JAX-RS is called &#034;Jersey&#034; and the &lt;a href= &#034;http://jersey.dev.java.net&#034; &gt;project&lt;/a&gt; is hosted on the &lt;a href=&#034;http://dev.java.net&#034; &gt;dev.java.net&lt;/a&gt; site. Jersey itself is implemented for Java 5 (and later) and can be integrated with a number of different containers and HTTP servers.&lt;/p&gt;

&lt;p&gt;A particularly compelling way to use Jersey is to combine it with the &lt;a href= &#034;https://grizzly.dev.java.net/&#034; &gt;Project Grizzly HTTP server&lt;/a&gt;. 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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Brian has been researching this topic for quite some time and wrote a &lt;a href= &#034;http://viewfromthefringe.blogspot.com/2009/06/jax-rs-and-jersey-posts.html&#034; &gt;series of blog entries&lt;/a&gt; as he went along.  He will be presenting on this topic at the &lt;a href= &#034;http://www.ociweb.com/javasig/&#034; &gt;St. Louis JUG&lt;/a&gt; in November.&lt;/p&gt;

&lt;p&gt;Incidentally, Brian first presented at the St. Louis JUG more than 12 years ago, in January 1998.  The topic&amp;mdash;&lt;a href= &#034;http://www.ociweb.com/javasig/knowledgebase/January1998/rmi_sig.pdf&#034; &gt;RMI and CORBA&lt;/a&gt;.  Distributed computing never gets old.&lt;/p&gt;

&lt;p&gt;Anybody want to predict what topic Brian will cover at the JUG in 2021?&lt;/p&gt;

&lt;p&gt;OK.  Enough of the nostalgia nonsense.  Go read the &lt;a href= &#034;http://jnb.ociweb.com/jnb/jnbAug2009.html&#034; &gt;article&lt;/a&gt;.  I will do that now!&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2009/07/31/java_news_brief_jnb_an_introduction_to_jax_rs_and_jersey.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2009/07/31/java_news_brief_jnb_an_introduction_to_jax_rs_and_jersey.html</guid>
    <pubDate>Sat, 01 Aug 2009 04:20:14 GMT</pubDate>
  </item>
  
  <item>
    <title>Friday Java Quiz: RPC vs. REST</title>
    <link>http://www.weiqigao.com/blog/2008/09/12/friday_java_quiz_rpc_vs_rest.html</link>
    
      
        <description>
          &lt;p&gt;I&#039;ve been hearing a lot about the merits of REST over the deficiencies of RPC lately.  For example, the &lt;a href= &#034;http://steve.vinoski.net/blog/2008/09/03/the-technology-adoption-side-of-rpc-and-rest/&#034; &gt;latest&lt;/a&gt; &lt;a href= &#034;http://steve.vinoski.net/blog/2008/08/16/you-have-to-experience-it/&#034; &gt;blog&lt;/a&gt; &lt;a href= &#034;http://steve.vinoski.net/blog/2008/07/13/protocol-buffers-leaky-rpc/&#034; &gt;entries&lt;/a&gt; from RPC-hero-turned-REST-advocate Steve Vinoski.&lt;/p&gt;

&lt;p&gt;While it&#039;s fun to listen to famous people debate the issues, I&#039;ve always had the impression that REST is something that is not as concrete as RPC.  In Java, for example, If I want to do RPC, I have several different tools that I can use right there in the JDK: one is RMI, the other is Java IDL (not that I&#039;ll recommend it).&lt;/p&gt;

&lt;p&gt;That leads to todays question:&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Q&lt;/b&gt;: How &lt;s&gt;the bleep&lt;/s&gt; do you get started with doing REST with Java?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(I know you are going to wave your hands every which way and utter phrases like &#034;uniform interface&#034; or &#034;hypermedia as the engine of application state&#034; or &#034;internet scale&#034; or &#034;small joins, loosely parted&#034;.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Q&lt;/b&gt;: Show me!  (Send a string &#034;Howdy&#034; from host A to host B the REST way.)&lt;/p&gt;

&lt;p&gt;No peeking at the internet or the REST book.  Just write the demo.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/09/12/friday_java_quiz_rpc_vs_rest.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/09/12/friday_java_quiz_rpc_vs_rest.html</guid>
    <pubDate>Fri, 12 Sep 2008 12:42:03 GMT</pubDate>
  </item>
  
  <item>
    <title>Brian Sletten: NetKernel: Software For The 21st Century</title>
    <link>http://www.weiqigao.com/blog/2008/01/11/brian_sletten_netkernel_software_for_the_21st_century.html</link>
    
      
        <description>
          &lt;h4&gt;Oh, Boy!&lt;/h4&gt;

&lt;p&gt;Sparks flew at the &lt;a href= &#034;http://www.ociweb.com/javasig/&#034; &gt;St. Louis JUG&lt;/a&gt; yesterday evening.&lt;/p&gt;

&lt;p&gt;More than forty people packed the auditorium at One City Place to hear &lt;a href= &#034;http://www.nofluffjuststuff.com/speaker_view.jsp?speakerId=22&#034; &gt;Brian Sletten&lt;/a&gt; of the &lt;a href= &#034;http://www.nofluffjuststuff.com/&#034; &gt;No Stuff Just Fluff&lt;/a&gt; tour talking about &lt;a href= &#034;http://1060.org/&#034; &gt;Resource-Oriented Computing w/ NetKernel: Software for the 21st Century&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;(I have been calling the tour &lt;span style=&#034;color:green&#034;&gt;No&lt;/span&gt; &lt;span style=&#034;color:red&#034;&gt;Stuff&lt;/span&gt; &lt;span style=&#034;color:green&#034;&gt;Just&lt;/span&gt; &lt;span style=&#034;color:red&#034;&gt;Fluff&lt;/span&gt; on this blog for quite sometime now, just to see if people would notice it.  Nobody did.  That ought to teach bloggers a lesson about sending &lt;a href= &#034;http://stuffthathappens.com/blog/2008/01/09/new-hampshire-liberals-for-hillary/&#034; &gt;secret embedded messages&lt;/a&gt; in their blogs.)

&lt;p&gt;For the first time in a long time, I went into a JUG meeting not knowing anything about the technology being presented.  And judging from the audience questions, neither did anybody else.&lt;/p&gt;

&lt;h4&gt;But before I get into the fun stuff, let me just get the positives out of the way.&lt;/h4&gt;

&lt;p&gt;It was a somewhat pleasant day in January, a little bit rainy, not too cold.  As I mentioned earlier, more people showed up than usual.  I have seen a few faces that I haven&#039;t seen at the JUG meetings for a year or so.&lt;/p&gt;

&lt;p&gt;Brian Sletten gave a well prepared, engaging, opinionated, and meaty presentation.  For a complete stranger to the technology and its way of thinking, I think Brian got the message out succinctly and clearly.&lt;/p&gt;

&lt;p&gt;We have some enhanced bunch of giveaways: in addition to the &lt;a href= &#034;http://www.jetbrains.com/idea/&#034; &gt;IntelliJ IDEA 7 License&lt;/a&gt; that &lt;a href= &#034;http://www.jetbrains.com/&#034; &gt;JetBrains&lt;/a&gt; has provided us, we also gave away three books, two on GWT and one on Integration Patterns.&lt;/p&gt;

&lt;p&gt;Jay Zimmermann, the man behind the NFJS conferences, was on hand to promote the 2008 NFJS tour, which will be in St. Louis the weekend of March 7&amp;ndash;9.  Jay also gave away a free pass to the event to a lucky audience member (the aforementioned member whom I haven&#039;t seen for a year.)  Jay also gave up another free pass to be given away at next month&#039;s JUG meeting, which will be held on not the second &lt;span style=&#034;color:red&#034;&gt;but the third Thursday&lt;/span&gt;, February 21, to not interfere with Valentine&#039;s Day celebrations.&lt;/p&gt;

&lt;h4&gt;I sparked a long discussion on closures in Java during the Q&amp;amp;A before the main presentation by simply asking &#034;Have you read &lt;a href= &#034;http://www.artima.com/weblogs/viewpost.jsp?thread=221903&#034; &gt;Bruce Eckel&#039;s latest blog&lt;/a&gt;?&#034;&lt;/h4&gt;

&lt;p&gt;Not every member is aware of the controversy, and of those who are clued in and are willing to share their feelings on this matter, I see people on Neal Gafter&#039;s side and people on Josh Bloch&#039;s side.  One new argument for the full fledged closure implementation is that that will &#034;move the curve&#034; towards the more advanced direction, and in doing so make Java the language and platform more valuable (and therefore our Java skills more valuable) to the current enterprise users of Java technology.&lt;/p&gt;

&lt;p&gt;The wider audience members were not comfortable with the &#034;Java is the new COBOL&#034; claim and would like to see the Java language evolve further.&lt;/p&gt;

&lt;h4&gt;OK.  Enough of the side stuff.&lt;/h4&gt;

&lt;p&gt;&lt;a href= &#034;http://1060.org/&#034; &gt;NetKernel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&#034;What is it?&#034; began Brian.  &#034;It&#039;s software that changed my life.&#034;&lt;/p&gt;

&lt;p&gt;With an opening like that, I know the evening is going to be, uh, interesting.&lt;/p&gt;

&lt;p&gt;Some more choice quotes (not exact quotes) from the evening:&lt;/p&gt;

&lt;p&gt;&#034;There was a three-year project that wouldn&#039;t scale.  We went in, and solved their problem with NetKernel in six weeks.  The customer was very happy.&#034;&lt;/p&gt;

&lt;p&gt;&#034;The computer industry is moving away from writing code and towards using formatted data over the past decades.&#034;&lt;/p&gt;

&lt;p&gt;&#034;Service orchestration is clearly the sweet spot of NetKernel.  I have seen no better orchestration environment.&#034;&lt;/p&gt;

&lt;p&gt;&#034;NetKernel based projects needs surprisingly small amount of maintenance.&#034;&lt;/p&gt;

&lt;p&gt;&#034;You need to step away from objects, which are tightly coupled and brittle.&#034;&lt;/p&gt;

&lt;p&gt;&#034;Let me seed you with the ideas of NetKernel.  You will have your epiphany sometime after you start using it.&#034;&lt;/p&gt;

&lt;p&gt;&#034;NetKernel applications are scalable and have no problems with heavy load because it uses a microkernel architecture that handles caching intelligently.&#034;&lt;/p&gt;

&lt;p&gt;&#034;Enterprises that adopt NetKernel technology see it as a competitive advantage.&#034;&lt;/p&gt;

&lt;h4&gt;With assertions like that, you bet the audiences are skeptical.&lt;/h4&gt;

&lt;p&gt;Here are some of their questions:&lt;/p&gt;

&lt;p&gt;&#034;How is this different from CGI?&#034; I asked after the first demo, in which we saw a BeanShell script saved as a file on the server side, and a browser accessing the result of its calculations through an URL.  The answer is that NetKernel does its magic on the server side after it intercepts the request.&lt;/p&gt;

&lt;p&gt;&#034;You can do that in Java too, with the Java 5 and Java 6 concurrency and executor framework.&#034;  Kyle Cordes asked on seeing the NetKernel&#039;s

&lt;pre style=&#034;margin-left:3em&#034;&gt;&amp;lt;throttle&gt;
  &amp;lt;concurrency&gt;4&amp;lt;/concurrency&gt;
  &amp;lt;queue&gt;50&amp;lt;/queue&gt;
&amp;lt;/concurrency&gt;&lt;/pre&gt;

element.&lt;/p&gt;

&lt;p&gt;&#034;Object orientation is a great way for me as a developer to organize my work.  You are advocating that I give up object-orientation.  What aspects of the new style of development with provide benefits that will compensate for the ones that I lose by giving up object-orientation?&#034; asked Brian Gilstrap.&lt;/p&gt;

&lt;p&gt;&#034;With Web Services, the WSDL defines the contract.  With the REST style architecture, where is the contract?&#034; was Dean Farwell&#039;s question.  Dean also asked for the potential future tools support: &#034;With Java, I type foo dot, and my IDE tells me exactly what I can do.  I don&#039;t want to go back to where developers will have to open multiple terminals and multiple vim session looking around for answers.&#034;&lt;/p&gt;

&lt;h4&gt;I just realized that this post is already too long.&lt;/h4&gt;

&lt;p&gt;If I keep on writing, I would have to go back to the beginning and change all &#034;yesterday&#034;&#039;s into &#034;the day before yesterday&#034;&#039;s.&lt;/p&gt;

&lt;p&gt;Fortunately, Brian has promised to send the presentation slides to be posted onto the JUG website.  I&#039;ll post the like here when it arrives.&lt;/p&gt;

&lt;p&gt;Talking about the day before yesterday, Brian also mentioned after the presentation that he was at the Denver JUG on the prior day talking about REST.  Matt Raible has a &lt;a href= &#034;http://raibledesigns.com/rd/entry/rest_and_seam_talks_at&#034; &gt;detailed report&lt;/a&gt; from that event.&lt;/p&gt;

&lt;p&gt;And, coincidentally, the second speaker at that meeting, Norman Richards, will be our speaker for February.  His topic?  Seam.&lt;/p&gt;

&lt;p&gt;Stay tuned.&lt;/p&gt;
        </description>
      
      
    
    
    
    <comments>http://www.weiqigao.com/blog/2008/01/11/brian_sletten_netkernel_software_for_the_21st_century.html#comments</comments>
    <guid isPermaLink="true">http://www.weiqigao.com/blog/2008/01/11/brian_sletten_netkernel_software_for_the_21st_century.html</guid>
    <pubDate>Fri, 11 Jan 2008 18:10:35 GMT</pubDate>
  </item>
  
  </channel>
</rss>

