Skip to content
/ aTES Public

Asynchronous architecture studying project

Notifications You must be signed in to change notification settings

korcky/aTES

Repository files navigation

Awesome Task Exchange System (aTES)

Asynchronous architecture studying project for: https://education.borshev.com/architecture.

Project context

Zero-week assignment

Initial structure: LucidChart, PDF

First-week assignment

Business Processes: LucidChart, PDF

Domain and models: LucidChart, PDF

System events: LucidChart, PDF

Services:

  1. SSO: http://localhost:4000/auth
  2. Task tracker: http://localhost:4100/main
  3. Accounting: http://localhost:4200/main
  4. Analytics: http://localhost:4300/main

Credentials:

email pass
[email protected] admin
[email protected] manager
[email protected] accountant
[email protected] worker0
[email protected] worker1
[email protected] worker2

Deploy

Pre-deploy configuration

  • You probably should try to increase docker memory allocation to 6GB or more (with less memory you may get problem with kafka deployment)
  • To monitor all 21 containers that will be deployed might be useful https://github.com/bcicen/ctop

Main deployment sequence

  1. Deploy kafka
    $ docker-compose -f services/kafka/docker-compose.yml up
  2. broker might crashed on first launch (especially if you don't increase docker memory allocation), so better to:
    1. check that broker working (after ~1 min after deploying kafka):
      $ docker ps
    2. restart broker, if needed:
      $ docker-compose -f services/kafka/docker-compose.yml restart broker
  3. Deploy services
    $ ./deploy_services

Changes in events and migration process

Task.title

Problem

Popugs creates titles that looks like: [jira-id] - Title

What needed to do

title must be divided on two fields: title and jira-id

Migration process

  1. In event_schema_registry must be created new version of Task.Created event
  2. Consumers of Task.Created event must be updated to be able to consume new version and deployed simultaneously with old version
  3. Producer of Task.Created event must be updated to be able to produce new version and deployed (without old version)
  4. Shut down old consumer
  5. ...
  6. profit?

Task.status

Problem

Popugs can't figure out what open/closed tasks status mean

What needed to do

open/closed must be change to birdie in a cage/millet in a bowl

Migration process

  1. Code in Task tracker must be changed (values in status enum)
  2. Migration must be prepared for database, that will map open/closed to birdie in a cage/millet in a bowl
  3. Shut down old version of Task tracker
  4. Make migration
  5. Deploy new version
  6. ...
  7. profit?

Shame/TODO list

  • Little rework of tasks streaming (prices setting must be a cud event)
  • Add version check (so consumers process only 1 version of event)
  • Little rework of business events
  • Remove transactions streaming (transaction is a business event, because it is a result of business command)
  • Add fabulous documentation
  • Beautify code

About

Asynchronous architecture studying project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published