Live data from Hacker News

SimpleW – Web Server Library .NET Core

github.com

31–40 of 80 posts

Re: SimpleW – Web Server Library .NET Core

#31
post #3

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.

> 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

Re: SimpleW – Web Server Library .NET Core

#32

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

> 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

|

...

Re: SimpleW – Web Server Library .NET Core

#33
post #11

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.

There's also Fast Endpoints[1], which Kind of the best of both worlds, minimal-API and REPR.

1: https://fast-endpoints.com/

Re: SimpleW – Web Server Library .NET Core

#34
post #17

Earlier quoted context omitted.

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 sol…

Enable trimming

And AoT.

Re: SimpleW – Web Server Library .NET Core

#35
post #15

Earlier quoted context omitted.

In total. Just compare different web frameworks by performance, flexibility, features and so on. Whatever you compare, ASP.NET Core will probably end up in the top 20%.

crazy how people just dont want to believe it, but its really really good

People (particularly, HN) still associate it with the old .NET framework days and it being tied to Microsoft, Windows Server, etc.

.NET has had a hard time shaking off that old stigma, and to be fair, by the time it was really good, a lot of places already moved on to other tech (in particular, Go) .NET missed its window to escape the enterprise and despite being great, will probably never be seen as sexy.

I love it though. It's by far one of the most productive frameworks, and C# is pleasant to work with, and F# even more so.

Re: SimpleW – Web Server Library .NET Core

#36
post #17

Earlier quoted context omitted.

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 sol…

Enable trimming

Simple claim with a complex story.

I thought about mentioning AOT and trimming, but my comment was already long.

AOT in ASP.NET is still a moonshot in most cases, and a non-starter in existing web apps due to dependencies not supporting AOT.

Worth mentioning that as of .NET 9 AOT is not supported on Android.

Re: SimpleW – Web Server Library .NET Core

#37
post #19

Earlier quoted context omitted.

Sometimes. It's usually a lot bigger than that the moment you pull in any simple dependencies. Also the CLR memory overhead is horrible. Our .Net guys have serious problems with startup time (JIT) and initialy latency on .Net Core so I don't trust the fast claim. And no you can't just AOT everything. We moved a couple of critical services over to Go because of those two issues and it turned a few heads.

Curious what the use-case is where JIT latency is an issue for a http service?

We are fairly high traffic. Deployments, even rolling, can and do cause fairly noticeable latency spikes and side effects like upstream services having to queue requests, pool escalations, all sorts. Warming stuff up before first hit is a complete bitch on top of that.

I notice Apple had similar problems and moved some of their back end to Swift from JVM recently. There was a post on here.

Re: SimpleW – Web Server Library .NET Core

#38
post #11

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.

For the uninitiated, what's wrong with NetCoreServer?

Re: SimpleW – Web Server Library .NET Core

#40
post #31
post #3

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.

> 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

>The fact is there are very few dotnet web servers.

SRE here, very few because Microsoft is strongly opinionated with ASP.Net and those opinions most sense for VAST majority of their users.

Post reply on HN