问题
I'm developing a java web project on Google App Engine/Datastore as a mobile app backend.
The requirement is to only use services available for free for low usage in Google Cloud so that I can get started cheaply and (theoretically) have to do much less work to scale up to handle more users.
I am a JavaEE developer and am considering using Jax-RS inside Google App Engine instead of Google Cloud Endpoints.
Having read JAX-RS services in Google App Engine and some other answers, I am interested in answers to the following questions, especially in 2018 as most answers are very old:
- What would I give up by using Jax-RS instead of Cloud Endpoints in terms of:
- Are Cloud Endpoints easier to use when integrated with Google's auth sdk?
- Would I be giving up anything in terms of logging and metrics?
- Is testing with Arquillian more difficult when I combine App Engine runtime with Jax-RS for any reason?
- Would the Jax-RS servlet require custom plumbing to enable SSL?
- Anything I haven't thought of...
To me, the obvious advantages of Jax-RS are it's ease of development (Cloud Endpoints appears to require more boilerplate) and the fact that I am already very familiar with it.
Experienced advice is greatly appreciated.
回答1:
You should be able to use JAX-RS, but you loose some of Cloud Endpoints features like:
- Authentication
- Monitoring -- Though each request will get the normal Stackdriver trace
- Arquliliam should work with either.
- SSL should be available either way. (note it terminates at our load balancer not the app)
The key feature you loose by using Jax-RS instead of Cloud Endpoints is Service Control.
来源:https://stackoverflow.com/questions/49713083/what-are-the-problems-with-using-jax-rs-instead-of-cloud-endpoints-on-google-app