tapir VS transit-lang-cmp

Compare tapir vs transit-lang-cmp and see what are their differences.

transit-lang-cmp

Programming language comparison by reimplementing the same transit data app (by losvedir)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
tapir transit-lang-cmp
14 15
1,275 421
1.1% -
9.8 0.0
7 days ago 4 months ago
Scala Elixir
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

tapir

Posts with mentions or reviews of tapir. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-21.
  • what library/framework should I use for backend development?
    3 projects | /r/scala | 21 Feb 2023
    You're not confined to the usual suggestions below (play, http4s). There's a ton of options. (I wrote test cases using a bunch of different frameworks a few years ago at https://github.com/hohonuuli/msdemos). Having written services using a variety of frameworks in production, I would strongly suggest using one that auto-generates API docs (openapi, swagger) for you. That will save you a huge amount of time later on. For heavier services, like the one at https://fathomnet.org/, I tend to the Java side (Quarkus is my current top choice, but Micronaut and Helidon are both great). For everything else I use Scala. My go-to right now is tapir using a vertx backend. See https://tapir.softwaremill.com/
  • Micronaut vs others(Spring Boot, Quarkus and co.)
    5 projects | /r/java | 10 Nov 2022
    Tapir is a Scala framework. (which runs on the JDK) Since the recent release of version 1.0, it's become my go to for many projects. It doens't provide much in the way of integrations with 3rd party frameworks, but I actually prefer that. It does autogenerate great swagger docs though.
  • Programming language comparison by reimplementing the same transit data app
    6 projects | news.ycombinator.com | 23 Oct 2022
    I do wonder where the recommendation to use http4s for beginners came from. http4s is a very capable library (and if you care much about composition it is excellent), but I wouldn't describe the documentation as beginner friendly.

    A slightly better starting point for scala 3 + type-safe server building is tapir e.g. https://github.com/softwaremill/tapir/blob/master/examples3/... . With that, you get a declarative definition of your endpoints (+ error types, auth, etc.) that you can use for both servers and clients, which comes very handy when writing integration tests of course.

    > absolutely ridiculous the fetishization of extremely complex FP and type-level hacking that goes on in the ecosystem

    An alternative way to look at it is that there is a lot of essential domain complexity that gets encoded via the type system to let the compiler do the hard work. That "extremely complex FP" does not arrive out of nowhere - I really recommend at least skimming through the slides from rossabaker, the http4s designer, that motivate where the core type signature comes from https://rossabaker.github.io/boston-http4s/#2

    I suppose one of the "features" that I like about the (typelevel) community is that the approach of "worse is better" is not taken, and a lot of effort is expended to make things correct, modular and orthogonal. This has the drawback of increased upfront complexity, that anecdotally pays off the moment your compiler does not error and the program runs as intended.

  • Scala.js AWS Lambda, using Scala 3
    6 projects | /r/scala | 13 Sep 2022
    Did you try tapir? There is a module for deploying aws lambda with Scala js. Not sure whether it is compatible with Scala 3, I am sticking with Scala 2 until Scala 3 gets more mature.
  • Library recommendations?
    4 projects | /r/scala | 9 Sep 2022
    I'm aware, but it's a design decision that was made on purpose, and which I find in practice not a big problem at all.
    4 projects | /r/scala | 9 Sep 2022
    In any case I strongly suggest to have a look at Tapir which will make your life a bit easier and allow you to swap the HTTP backend in the future if needed.
  • Monorepo: seeking for an advice for bi-lang project
    7 projects | /r/scala | 31 Jul 2022
    Backend is source of truth for types on frontend (backend generated OpenAPI definition with tapir, frontend takes it with orval)
  • Experienced dev new to Scala looking for a quick answer to get me on the right track - Advice on *standard* Scala framework stack to quickly set up a web-app backend ;
    2 projects | /r/scala | 3 Jul 2022
    In all cases I would strongly suggest to have a look at Tapir, regardless of the server implementation that you pick.
  • Resources for learning about http4s and Typelevel ecosystem?
    3 projects | /r/scala | 2 Feb 2022
    Finally I would strongly recommend having a look at Tapir. Even if you don't need to share endpoints or generate OpenAPI documentation, it provides a really neat abstraction on top of http4s.
  • Scala 3 Reflection
    5 projects | /r/scala | 1 Feb 2022
    Sounds like you want an IDL. smithy4s and tapir come to mind as potential solutions. Scala code gets generated for you from some intermediate format.

transit-lang-cmp

Posts with mentions or reviews of transit-lang-cmp. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-23.
  • Migrating from Warp to Axum
    4 projects | news.ycombinator.com | 23 Nov 2022
    > The axum::debug_handler macro is invaluable to debug type errors (there's some with axum too), like for example, accidentally having a non-Send type slip in.

    Heh, yeah. For my recent project where I explored implementing the same little app in a few different languages[0], I chose Axum for the rust version.

    The whole "extractor" system was pretty magical, and when I had this exact issue (non-Send argument), the compiler error was totally useless. I did see the docs about adding this extra macro crate for error messages but it seemed like a bit of a red flag that the framework was going against the grain of the language. Still, on the whole, I did enjoy working with Axum.

    [0] https://github.com/losvedir/transit-lang-cmp

  • Programming language comparison by reimplementing the same transit data app
    6 projects | news.ycombinator.com | 23 Oct 2022
    This is great! Just pushed up a commit that uses it and updated the benchmarks[0]. I'm seeing a 1.6X - 2X improvement in overall performance. Not bad for a drop-in replacement. And since it's based on serde, I trust it, and I feel like trying out a different JSON library is within scope for me of not just "gaming the benchmarks", as this is actually something I'd now consider using at work.

    It's not quite as high as I was seeing with `jiffy` (3,800 req/sec here vs 4,000+ with jiffy), but I'm not confident that was a totally fair comparison. `jiffy` doesn't integrate as nicely with Phoenix, so I was just calling `:jiffy.encode(...)` in the controller and then doing a `text(...)` response. I need to double-check if `json(...)` is doing more work here.

    [0] https://github.com/losvedir/transit-lang-cmp/commit/140d693b...

    6 projects | news.ycombinator.com | 23 Oct 2022
  • Why does Scala seem to be slow at benchmark results?
    6 projects | /r/scala | 22 Oct 2022
    Nowadays, I reached out for some benchmark results. Scala is slower than Java and Kotlin. Can you explain it? https://github.com/losvedir/transit-lang-cmp https://github.com/kostya/benchmarks
  • Why is C#/dotnet outperforming rust in my simple benchmarks?
    6 projects | /r/rust | 21 Oct 2022
    I had a chance to update the Go code (commit) to pre-allocate the arrays based on the known length before all the appends, and saw ~30% increase in performance, with top requests per second going from about 8,600 to 11,000.
    6 projects | /r/rust | 21 Oct 2022
    I just pushed up a commit that changes the schedule_handler to use a .collect, and re-ran the benchmarks. Got a nice little bump in all of them.
    6 projects | /r/rust | 21 Oct 2022
    Indeed! Enabled and re-benchmarked in this commit.
    6 projects | /r/rust | 21 Oct 2022
    I recently wrapped up a little project (https://github.com/losvedir/transit-lang-cmp) where I rewrote the same transit data JSON API in several different programming languages.
    6 projects | /r/rust | 21 Oct 2022
    Winner winner chicken dinner! I just pushed up a commit that implemented this and updated my benchmarks. Requests per second went from ~12.5k to ~19k, much faster than all my other implementations!

What are some alternatives?

When comparing tapir and transit-lang-cmp you can also consider the following projects:

smithy4s - https://disneystreaming.github.io/smithy4s/

http4s-jwt-auth - :lock: Opinionated JWT authentication library for Http4s

distage-example - Example project built using distage, tagless final, http4s, doobie and zio

scala-http-client - Extends the akka-http-client with retry logic, error handling, logging and signing

pfps-shopping-cart - :shopping_cart: The Shopping Cart application developed in the book "Practical FP in Scala: A hands-on approach"

AkkaGRPC - Akka gRPC

akka-http-metrics - Easily collect and expose metrics in your akka-http server

Akka - Build highly concurrent, distributed, and resilient message-driven applications on the JVM

lishogi - ☗ lishogi.org: the forever free, adless and open source shogi server forked from lichess.org ☗

gremlin-scala - Scala wrapper for Apache TinkerPop 3 Graph DSL

scalajs-react - Facebook's React on Scala.JS

lesson-service - An API first approach to developing microservices using Tapir