• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

standalone vs container REST service

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Though the question pertains to REST,it will apply to any service as such.
I have come across fragments of information spread across but never a good design debate.


What advantage do I get publishing the service as a standalone endpoint vs hosting it in a container.
This is more relevant to REST where the primary medium of communication is HTTP,rather than SOAP - thus taking some certificate based QoS convenience out of the picture.

This is a broad question;but would appreciate some insightful opinions and write-ups.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not clear to me what you're asking. Any service will (if implemented in Java) be running on a JVM - are you asking whether that JVM should be used for a servlet container, or for an app server, or just be a one-off solution that runs nothing but your service(s)?

If that's the question then I'd say go with the least amount of work - which is probably a servlet container. Drop in your favorite SOAP/REST framework -which is likely to be a web app anyway-, deploy the service and be done. Rolling your own is way more work.
 
Ranadhir Nag
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The question is much more simpler and elementary - sorry if I got this confused.
Why would i decide to make a RESTful service as a stand alone Java app or a web app inside a container.

Particularly for a HTTP based REST,I needed some insights on what I stand to gain or lose if i go either way.

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that's what I understood the question to be, so my answer applies in full.

Unless you want to roll your own REST framework that doesn't rely on the servlet API, but why would you?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Particularly for a HTTP based REST,I needed some insights on what I stand to gain or lose if i go either way.



The REST concept was originally conceived of as only meaningful for HTTP - see Fielding's original dissertation.

Since you need a HTTP hosting environment the question of a standalone app simply does not arise.

There are plenty of servlet containers besides Tomcat so you have a big spectrum to choose from.

Is this all just speculation or are you actually looking into creating a service?

Bill
 
it's a teeny, tiny, wafer thin ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic