←back to thread

488 points levkk | 3 comments | | HN request time: 0.625s | source

Hi everyone,

I've been "funemployed" for a few months and with all that free time and idle hands I wrote a full web framework (think Rails, not Flask) for Rust.

It's boring old MVC, has its own ORM, templates, background jobs, auth, websockets, migrations and more. If you're keen but don't feel like rewriting your app in a different language, Rwf has a WSGI server to run Django (or Flask) inside Rust [1], letting you migrate to Rust at your own pace without disrupting your website.

I think Rust makes a great prototyping and deploy straight to production language. Now it has yet another framework for y'all to play with.

Cheers!

[1] https://levkk.github.io/rwf/migrating-from-python/

1. throwaway313373 ◴[] No.41924477[source]
I just noticed that REST framework returns 501 - Not Implemented [0] if the method is not implemented, which I think is really weird. I think that most frameworks return 405 Method Not Allowed in such cases.

Also, it is typically assumed that 5xx return codes are retryable while 4xx are not. So, I don't think that not implemented method should return 5xx, because it is pointless to retry it.

[0] https://github.com/levkk/rwf/tree/main/examples/rest#restcon...

replies(2): >>41925027 #>>41927138 #
2. levkk ◴[] No.41925027[source]
Interesting. I should reread the REST spec. I put not implemented as more of a tip to the developer to implement this method at their earliest convenience.
3. mdaniel ◴[] No.41927138[source]
> I don't think that not implemented method should return 5xx, because it is pointless to retry it.

Pedantically, that's not true - it can be unimplemented at T0 and then a deploy happens and it will be implemented at T1. You are likely thinking of retries within the milliseconds timeframe, but even that could be true in a race-condition-esque situation where a redeploy was happening and the request just got unlucky

In the context of this thread, not allowed is quite different from "happens to not be present." I think of the distinction like 404 versus 410 Gone <https://http.cat/status/410> in a temporal state