-
Event Source
- With help of Apache Kafka stores and delivers all real-time events responsible for driving the microservices/microfronts actions;
- Saves all events on a Postgres Database and mark them with 'Processed = true' when it gets processed.
-
Microservices
- Tracking:
- Publishes the actual position of delivers (using coordinates);
- Uses the Notification Microservice to send a mail/notification to people subscribed to the current stuff being delivered.
- Authentication:
- Uses the User Microservice to get the necessary information to log users in.
- User:
- Makes CRUD actions on related user tables.
- Notification:
- Sends push notifications/mail to people that are subscribed to some stuff being delivered.
- Tracking:
-
Microfronts
- User Client:
- Shows to user current status of stuff he is watching;
- Makes him able to update profile data.
- Admin Client:
- Shows current tracking position of delivers;
- Makes the admin able to register new stuffs and delivers.
- User Client:
-
Ingress Controller:
- With help of Nginx, creates a gateway between the internet and the microservices/microfronts, what makes them accessible by exposed routes.
-
Monitoring:
- Uses Fluentd on every microservice to track logs;
- Uses ElasticSearch to store all logs;
- Uses Kibana to show logs;
- Uses Grafana to show current status of every microservice system usage.
-
Events - (payload)
-
DeliveryPayloadChangedLocation - (user_id, delivery_payload_id, location)
- Hermes.setDeliveryPayloadLocation(delivery_payload_id, location)
- gRPC Asgardian.getUserData(user_id)
- Hermes.buildNewPayloadLocationNotificationData(delivery_payload_id, userData)
- gRPC Iris.sendPushNotification(newPayloadLocationNotificationData)
- Hermes.buildNewPayloadLocationMailData(delivery_payload_id, userData)
- gRPC Iris.sendMail(newPayloadLocationMailData)
-
DeliveryPayloadRegistered - (delivery_payload_id)
- Hermes.getDeliveryPayloadData(delivery_payload_id)
- Hermes.generateDeliveryPayloadReceipt(deliveryPayloadData)
- Hermes.sendToBucket(deliveryPayloadReceiptData)
-
-
Services - (trigger)
-
createNewPayloadSubscription - POST /tracking/payload/:payload_tracking_code (title)
- Hermes.createNewPayloadSubscription(title, payload_tracking_code, user_id)
-
removePayloadSubscription - DELETE /tracking/payload/:payload_tracking_code
- Hermes.removePayloadSubscription(user_id)
-
getAllPayloadSubscriptions - GET /tracking/payload
- Hermes.getAllPayloadSubscriptions(user_id)
-
- Services - (trigger)
-
sendPushNotification - gRPC Iris.sendPushNotification(pushNotificationData)
- Iris.sendPushNotification(pushNotificationData)
-
sendMail - gRPC Iris.sendMail(mailData)
- Iris.sendMail(mailData)
-
-
Events - (payload)
- UserCreated - (user_id, delivery_payload_id, location)
- Asgardian.getUserData(user_id)
- Asgardian.buildSelfWelcomeMailData(userData)
- gRPC Iris.sendMail(selfWelcomeMailData)
- UserCreated - (user_id, delivery_payload_id, location)
-
Services - (trigger)
-
getUserData - gRPC Asgardian.getUserData(user_id)
- Asgardian.getUserData(user_id)
-
getUserLoginTokenData - gRPC Asgardian.getUserLoginTokenData(email, password)
- Asgardian.getUserLoginTokenData(email)
-
getProfileData - GET /user/profile
- Asgardian.getProfileData(user_id)
-
updateProfileData - PUT /user/profile (data)
- Asgardian.updateProfileData(user_id, data)
-
requestPasswordRecover - POST /user/recover ({ email })
- Asgardian.getUserData(email)
- Asgardian.generateResetToken(user_id)
- Asgardian.buildRecoverPasswordMail(userData)
- gRPC Iris.sendMail(recoveryPasswordMail)
-
resetPassword - PUT /user/recover (password, token)
- Asgardian.resetPassword(token, password)
-
login - POST /auth/login ({ email, password })
- Asgardian.getUserLoginTokenData(email, password)
- Asgardian.generateUserAuthToken(userLoginTokenData)
-
isAuthenticated - gRPC Asgardian.isAuthenticated(token)
- Asgardian.decodeToken(token)
-
- Merge branch into master
- Run tests
- Create docker image
- Generate a new container for this image
- Container gets up and visible into production after 30s
- Old container gets down