top | item 44797834

SimpleW – Web Server Library .NET Core

59 points| prodbro | 6 months ago |github.com

79 comments

order

bob1029|6 months ago

Not sure about this one. It's based on NetCoreServer which is great but it's definitely not something I'd be comfortable putting into production over kestrel or IIS.

From a performance standpoint, it is very difficult to beat kestrel now. If you don't want all the fancy Microsoft bullshit (I certainly don't), use the minimal APIs and map out routes to lightweight HttpContext handlers.

phendrenad2|6 months ago

For the uninitiated, what's wrong with NetCoreServer?

oconnor0|6 months ago

I really wish that Kestrel was available as a standalone library. Kind of like Jetty on the JVM.

bravesoul2|6 months ago

I wonder. Is this one meant to deal with raw internet traffic or sit behind an ingress e.g. IIS?

brainzap|6 months ago

minimal APIs is microsoft bullshit

also what does performance matter on webservers

andix|6 months ago

But why?

ASP.NET Core is one of the best web frameworks, extremely modular and flexible. It's low level components (http server, routing) can be used as a foundation for new web frameworks.

taspeotis|6 months ago

I agree that ASP.NET Core is fantastic and it doesn’t give you many reasons to look elsewhere.

That said I think some diversity / competition / cross-pollination should be welcomed in the .NET space.

Not a fair comparison but I’m glad Avalonia exists despite WPF, for example.

sltr|6 months ago

The library's tagline says "Powerfully Simple. Blazingly Fast." So there. ::folds arms::

Joking aside, I do agree that ASP.NET Core is a behemoth. On .NET 9, I just now did `dotnet new webapi` followed by `dotnet publish --self-contained -p:PublishSingleFile=true` and the binary is 103MB. That would blow up the size of a mobile app considerably, just to listen to HTTP.

There a separate use case that SimpleW won't solve: When you're on a platform that .NET Core doesn't support, like Raspberry Pi Zero (armv7l). In this case all you have is the mono framework and binding to raw ports.

oakstendheim|6 months ago

One of the use cases that stands out to me is dropping an API into a console application without having to use a different project. With ASP.NET I have to set up a new project, use a different SDK and then re-register all my services in its service collection. It looks like this one is bringing it closer to how it's done in Go which I personally really like.

prodbro|6 months ago

author here.

I wanted to start with something small where I could read or write the code in a reasonable amount of time.

My usage was, and still is, for low traffic. I don't intend to replace the Kestrel beast.

Just a framework you can quickly understand without being lost in documentation once you want to custom a part.

louthy|6 months ago

> ASP.NET Core is one of the best web frameworks

In your opinion. Not everyone is of the same mind when it comes to software design. Sometimes the motivations are different.

As a community we should encourage those looking to find their own path. We become myopic otherwise.

prodbro|6 months ago

> ASP.NET Core is one of the best web frameworks

I don't think so.

The fact is there are very few dotnet web servers. ASP.NET Core is supported by the owner of the dotnet langage who is also the M of the GAFAM.

There is some place in the ecosystem for other alternatives

nirav72|6 months ago

I was wondering samething. But then I saw that it has some built-in capabilities for WebSockets and OpenTelemetry.

doubleorseven|6 months ago

seems like the author didn't like the obvious or alternative solutions out there, and went and created one of his own. i know some people who use their own web server, this is an on going adventure for sure.

brainzap|6 months ago

no its not. We always can use alternatives

whoknowsidont|6 months ago

>ASP.NET Core is one of the best web frameworks

...based on what?

anditherobot|6 months ago

Does this mean a developer doesn't have to install nginx or iis ?

qingcharles|6 months ago

ASP.NET Core comes with its own built-in web server named Kestrel, which is very highly optimized. On most projects, I use it totally bare-metal, though I figure most run it behind a reverse proxy like nginx or yarp.

tucaz|6 months ago

This has been the case for years

andix|6 months ago

No modern dotnet web framework requires nginx or iis.

SideburnsOfDoom|6 months ago

Have you tried Kestrel, YARP and Aspire?

prodbro|6 months ago

> Does this mean a developer doesn't have to install nginx or iis ?

author here.

You don't have to keep it behind a reverse proxy like nginx.

But you can, especially if you have multiple APIs and you want to keep thing separated for security reason.

Example :

nginx:443 (reverse proxy, domain name routing)

|

|-> website1:8081 - docker container with SimpleW

|-> website2:8082 - docker container with SimpleW

|

...

mrweasel|6 months ago

At a quick glance it looks much simpler than e.g. Kestrel, which I found pretty confusing to get running.

prodbro|6 months ago

author here.

that's the reason why i start the project. I had time and wanted something simple as my needs.

aanthonymax|6 months ago

The documentation on VitePress looks cool. I didn't think there was such a theme there.

prodbro|6 months ago

VitePress saved my day.

The default template is great and everything in VitePress has been thinking to create documentation. Very nice project.