What is your best back-end stack?

Same, it’s a WIP since long ago. I’d be very please to help him make it up to date.

2 Likes

Any recommendations for good resources on using Akka.NET?

2 Likes

Yup. But that would be awesome if you do.

2 Likes

No, just the official documentation on https://getakka.net/

2 Likes

For simple projects - rails
For more complicated willl use nodejs/golang.

Recently trying a bit of Django/Flask.

2 Likes

I’m actually trying to do most stuff serverless, so it’s a bit different, so Python / Go. But I mostly use Flask when I need a framework.

But I’ve been meaning to finally do stuff with Phoenix.

3 Likes

Very curious to get your feedback on this. What do you think of Django and/or Flask ?
I’ve always got a bad opinion, but I’m strongly biased.

4 Likes

I will talk about flask / Django separately.
Flask is relatively better than Sinatra since the community is more active than that.
Compared to Rails, Django is honestly less mature than that.

However, Python has quite a bit libraries specifically at different domains.

2 Likes

I actively run a python flask server for over 10 years now. It started as a little one-off project that… accidentally ended up getting used in ‘production’ on one of the open source sites I host due to its immediate usefulness. I’ve always kept intending to either replace it with an actually well built setup or just remove it altogether for something prebuilt open source or for it to eventually just die due to no longer needing to be used, but the prebuilt things lack features I need so I’d need to rebuild most of the functionality anyway, and I’ve not got around to rebuilding it because I keep expecting it to “die in the next year due to no longer needing to be used”, but that’s been repeating for over 10 years now.

In essence the flask app has a fairly minimal user authentication system, using pyobject or whatever it was called as the very minimal ‘database’ (only stores user data, kind of…), and files get uploaded and commands fired on it to do ‘stuff’. The ‘stuff’ it does includes things like generating a full static site generated from files and metadata uploaded around the system and paths in a lot of… unique ways I’ve not seen in any other SSG (hence why I haven’t been able to replace ‘that’ functionality yet either, it would practically require rewriting them as well).

Flask is easy, but I really really dislike it, it’s been the bane of so many issues for me over time, with the most annoying of which being that it can only handle a single connection at a time (yes I have it behind a uwsgi server but I still have to serialize their access to the filesystem so only one SSG update happens at a time, and it doesn’t have a good way to sync that outside of just ‘running another program’ or variety of other annoying things) and it’s a bit irritating to update.

But yeah, if you want to spool up something really really fast and really really simple, flask is great at that, but honestly I’d just use rust + rocket or so nowadays anyway (excepting rocket’s utterly garbage websocket support, only works via it’s own channel interface so you can’t just plug in any generic websocket handler very very irritatingly, though its channel interface is very nice if you can work within it, modeled on Elixir’s Phoenix Channels interface, but like Elixir’s Phoenix Channels it breaks horribly if you want to do actual real websocket connections to other libraries or so). At least rocket (and phoenix) have ways to kind of work around that by just hooking in to their underlying server libraries (hyper/tower for rocket and cowboy for phoenix) but it feels really hacky in both cases which does contribute to both libraries feeling a bit hacky as well when you are forced to do that. But I like rocket as it’s very similar to flask in feel, but significantly faster, more well made, and even easier to use in a lot of ways, in exchange for having to compile before running it, lol.

For backend stacks, rust nowadays, absolutely, unless you need extreme horizontal scaling across machines then phoenix or so can be easier to handle (though the ‘traditional’ ways of sharding work fine in rust anyway if a bit more stuff to set up than something like phoenix, though rust will scale better on a single system regardless). Rust has a lot of backend libraries, and they are working very well together as well with things like tower and such becoming popular as an integration point across them all.

5 Likes

Have you tried other Rust frameworks besides Rocket? Or is Rocket becoming the defacto framework?

And in another note, any opinions on Go frameworks? Gin?

2 Likes

I used Gin for some internal services in a layered system. I found that there will be quite a bit set up for web facing API.
And yes I am quite curious the maturity of Rust and its framework either.

Currently the most comfortable framework for me to do APIs are either expressJS/KoaJS and Pheonix.

ps. I got quite a bit of issues on Rails API mode with those gems, so I just give it up.

2 Likes

I recently started building simple micro APIs with Flask. It’s been around for a while but it gets the job done

2 Likes

Oh there’s quite a variety in the Rust ecosystem of various ‘levels’. Actix is pretty popular for a higher end version, most are pretty lower level (little more than a router) like warp or so. Most work with ‘tower’, which is a library for dispatching such requests to different things so you can actually mix and match various things (useful with rocket if you want raw websockets instead of its channel-like interface, can use warp or so on raw websockets with it). I like rocket due to how clear and simple it is to use for its overall power, it’s a lot like Elixir’s Phoenix library.

4 Likes

OK, good to know. With sadly limited hours in the day, I try to somewhat manage my efforts when learning new frameworks. I think I’ll peek at Rocket first and go from there.

2 Likes

Make sure to use the 0.5 branch, it’s about to release and has large changes so want to use it instead of 0.4.

3 Likes

Most of the time, I use Laravel with PostgreSQL

https://laravel.com/

3 Likes

I’d try to learn actix, it’s faster than Rocket but I agree with @OvermindDL1 that rocket seems super convenient. It really depends on what you are aiming at; if you want something Rails-like or Phoenix-like then yeah, I’d go for rocket.

But I’ve been in 3 Rust teams already and 2 of them had to rewrite their app from rocket to actix because they had super hardcore API servers that actually had to ingest hundreds of thousands of request per second. actix performed like 1.7x - 2.1x better than rocket there. (But they also used older versions so who knows, things might be different as of today.)

3 Likes

I like Elixir for back-end.

2 Likes

Elixir + Phoenix + LiveView for simpler apps. When I need something more in the front I replace LiveView with Svelte.

3 Likes

Which rust frameworks would you recommend in terms of similarities with Phoenix (overall)? or should I not base it from my previous knowledge?

When I started learning Elixir, Phoenix was the go-to framework and the only one I know at that time.

That’s one of my pet peeves in JS, too many frameworks to choose.

2 Likes