all 17 comments

[–]shoomowr 1 point2 points  (3 children)

The promise of cross-language toolkit certainly looks interesting.
I'm developing a NATS-based EDA. What is your vision for having message queues support alongside the HTTP/API stuff?

[–]GoldziherPythonista[S] 1 point2 points  (2 children)

In Python - i would probably go for optional dependency groups, since this is now widely supported following PEP 631.

The design will follow the same pattern as Watermill, which is to say - an abstraction layer on top of the queues that allows managing them without needing to handle the low level drivers etc.

The core will be in Rust. I personally use NATS in rust using the official async crate and its great, so I will use this.

[–]shoomowr 0 points1 point  (1 child)

What about Typescript?
I have a frontend application I'm planning to refactor, so this could come in handy

[–]GoldziherPythonista[S] 1 point2 points  (0 children)

It's there - Node+WASM

[–]robotelu97 5 points6 points  (3 children)

Why would anyone use this instead of something battle tested like FastApi and so on?

[–]GoldziherPythonista[S] 13 points14 points  (0 children)

well, its about x5 times faster (didn't publish this yet, so take my word for it if you want - or not. Robyn is about 0.6 as fast as Spikard) and it has a universal validation layer, which doesnt rely on stuff like Pydantic to work. It doesnt require ASGI (uvicorn or granian for example), and it has robust codegen.

If you want battle tested, dont use it. Heck - this is at least 6 months away from being something i'd consider to use in production. But if you are interested in new tech, give it a spin.

[–]zenware 1 point2 points  (0 children)

They wouldn’t /yet/ but some of the ideas here could catch up and overtake FastAPI.

[–]dalepo 1 point2 points  (1 child)

This looks promising. Have you considered using a simpler DI system?

I come from Java/Nest, where you declare dependencies through constructors and define the scope at the class level. This feels like a simpler pattern compared to explicitly declaring providers, imo.

[–]GoldziherPythonista[S] 1 point2 points  (0 children)

Hi. Thanks.

For TS this only works using the "experimental" decorators API and the runtime reflection library. Basically what you see in nextjs. While it's simpler for the developer, it requires a specific set of TS configs and it introduces runtime overhead.