* adservice: Reduced docker image size to ~165MB
(down from ~886MB) by switching to alpine and
using multi stage builds
* adservice: Changed install of glibc in builder to not require untrusted packages
* adservice: Refactored Dockerfile to be a multi stage build. The 'build' step runs from openjdk:8-slim, but the final image is alpine based. We can get away from this since java runs in a vm & the architecture of the images doesn't change between biuld steps
The ad service now returns ads matching the categories of the product that is
currently displayed. Changes in this commit:
- List all products' categories in products.json.
- Pass the current product's categories from the frontend to the ad service when
looking up ads.
- Store a statically initialized multimap from product category to ad in the ad
service.
- Return all ads matching the given categories when handling an ads request.
The ad service continues to return random ads when no categories are given or
no ads match the categories.
This field can be used as the context keys to look up relevant ads in the ad
service.
/cc @rghetia
I also ran the genproto.sh scripts for the Java and Go services and included those changes in the second commit. I encountered an issue when I ran genproto.sh for the recommendation service, and I'm still looking into it.
Upgrading grpc-java fixed an error that I encountered when I tried modifying the adservice to write logs to Stackdriver with google-cloud-logging ("`com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Credentials require channel with PRIVACY_AND_INTEGRITY security level. Observed security level: NONE`").
* Initial commit for Ads Service.
* update comments for AdsService and AdsServiceClient
* Refactor Ads to Ad
Move building AdService to Docker
Use default setting for Stackdriver Exporter.
Add license text.
* Revert the projectId
- also remove commented code from frontend/rpc.go
* Add adservie to skaffold.yaml
* Remove skaffold-adservice.yaml
* Replace personal projectId with demo projectId.
* Fix the crash in adservice when ran in locally.
* Ignore .skaffold*yaml file and .kubernetes-manifests-*/ dir for easy ProjectID switch.
* Fixed review comments.
1. Changed Ad redirect urls to products.
2. Removed leftovers from Dockerfile/kub*manifests*yaml
3. Added retry for StackDriver.
4. Added log for Ad request.
5. Added comment for gradle caching.
6. Added README.md to src/adservice.
* Added GRPC Health service to Ad Service
Also added
1. timeout to getAd RPC call in frontend.
2. Async thread for stackdriver init.