GSoC 2016 | Work Period | Week 11
In this week, I’m planning to do the following stuff:
- Architecture enhancement
- A simple SPA frontend for the microservice blueprint (use Vue.js)
- Monitor dashboard
- A simple recommendation component
- Maybe I should write a individual component providing Neo4j integration with Vert.x
- Run the application with Docker Compose
- Update tests
- Update documents and tutorials
How to manage global auth in a microservice application. For example, we login in from the login page and our login data is saved in the session. When we visit resources that are protected behind the auth, how we validate the user info (e.g. via session data or use SSO)?
Solved: Use OAuth 2 + Keycloak is a good point. The API gateway is responsible for storing authentication principal and validation.
Thought: How to integrate well with SPA frontend?
Solved: use HTTP-HTTP pattern. The API Gateway is a individual verticle and is responsible for dispatching requests, managing global authentication, handling failure, health checking and simple load balancing. The API Gateway itself uses HTTPS, but it interacts with the downstream REST endpoints via HTTP.
- Refactored the architecture of the online shopping microservice, simplified some components (more features will be added into next version)
- Enhanced the logic of the entire online shopping process
- Code refinement and bug fixed
- Added some tests (some tests are in local and weren’t committed as it requires some local envs)