Thread overview
Serverino 0.4.0
Feb 01, 2023
Andrea Fontana
Feb 01, 2023
psyscout
Feb 01, 2023
Andrea Fontana
Feb 01, 2023
Andrea Fontana
Feb 01, 2023
Andrea Fontana
February 01, 2023

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:

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

February 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?

February 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:

>

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?

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!
Andrea

February 01, 2023

On Wednesday, 1 February 2023 at 20:01:13 UTC, Andrea Fontana wrote:

> >

do you have any plans to do some benchmarks or if you did, please share the place to check it?

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!

Andrea

February 01, 2023

On Wednesday, 1 February 2023 at 20:01:13 UTC, Andrea Fontana wrote:

> >

do you have any plans to do some benchmarks or if you did, please share the place to check it?

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!

Andrea