kidtronnix / hapi-dash

Boilerplate Hapi Web and API Server Example, with frontend dashboard.
hapi-dash.smaxwellstewart.com
MIT License
113 stars 19 forks source link

What are the benefits of using a separate server for api & gui? #3

Closed danecando closed 10 years ago

danecando commented 10 years ago

It seems to me like this type of setup adds a lot of complication to the application.

You can separate concerns via a plugin or exposing functionality to your app with plugin.method or server.method without need to make and authenticate an http request.

I just want to know if there's something I'm missing as far of the benefits of setting up the api as another server so I can decide what is the right route to take for my application.

Thanks and good work on the application!

kidtronnix commented 10 years ago

Hi Dane,

The main concern is scalability. The frontend may have minimal traffic, while the API has a heavy load, or vice versa.

This was the case for a use case i had, so i wanted a setup that enabled me to start many server instances of my API and only one of my GUI.

This way enables the two servers to exist on separate machines, which can be handy.

Thanks for the appreciation! On 26 Aug 2014 04:43, "Dane Grant" notifications@github.com wrote:

It seems to me like this type of setup adds a lot of complication to the application.

You can separate concerns via a plugin or exposing functionality to your app with plugin.method or server.method without need to make and authenticate an http request.

I just want to know if there's something I'm missing as far of the benefits of setting up the api as another server so I can decide what is the right route to take for my application.

Thanks and good work on the application!

— Reply to this email directly or view it on GitHub https://github.com/smaxwellstewart/hapi-dash/issues/3.

danecando commented 10 years ago

@smaxwellstewart thats what I figured. Thanks for clearing that up for me. Much appreciated!