digitalmars.D.announce - Serverino 0.4.0
- Andrea Fontana (30/30) Feb 01 2023 Hi! I've just release a new version of serverino, my pure-D
- psyscout (7/8) Feb 01 2023 First of all, thanks for your effort!
- Andrea Fontana (17/25) Feb 01 2023 Someone already did it (with a previous version!).
- Andrea Fontana (7/9) Feb 01 2023 Here some results from may, but serverino went over a major arch
- Andrea Fontana (7/9) Feb 01 2023 Here some results from may, but serverino went over a major arch
Hi! I've just release a new version of serverino, my pure-D webserver without 3rd party dependencies, super-fast to compile. This version is featuring a basic & easy way to add routing using UDAs. A big thank you to Ferhat Kurtulmuş that create a pull request for this :) Just create a ready-to-go serverino using the project template: ```dub init -t serverino your_server``` And then test the new feature: ```d import serverino; mixin ServerinoMain; endpoint route!"/hello/world" // also: route!(request => request.uri == "/hello/world") void your_request(const Request r, Output o) { o ~= "Hello world!"; } endpoint route!(request => r.get.has("item")) void another_request(const Request r, Output o) { o ~= "Item " ~ r.get.read("item"); } endpoint priority(-1) void this_is_a_fallback(const Request r, Output o) { o ~= r.dump(); } ``` More info and docs: https://github.com/trikko/serverino
Feb 01 2023
On Wednesday, 1 February 2023 at 17:36:07 UTC, Andrea Fontana wrote:Hi! I've just release a new version of serverino, my pure-D...First of all, thanks for your effort! For the second, I have a couple of simple web services that are require small, simple and fast webapp. So I'm wondering, do you have any plans to do some benchmarks or if you did, please share the place to check it?
Feb 01 2023
On Wednesday, 1 February 2023 at 19:49:40 UTC, psyscout wrote:On Wednesday, 1 February 2023 at 17:36:07 UTC, Andrea Fontana wrote:Someone already did it (with a previous version!). Anyway it's fast enough for real world usage if you're not running a million webpage website on it 😀 The company I work for uses it for many small simple and fast webapps! In most cases the bottle neck is not serverino itself, but the code you're putting over it. It works with a daemon and responders, not fibers. So it could be not efficient for long blocking operation. Let's say you want to replace PHP with a better and faster language, that's a good choice :) It's really fast to setup for development and I suggest to put it under nginx if exposed into the wild (easy, explained on github page) Give it a try! AndreaHi! I've just release a new version of serverino, my pure-D...First of all, thanks for your effort! For the second, I have a couple of simple web services that are require small, simple and fast webapp. So I'm wondering, do you have any plans to do some benchmarks or if you did, please share the place to check it?
Feb 01 2023
On Wednesday, 1 February 2023 at 20:01:13 UTC, Andrea Fontana wrote:Here some results from may, but serverino went over a major arch rework after that, so I'm not sure they are still valid. https://github.com/tchaloupka/httpbench If you want to do some benchmarks your welcome! Andreado you have any plans to do some benchmarks or if you did, please share the place to check it?
Feb 01 2023
On Wednesday, 1 February 2023 at 20:01:13 UTC, Andrea Fontana wrote:Here some results from may, but serverino went over a major arch rework after that, so I'm not sure they are still valid. https://github.com/tchaloupka/httpbench If you want to do some benchmarks your welcome! Andreado you have any plans to do some benchmarks or if you did, please share the place to check it?
Feb 01 2023