https://github.com/akayeshmantha/currency-converter
https://github.com/akayeshmantha/currency-converter
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/akayeshmantha/currency-converter
- Owner: Akayeshmantha
- Created: 2022-10-04T10:46:13.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-04T10:53:17.000Z (over 2 years ago)
- Last Synced: 2025-02-12T07:55:14.722Z (4 months ago)
- Language: Java
- Size: 88.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# presentation-currency-conversion-app
Spring-boot 2.7.3 🚀 + Thymeleaf ☘️ application for demo purposes.## Motivation 💡
Learn reactive programming## How to run 🏃
### Not yet containerized :p
### So in the hard way or deploy as a war file.
visit ➙ [http://localhost:8080](http://localhost:8080)
# How the conversion app working
1. The conversion app is fully reactive.
2. It has a facade layer which abstracts the usage and will help to extend support for another conversion api in the future
3. All the conversions performed in big decimal.
4. Calls to the external api's are cached for 30 mins. As of now with reactive we cannot use Cache from spring boot
the app will get blocked which is not the best way. Bt still we have reactor addon based cachemanagers and in
this project am using GuavaBased Reactive cache layer.
5. Rest exceptions are handled in the end from the advisor after its been thrown from the controller.
6. Why not use view model to populate symbol valuesAlthough below way we can make the ui reactive through model object.
IReactiveDataDriverContextVariable reactiveDataDrivenMode =
new ReactiveDataDriverContextVariable(exchangeServiceFacade.getExchangeRateSymbols(), 200);It doesn't work when trying to subscribe for the same flux stream twice.
It works for one fine but completely blocks the ui and doesn't render anything on the second currency drop down
# UnCompletedTask
1. Unit test in the service layer.