Hacker Newsnew | past | comments | ask | show | jobs | submit | prodbro's commentslogin

I'm still working on my Web Server Library .NET Core

I'm rewriting from scratch : https://simplew.net/v26/


I'm still working on my Web Server Library .NET Core https://stratdev3.github.io/SimpleW/

I'm rewriting from scratch : https://github.com/stratdev3/SimpleW/releases/tag/REWRITE


I'm working on my side project on my free time, a web server library .NET Core https://stratdev3.github.io/SimpleW/


VitePress saved my day.

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


> There's also Fast Endpoints[1]

thank for the pointer !

The syntax seems cool and comprehensive, i like it.

I made some test and like its name, it is very fast : performances are closed to SimpleW, just a little bellow. But its memory footprint is the half, so i'm impressed. I will check the code, sure there are interesting things into.


> I hate when someone's software advertises itself as 'blazingly fast' and then provides NO DATA to back up the claim

agree, that's why there is a performance benchmark at https://stratdev3.github.io/SimpleW/guide/performances.html with code as you can reproduce at your own.

i'm adding other tests, more complete than the hello world one.


Cool! Please add link to that page from your github project's main page.


> 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

|

...


A web server should never be directly exposed to the Internet, provided you care about the web server host or what's behind it.


> A web server should never be directly exposed to the Internet

That's what web servers are made for, no? Like Apache, Nginx etc. I mean, you could certainly put HAProxy in front but you'd need a good reason to do this.


This is not the case for the modern Internet.

More often than not, for any serious application backend, you probably want a web application firewall (WAF) in front of it and SSL termination upstream of the web server.


And also a reverse proxy / Load balancer in front of multiple Webserver instances.


> 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 webserver variability isn't really so wide because the in the box offering since Core has been pretty good, flexible and works for most use cases. And while I really like FastEndpoints a lot over the minimal api stuff, even that is pretty straight forward.

It's not my favorite, it starts slow and I'd rather go up to JS/TS for scripting flexibility or down to Rust for really lightweight performance with fast startups. It's one of the better all-around options though. I'd rather use it over Java every day of the week and there are adapters for most things you'd ever need to communicate with.


>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.


> those opinions most sense for VAST majority of their users

I have a much more nuanced view.

I think that ASP.Net is the de facto standard for being backed by Microsoft since many years. From the gold time when ASP means IIS to now when Kestrel was cannibalized by Microsoft.

As a developer, working with the most widely used stack guarantees that these choices won’t be questioned in critical situations. I’m not saying Kestrel is bad, but it doesn’t automatically fit every scenario.

- 15 years ago, there were Apache or IIS.

- Then nginx changes the game and kicks their ass

- Then webserver starts being written into script langage for better integration (Ruby, Python), no more CGI and nginx as reverse

- Then node changes the game

- Now : caddy and other alternatives... but still not web server in PHP (troll inside)

I see a pattern to not believe aspnetcore is the only one and the best.


> The library's tagline says "Powerfully Simple. Blazingly Fast."

> Joking aside

author here.

I agree with your remark ^^

Each time i read some news about a new framework with tag "blazingly fast", i'm thinking "lol".

So i had to resist to the temptation... And finaly when doing a small benchmark, performances were not bad at all (https://stratdev3.github.io/SimpleW/guide/performances.html) and i let the "clickbait" title.

My targets are small to medium traffic and embeded devices (dotnet/android).


Did you try compiling all the test to native thru AoT? There are probably some optimizations to improve the Kestrel score by altering the config, or maybe changing how the API is written:

app.MapGet("/api/test/hello", () => "Hello World!");

As a general web server, I think I'd always go for Kestrel over this, but as another poster said, if you're trying to add an endpoint to some desktop application, this would be perfect.


> There are probably some optimizations to improve the Kestrel

You're right.

To be fair, i have to run many other benchmarks including one with the best recommanded optimizations for each projects.

a little time consuming but definetely on my todo list.


author here.

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


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: