-
Notifications
You must be signed in to change notification settings - Fork 3
Backend Development Stack
Anton Lamtev edited this page Apr 4, 2020
·
6 revisions
- HTTP server (client requests handling)
- HTTP client (requests to 3rd party services like Github)
- Database
- Database driver
- Data format for client-server interconnection
- Serialization/Deserialization
- Build and dependency management system
- Dependency Injection
- ORM (if data model will be relational)
- Relevance (chosen technologies must be used in real enterprise applications)
- Less boilerplate
- An ability for effective CPU utilizing
- Simple usage
- Team members experience with chosen technologies
- Open-source + suitable licensing
-
Spring Boot over servlet container (classic)
- Classic: RestControllers, thread and connection per request model. Threads are idle most of the time
- Simple and time-tested
- Many things integrated: DI, FasterXML Serialization/Deserialization
- Spring Data
- Boring
- Not so fashionable at non-blocking technologies era
-
Spring Boot Webflux
- Functional endpoints
- Reactor Netty
- All pros of previous one
- Reactive
- Non-blocking
- At least 2 team members worked with that
- Uses Reactor - popular and helpful implementation of Reactive Streams specefication
- Spring Data supports R2DBC
- Declarative
- May be complex little-bit?
-
Vert.x
- Interesting idea
- Non-blocking
- Reactive driver for SQL
- Callbacks
- None of the team members worked with that
- Goes well with Kotlin coroutines. None of the team members has enough experience with Kotlin
- Kotlin is not a standard in enterprise
-
Play framework with Akka Streams
- Cool so much!
- Lot of DB integrations
- So much verbose and really painful in Java
- Only one team developer knows Scala well
- Extremely complex!
-
One-nio
- Extremely fast
- Own fast serialization
- Too low-level for our project. Many things need to be written manually
-
Netty
- In general same thing as one-nio
-
Reactor-Netty
- Netty plus Reactor, that makes easier to use R2DBC
- Anyway many things need to be written manually
It looks like we'll use something relational because it's suitable for our domain.
- PostgreSQL
- Experience to work with
- Actively used in enterprise
- Lots of drivers exist
- MySQL
- ± Same
- JDBC (classic)
- Time-tested
- Boring
- Blocking
- ADBA
- Looks like it's stillborn spec
-
R2DBC
- Reactive Streams
- Non-blocking
- r2dbc-pool
- Stable
- Supported in Spring Data
-
Vert.x Reactive
- Goes well with Vert.x
- Technical preview stage
-
Vert.x JDBC
- Stable
- JDBC =(
- JSON
- Let's just stop here. It's used everywhere. A de-facto standard in the frontend world
- XML
- Protobuf
- FasterXML Jackson
- According to benchmarks - it's very fast for JSON
- Spring default
- GSON
- Slower
- Protobuf
- Unnecessarily for us
- HTTP framework preinstalled solution
- One-nio has its fast serialization. Low-level so much
- Maven
- Declarative
- De-facto standard a few time ago
- Spaghetti XML
- Ant + Ivy
- It's already the last century
- Gradle
- Declarative + imperative
- Kotlin / Groovy
- Useful
- Becomes increasingly popular
We should choose
- Java 14 (Is gonna be released 17 March)
- Spring Boot Webflux over Reactor-Netty
- Functional endpoints
- Lombok
- R2DBC
- Spring Data
- pool
- PostgreSQL
- JSON
- FasterXML Jackson
- Gradle
Because it's relevant, powerful, suited well to each other, declarative, laconic, team members worked with that. And it finally meets all our requirements.
Traditional Spring Boot - is the nearest competitor, but it's too boring.
Vert.x - is another interesting option, but none of the team members worked with that and some of its interesting features are in technical preview stage