forked from atanava/geo-locator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dzmitry Shalukhau
committed
Feb 23, 2022
1 parent
c9a9ed7
commit bc9fc71
Showing
6 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* Why are you building custom cache instead of using some in-memory db (Redis, Memcached, etc) | ||
* Ideally docker in development builds application inside container. This way allows to not install any development tools when you develop. Can you describe steps, how to implement it. | ||
* Why you are using spring.jpa.open-in-view=false in configuration? Why developers forced to set it? Why it is antipattern? (Same questions for defer-datasource-initialization: true) | ||
* Tests... What tests MUST be written (at least) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bc9fc71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a test task, and we agreed that it must be hand-made cache, because they wanted to see some algorithmic thinking.
To be honest - I'm still new to docker, so it's still hard for me to answer this question.
This can have a big performance impact because database queries are running without transactions in auto-commit mode, and the n+1 problem can also occur.
Because I use schema created by Hibernate, but data.sql script runs before schema is created. I use this option to allow Hibernate to create schema first.
OsmController (using SpringMockMVC), OsmService, JsonUtil, UrlBuilder
It's my mistake, because previously I named my project as "locator", after that I renamed it to "geo-locator", but unfortunately forgot to rename the package.
To improve performance because these methods are only called once and they are not called from the application, the application only uses the beans.
spring-projects/spring-boot#9068
Although, for such a small application, this is probably overkill...
Because theoretically a user can have many different roles, so I decided to use a collection that is added through the constructor using an lombok's annotation @AllArgsConstructor.
In this way I wanted to use a composite primary key because the latitude and longitude pairs are always unique, but it didn’t work out well, I agree with this, it would be better to use ordinary constraints.
Perhaps content negatiation will be better, but I tried to implement my API to be a bit similar with Nominatim API