All implementations follows below design:
All examples are using coffee-shop static rest service except ZIO Http because of the some bugs. For ZIO, I have implemented a simple Heroku service described here.
Endpoint | Description | Return type | Request example | Return example |
---|---|---|---|---|
/coffee | Returns coffee types | Array[String] |
http://localhost:9000/coffee | [ |
/coffee/#category | Drinks in the category | Array[ |
http://localhost:9000/coffee/hots | [ |
- Functional implementation
- Native Datadog support
- Supports full HTTP protocol
- Detailed documentation: https://doc.akka.io/docs/akka-http/current/index.html
- Functional implementation
- Support for effect libraries (cats effect etc)
- Limited Datadog support via third party libraries ( avast/datadog4s, Kamon etc). Integration in progress: DataDog/dd-trace-java#1934
- Supports full HTTP protocol
- Limited documentation: https://http4s.org/v0.23/index.html
(as of writing this documentation)
- Does not support full Http Protocal
- No native Datadog support yet
- Client has major pitfalls: stable channel does not have Https support. Beta channel has some bugs (removes trailing
/
in the URLS etc) - Functional, and follows effect library guides
- Limited documentation (explains just a simple example): https://dream11.github.io/zio-http/docs/index
- Play like dependency framework (Guice) support by default
- Supports full HTTP protocol
- Supports both Twitter's Future or Cats effect for processing
- Native Datadog support
- Detailed documentation: https://twitter.github.io/finatra/user-guide/
All tapir implementations exposes documentation automatically on API level.
ReadDoc Web UI: http://localhost:9000/docs
Additionally, tapir-akka-http
also implements a way of exporting openapi yaml. A Github Action uses this implementation and publishes a static swagger documentation at http://veysiertekin.github.io/scala-http-framework-samples
(This Heroku service has been used in ZIO Http)
1- Go to heroku-coffee-shop-service/ in your terminal.
2- Login to Heroku:
heroku login
3- Create a simple app
heroku create
git push heroku main
4- Start application by scaling it to 1
heroku ps:scale web=1
4- You can view http location of the service by:
heroku open