https://github.com/santik/miro-widgets
https://github.com/santik/miro-widgets
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/santik/miro-widgets
- Owner: santik
- Created: 2020-06-10T15:01:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-14T20:37:23.000Z (over 5 years ago)
- Last Synced: 2025-01-14T01:09:57.583Z (12 months ago)
- Language: Java
- Size: 242 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Solution
### Chosen technologies
- Java 11
- SpringBoot
- JUnit
- Swagger
- H2
### Application
Type of the storage can be changed in application.properties `app.storage.type`.
Valid values: `inmemory` and `jpa`.
### Testing
`mvn clean test`


### Running
`mvn clean package` - this will run tests and create jar file
then `java -jar target/miro-widgets-1.0-SNAPSHOT.jar`
To access API Swagger was set up.
Url is http://localhost:8080/api/swagger-ui.html (when running the service)
### Complications
- configurable datastore - DONE
- pagination - DONE
- rate limiting probably can be done with https://github.com/MarcGiffing/bucket4j-spring-boot-starter or guava https://www.baeldung.com/guava-rate-limiter
- filtering:
- check every widget if it fits. Complexity will be O(n), but we need less
- create 4 additional indexes (the same as zindex) which will contain left, right, top and bottom widget borders. Take from each index values `<=` corresponding area border. Return widgets which present in all 4 results.