Skip to content

Latest commit

 

History

History
64 lines (48 loc) · 2.05 KB

scratch.md

File metadata and controls

64 lines (48 loc) · 2.05 KB

Scratch Notes

Ideas and Notes

  • Feature Enhancement: Consider adding a caching layer to the Trade API to improve response times for frequently accessed data.
  • Refactoring: Evaluate the current architecture for the Portfolio Management module to simplify dependencies and improve testability.

Commands and Shortcuts

  • Docker Commands:

    • Start PostgreSQL:
      docker run -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 postgres
    • Start RabbitMQ:
      docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
  • .NET Commands:

    • Run a specific microservice:
      dotnet run --project ./TradeService/TradeService.csproj
    • Run all unit tests:
      dotnet test

Migration Command

  • Tools > Nuget Package Manager > Package Manager Console > Default Project: Data
  • Add-Migration Example
  • Update-Database
  • Remove-Migration
  • Script-Migration
  • Drop-Database

Init Oracle Database

  • CREATE USER luyenhaidangit IDENTIFIED BY haidang106;
  • GRANT DBA TO luyenhaidangit;

Temporary Design Notes

  • Authentication Flow:

    • Implement OAuth2 for enhanced security in user authentication.
    • Add rate limiting to login endpoints to prevent brute-force attacks.
  • Potential Tech Debt:

    • Remove hard-coded API URLs from the codebase. Instead, move them to the configuration files or environment variables.

Miscellaneous

  • Pending Research:
    • Evaluate the use of MassTransit versus NServiceBus for message brokering.
    • Investigate best practices for implementing retries in RabbitMQ consumers to handle intermittent failures.

Useful Links

Feel free to add more notes or remove anything that becomes outdated.