erikras / react-redux-universal-hot-example

A starter boilerplate for a universal webapp using express, react, redux, webpack, and react-transform
MIT License
12k stars 2.5k forks source link

Java API server #1212

Open thaingo opened 8 years ago

thaingo commented 8 years ago

Does anyone implement the API server using Java instead of javascript (Node/Express)? If yes, could you please share your experience with us?

Thank you.

cthanhnguyen commented 8 years ago

+1

jaraquistain commented 8 years ago

Maybe not relevant but I consume a Scala API server. I don't think the implementation of the API itself really matters if you're using the proxy built into the boilerplate. As far as the web server is concerned the API is an opaque entity that it communicates with over HTTP(S)

thaingo commented 8 years ago

Thanks @jaraquistain for the sharing. Have you had any performance issue with the boilerplate so far? Could you please share a sample implementation of your Scala API server?

I have been investigating the other boilerplate, another POC, in which server side is Java/Scala and frontend - React, and without the proxy. However, I have had some performance issue with it and that made me worried. I experienced a quite big latency especially for the very first time I load a page.

What do you think?

jaraquistain commented 8 years ago

I can't really say much about the API server itself other than that we use Play, Akka and an Actors model to handle everything. Either way, server request latency is kind of outside the scope of this boilerplate. I, myself haven't really found latency to be much of a problem but maybe our site isn't as I/O intensive as yours. We may eventually forgo the proxy and hit the API directly but haven't needed to quite yet.

There are many things you can do, in general, to combat latency but the first step is identifying where the time lost actually comes from. E.G.

I apologize if that all seems like obvious and generic advice but there are just so many things that can cause latency

thaingo commented 8 years ago

Thanks for the sharing and your time, @jaraquistain. Appreciate your helpful input.