What makes it different? #150
-
Comparing to Vapor, what makes Hummingbird different? When to use it, and when to avoid? What are the strength of it and what problem target does it solve. I am very interested in new swift frameworks for the server land. Dokumentation needs a "motivation" section and a guide how to contribute. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Vapor provides almost everything you need in one package (HTTP2, TLS, Authentication, OTP, caching, compression, validation, web sockets etc). It's a great one stop shop. Though this makes it a very heavy package which bulks out your executable, and increases compile time. It also provides wrappers for many other packages so they can be used in the expected manner. It is quite prescriptive (admittedly there are hummingbird redis and fluent wrappers but I'm considering slimming them down). Hummingbird is designed to be more slimline. A simple hummingbird app, contains pretty much only the server and router. I've used it to set up a web server, serving local files for testing static web sites (https://github.com/adam-fowler/swift-web), you could use it to setup an http proxy server (see example https://github.com/hummingbird-project/hummingbird-examples/tree/main/proxy-server). Given the difference in size, hummingbird is probably more suited to building lambdas than vapor (using https://github.com/hummingbird-project/hummingbird-lambda) where package size matters. While it is more suited to smaller projects it is still capable of supporting larger projects. If you do need additional features there are packages that cover most features (authentication, tls, http2, web sockets, offloading tasks etc). Hummingbird is faster than Vapor. The core HTTP server can serve almost double the number of requests as Vapor (see the latest TechEmpower results). This is most likely due to Vapor including more features by default but I have spent a considerable amount of time trying to optimise the framework for speed. There is a |
Beta Was this translation helpful? Give feedback.
Vapor provides almost everything you need in one package (HTTP2, TLS, Authentication, OTP, caching, compression, validation, web sockets etc). It's a great one stop shop. Though this makes it a very heavy package which bulks out your executable, and increases compile time. It also provides wrappers for many other packages so they can be used in the expected manner. It is quite prescriptive (admittedly there are hummingbird redis and fluent wrappers but I'm considering slimming them down).
Hummingbird is designed to be more slimline. A simple hummingbird app, contains pretty much only the server and router. I've used it to set up a web server, serving local files for testing static web sit…