Skip to content

Design and Development Principles

Ihar Suvorau edited this page Mar 1, 2024 · 3 revisions
  1. Automation

    • Building (GitHub Actions), testing (GitHub Actions), and deploying (GitHub Actions + Ansible) should be automated.
    • Configuring machines in ETAIS should be automated (Ansible).
  2. Breadth-first development

    • While working on a user story, it's better to take a user story that spans across multiple services, so we can get a better understanding of the system as a whole after the implementation. Taking one microservice and developing it in full might lead to rework when we start working on the other microservices.
  3. Python coding conventions

    • Use black for formatting.
  4. Service-based approach

    • We choose the service-based approach to ensure clear boundaries between different parts of the system, and to be able to throw away certain services and replace it with others without affecting the rest of the services. Service doesn't necessarily mean a separate microservice with its own webserver, if a standalone package would suffice, go for it.
  5. Scalability

    • We don't expect the application to be massively scalable and serve thousands of requests per second. Also, the main bottleneck is usually in underlying tools and algorithms, not in the web services. Still, it's good to apply asynchronous programming and use concurrency if possible.
  6. Development

    • We use JavaScript, TypeScript and React for the frontend (Remix, Next.js), and Python for the backend.
    • We use flask or fastapi with uvicorn for web servers.
    • OpenAPI specification is required for all the APIs. It would help to autogenerate client libraries (potentially, servers).
    • Databases are internal to its services.
    • Commit and push code daily. Don't develop in a separate branch for days without merging.
  7. Licenses

    • Any tool that we use should be free to use for commercial purposes. Use Apache 2.0 by default.