Thanks a lot for such amazing content. I am a flutter developer, finding rust amazing to learn and got to your channel from youtube search for axum, your channel is such a gem to learn axum and rust. Learned many many things from you. I am trying to make a document management system with flutter as frontend and axum as backend. I want to make apis in json-rpc and for file uploads (about 1 to 3 gb in size) use rest api multipart. Any suggestions would help a lot , about json-rpc browser compatibility and for file upload should I use multipart or it can be achieved by json-rpc also, if yes can you explain. Thank you.
@Semicolon10
4 ай бұрын
Thanks a lot .. It helps.. 🙏 Firstly, There are no compatibility issues that you will encounter while consuming ur Json-RPC its just a HTTP POST Call with different body structure. Secondly, If you ask me ideally i would choose axum. Because this rust backend is ur BFF (Backend for frontend) having REST on BFF will help you support different features going forward.. Also Json-RPC/gRPC are better in Service-Service communication where your context has already been authenticated, authorized etc.. Now you want to pass a lightweight payload between ur micro services. While JSON-RPC is designed primarily for remote procedure calls and not for file uploads, it is technically possible to handle file uploads using JSON-RPC by encoding the file data in the JSON payload (hack). But highly inefficient. So i would recommend using axum (As i explained in multiple videos tons of stuff u can do on ur backend using axum)
@abdulcodes
4 ай бұрын
@@Semicolon10 Thanks, will try.
@bichkhebk
4 ай бұрын
How to setup a consumer in loop forever, how to reconnect connection once we disconnected
@Semicolon10
4 ай бұрын
consumer in loop forever : You can add consumer logic in an infinite loop { }. how to reconnect connection once we disconnected : I don't get ur query which connection?
@LibreGlider
3 ай бұрын
The easiest way would be to make the code a lambda function and deploy this to a Step function. The step function will take care of the retry logic for you.
@Semicolon10
3 ай бұрын
@@LibreGlider I think it depends on scale, Otherwise running such stuff in lambda can be pretty costly.
@LibreGlider
3 ай бұрын
@@Semicolon10True but its the easiest. The "best" place is probably in EKS, ECS, Fargate or EC2 that's already running.
Пікірлер: 9