vendredi 9 janvier 2015

Container or standalone program for read-only lookup service?

I'm designing a lookup service, and considering whether to build it as a standalone java application or to use some container, and if a container, which one.


The service will accept HTTP requests, look up data stored on its filesystem, and return binary data in the response. There is no database access, and no UI hosted on this service. The service is stateless. There would typically be a relatively small number of clients, each making many requests.


This will typically run on a dedicated machine. There may be multiple such instances with a load balancer in front. However, for demo and development purposes it may be run on the same machine as the tomcat server which runs the client code.


I'm thinking of using embedded jetty with asynchronous servlet, along with some REST framework. Are there any advantages to using a container instead in this scenario?


The REST frameworks I've looked at are primarily oriented toward returning JSON or XML. Is there any framework or approach that's particularly suited for sending binary data?


Thanks for your insights.


Aucun commentaire:

Enregistrer un commentaire