1 / 15

Vaadin & RESTful Web Services

Open Source Frameworks. Proof of concept. Vaadin & RESTful Web Services. Jérémy Singy & Baptiste Wicht. 30.05.2012. Plan. POC objectives Solutions Implementations Results Performance benchmark Ease of use Conclusions. Proof-of-concept.

Download Presentation

Vaadin & RESTful Web Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Open Source Frameworks Proof of concept Vaadin & RESTfulWeb Services Jérémy Singy & Baptiste Wicht 30.05.2012

  2. Plan • POC objectives • Solutions • Implementations • Results • Performance benchmark • Ease of use • Conclusions OSF

  3. Proof-of-concept • Framework used for a back-office configuration application • Study communication with services exposedusingdifferent APIs • Jersey, SpringRemoting, … • Objectives • Study RESTful Web Services • Compare the different implementations for: • Ease of use • Performances OSF

  4. Solutions • We chose to compare these different solutions: • Jersey REST • Spring Remoting HTTP Invoker • Spring RemotingJAX-WS • Spring Web MVC RESTful OSF

  5. Jersey REST • Very easy to create RESTful Web Services • Reference implementation of JAX-RS • Use of annotations to define the WS • Use of a servlet for automatic dispatching • Different output • Plain Text • JSON • XML • All automatically created from POJO OSF

  6. Spring Remoting HTTP Invoker • Part of Spring Remoting • Method allowing serialization via HTTP • Possible to access low-level HTTP Connection parameters • Use HttpInvokerServiceExporter to expose the service • Client access using a POST request with custom parameters OSF

  7. Spring Remoting JAX-WS • Part of Spring Remoting • Standard for exposing and accessing web services in Java EE 5.0 and 6.0 • Servlet-based • Configuration with Spring context • The service is used with a proxy representing the remote interface OSF

  8. Spring Web MVC RESTFul WS • Based on the Spring WEB MVC Framework • Available since Spring 3.0 • The WS is defined as a @Controller • Use of servlet for automatic dispatching • Injection via the Spring Framework Beans • Use of serialization • Access with RestTemplate • Very similar to Jersey REST OSF

  9. Benchmark • Using Apache JMeter • HTTP packets created with the JMeter Proxy • On two computers on the same network • Wired network • Different parameters • Requesting 1000 key/value entries • 1, 2 and 4 threads • Each thread performs 50 requests • Measure between client and persistence tier • No unload of Vaadinviews • Production mode OSF

  10. Benchmark • Architecture PresentationTier Business Tier Test laptop JavaDB Vaadin Jersey client Spring client Jersey / Spring JPA (JMeter) OSF

  11. Benchmark results OSF

  12. Ease of use summary • Jersey • Very simple, light dependencies • Not highly configurable • SpringRESTful • Very simple to use • Severalbigdependencies • Springwith HTTP invoker • Setup a bit tedious • Services accessible onlywiththeirown client API • Highly configurable • Springwith JAX-WS • Use of standard API OSF

  13. Issues • JMeter • Not very stable • Threads being blocked • Vaadin • Takes a very long time to load the application the first time • Needs configuration to be benchmarked • Spring Remoting • Not very clear errors for debugging • Lack of complete examples for exposing services OSF

  14. Conclusion • Perfect solution depending on the context • Jersey • Perfect for a simple/fast solution to expose configuration services • A bit slower than other solutions • Spring • Best solution on an existing Spring application • JAX-WS version is the slowest solution • More control -> more complexity • Vaadin • A lot of resources just for the presentation! OSF

  15. Thankyou for your attention • Questions? • Repository and results report • Githuborganization: https://github.com/osf-poc/ • Github wiki: https://github.com/osf-poc/VaadinConfigurator/wiki OSF

More Related