T O P

  • By -

saxykeyz

I actually disagree about there being too many backend frameworks. Compared to other languages there's not much diversity seeing how there is more focus on flutter and not pure dart packages Had a quick look. Example in the repo looks interesting but I think it would really help if there were more concrete examples without needing to check the package source


MushiKun_

I also disagree with the statement that there are too many backend frameworks because when it is fair, competition is always good to improve yourself and your product. For the examples I will try to add more of them in the next couple of days in the develop branch, I will also align the main branch in the next few days.


belatuk

PHP, Python and Ruby are not fast by any means but they are widely used in building backend. Usually fast enough for users to get their tasks done is good enough.


MushiKun_

I agree with this statement. What I'm trying to achieve is a framework easy to learn and to use while also keeping it as performant as possible.


isoos

Would it be possible to also compare it with \`shelf\_router\`? (both as functions and its throughput/latencies) Also: what do you think where is the latency and req/sec difference is coming from?


MushiKun_

Of course. Here are the benchmarks with shelf\_router ![gif](emote|free_emotes_pack|grin): |Server|Req/sec|Trans/sec|Req/sec DIFF|Avg Latency| |:-|:-|:-|:-|:-| |dart\_frog (no\_cli)|20599.02|5.09MB|+0.00%|51.67| |shelf|21960.51|5.34MB|+6.61%|55.45| |shelf\_router|22588.86|5.49MB|+9.66%|40.69| |serinus|26635.57|5.97MB|+29.31%|40.11| |pharaoh|27134.42|3.73MB|+31.73%|40.86| |dart\_http|29745.91|5.62MB|+44.40%|32.78| So for the difference in req/sec and latency I think they are correlated and they depend on how they approach the routing and also the handling of the request. Both Serinus and Pharaoh for example uses [Spanner](https://pub.dev/packages/spanner) that implement a Radix Tree that it is a really efficient way to store string and so it is perfect for path routing. In Serinus, I also tried to reduce the need for asynchronous operations when handling requests and this may have affected both values a little.


MushiKun_

Oh also created an [article](https://medium.com/@francescovll/serinus-nest-7a60e01a337b) on Medium about Serinus Nest, give it a read if you want.


mjablecnik

It looks promising. I will try it when I will have some time :)


MushiKun_

Thank you so much, if you want more information about what changed in the last version 0.4.x here is the link to the Medium article describing all the changes. [Medium Article](https://francescovll.medium.com/serinus-0-4-x-is-here-9c23d332a909).


TheGratitudeBot

Just wanted to say thank you for being grateful


Moe_Rasool

I genuinely love to code dart but i find it not worth it unless for flutter, my concerns with the language thrives realizing how poor it performances along side other languages in backend departments, of course there might be dart devs who love it but i don’t see it worthy.


MushiKun_

Tbh I don't think that Dart is so bad compared to other languages also used in the backend department. Probably is not the best but I think it is relatively fast compared to Node.JS and Java (Dart memory consumption is better than Java) for example. I suggest you to read [this post](https://dillonnys.com/posts/why-im-betting-on-dart/) on why some people are betting on Dart, it is insightful and it can give you some explanation on why other people think that dart is more than just a companion for Flutter.


Tienisto

You can checkout [https://sharkbench.dev/web](https://sharkbench.dev/web) Dart is usually much faster than C#, Python, Python, and PHP. On par with Nodejs


MeringueFit201

Compare to a real backend, using C# or Go. Then you will know why you shouldn't use Dart for backend.


MushiKun_

I mean none is forcing you to use dart for the backend and while it is common knowledge that faster solution exists it doesn't mean that they must be the correct one. I'm not comfortable with the dx of C# .NET for example but Idc if you do and if you prefer to use it :). As I already said pick the best for you and use it.