Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend .NET Home Task by Rashid Kashafutdinov #645

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

mrRashidkk
Copy link

@mrRashidkk mrRashidkk commented Oct 17, 2024

  1. Organised the solution into 4 modules:
  • ExchangeRateUpdater.Domain (Contracts, models, enums, and constants belonging to the domain layer)
  • ExchangeRateUpdater.Infrastructure (For now, external API clients. Later there might be caching, database, etc.)
  • ExchangeRateUpdater.UnitTests
  • ExchangeRateUpdater (The entry point of the app)
  1. Implemented ExchangeRateProvider which now gets exchange rates from the Czech National Bank's API. I used the Factory pattern to make it easy to add new exchange rate API clients for other target currencies.
  2. Added retries with Polly to make the integration with Czech National Bank's API more resilient.
  3. Added logging with Serilog.
  4. Added unit tests

Ideas for further improvements:

  • Cache the exchange rates since they change once per day. But the invalidation of the cache might be tricky, because it depends on when the bank updates exchange rates. So probably the risk is higher than the benefit
  • Add integration with some performance monitoring system to persist logs, monitor metrics and receive alerts about critical issues
  • Add integration tests to make sure all parts of the app work well together

Thanks for the task, I had fun working on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant