As a Rust beginner, am taking my sweet time slowly going through all these videos, they are more than a gold mine. Really appreciate all the effort you've put into these series!
@snk-js9 ай бұрын
me too, this dude is an angel
@cryoexn73077 ай бұрын
I think this has to be one of the best tutorials I’ve ever watched…
@dran1x Жыл бұрын
This video needs a lot more attention.
@FernandoCelestino-DataVirtus4 ай бұрын
I feel like giving a little testimony. Finally after weeks of coding along, stopping, hovering with the mouse in VSCode to read docs of used rust constructs, studying to understand the code, and trying to do things before you, so that i could know i was really learning, i finished this one. Unbelievable how much knowledge i got, not only in rust, but in backend best practices in general, and how robust is the basis provided by the code of this lesson, along with the rust axum course, and the follow up episote 2 (Sql builder with modql). The final part with declarative macros was a grand finale, since i had never built something usefull with macros, and finally saw a simple and useful application, that i can replicate to other situations. I feel like getting up and giving a round of applause. Thanks a lot for that. I will use the base i constructed so far from your code to build a production web service in an ongoing project.
@JeremyChone4 ай бұрын
Awesome! Thanks for taking the time to share your experience.
@TN19N8 ай бұрын
This captures the best practices for coding the backend, applicable to all languages, not just Rust. Thanks a lot!
@engdoretto Жыл бұрын
The best rust channel with hands-on tutorials! Thank you!!!
@user-rl5mz5cg3w3 ай бұрын
I paid a year's membership to show appreciation for such great work. I hope viewers will not just spread the word but also chip in to show their support.
@JeremyChone3 ай бұрын
Thank you so much for your support and comment. More cool stuff is coming...
@herrbanane11 ай бұрын
You can really feel the passion and the amount of dedication that went into this. Very unique here on KZbin. I hope you'll continue to be able to produce high quality content like this full time. ❤
@mishadaley Жыл бұрын
Hello Jeremy, (French here) Thank you very much for the quality of your videos on Rust, especially this one! They are very structured; all the explanations are clear yet comprehensive; and even though the project seems simple at first sight, you managed to provide us with so many concepts and best practices. That’s really a masterpiece of a job! All the best for your future videos ;)
@JeremyChone Жыл бұрын
Thank you for the very nice feedback.
@kameikojirou Жыл бұрын
This is Fantastic! Thank you so much for all you do for the Rust Community!
@ruggerorebellato11 ай бұрын
I never comment on KZbin, this is a masterpiece, thank you, you made the difference.
@ItaloMaiaTM8 ай бұрын
Loved the unit-test approach discussion. The different approaches to unit-test are not discussed enough. It is good to see some light being shed into it.
@iwansyahp11 ай бұрын
thank you, learnt alot from you! I love the way you teach, easy to follow. did not expect I can finish in a session.
@JeremyChone11 ай бұрын
Impressive that you finished in one session.
@chaqua1559 Жыл бұрын
I LOVE your videos. Even tho Rust is the hardest language I learned yet, it still is way to interesting to give up, and your videos are helping A LOT.
@sinaebr7337 Жыл бұрын
i marked previous episode to see after my current job done. it will be done in about three weeks and I will have 5 hours of wonderful videos to enjoy and learn thanks ❤
@prashlovessamosa Жыл бұрын
Good to see you back thanks for Rusty teachings.
@AIExEy6 ай бұрын
Most underrated rust creator
@TheBabooner5 ай бұрын
This is a whole new level of excellence. Merci!
@maxali6591 Жыл бұрын
Elles sont excellentes tes vidéos merci de pousser autant la technicité. Prend ton temps, ce contenu est excellent !
@nomadperson4619 Жыл бұрын
great course. We are lucky to have people like you and johnhoo :)
@hnazmul9 ай бұрын
Wow.. Very happy to see your reguler Rust video... We are so lucky that we got you.
@pablovigliero127511 ай бұрын
This is awesome man! Pure gold content. Thanks for all the effort you've put making the app, explaining what you´re doing and editing the video!
@ItaloMaiaTM9 ай бұрын
Wow, this is massive! Time to dive into rust once more.
@jdery9911 ай бұрын
Thank you a lot for the videos and your contribution to the Rust community as a whole. Small suggestions: - "thiserror" crate instead of implementing the Error boilerplate - "clap" crate for the configuration part
@Rustby Жыл бұрын
Thank you so much Jeremy! Awesome video as always 🎉
@zaafhachemrachid1701 Жыл бұрын
You back ❤🎉🎉🎉
@HagbardCelineOnRust11 ай бұрын
Hi Jeremy. It is so nice to see another of your courses. Hopefully i will find the time soon to follow you. lf 2 it. keep up the good work
@LinuxForLife Жыл бұрын
Nice! Eager to code along to improve my knowledge. Thank you!
@AchwaqKhalid Жыл бұрын
The way this was explained.... WoW 👏👏👏👏👏👏
@irlshrek Жыл бұрын
So excited!! Can't wait to work though this!
@jorgeosorio1613 Жыл бұрын
thanks a lot jeremy for all you do man.
@kaporos Жыл бұрын
Hey ! Thanks for this amazing vid ! I just didn't understand why you want to make a distinction between ModelManager and ModelControler
@JeremyChone Жыл бұрын
Great question. Here is a first pass at the answer. I also added this as the first FAQ question. Decoupling the construct that performs the task (i.e., ModelController) from the one that provides the resources (i.e., ModelManager) has the following benefits: 1. Keeps the ModelController design and requirements more focused on its function, which is to perform data changes. 2. Keeping the ModelController construct stateless greatly simplifies "specialization" implementation (see `model::base`). 3. Allows the management of the resources (typically in App State) to evolve separately while minimizing impact on the model controller (and vice versa). In short, this separation of concerns allows both parts to stay more focused on their respective functions and to evolve separately while minimizing how they affect each other. As the application's needs grow, these patterns can evolve, and further separation of concerns may be needed. However, this is a good base to start with, balancing simplicity and future code scalability. Congrats, you are the first in the FAQ: awesomeapp.dev/rust-web-app/#why-distinguish-between-the-modelmanager-and-modelcontroller
@JeremyChone Жыл бұрын
Btw, I just updated the answer in the FAQ with the text below. And also, I am planning to do a quick video to go over those points. Let me know if you have an handle (youtube, x, github) you want me to use to refer you (as you want). Thanks again for this great question. I hope it is getting answered: === Anwser - The short answer is because it makes each component much simpler and more focused on executing its core function. - For example, now the ModelControllers do not need any states, and therefore, their design becomes simpler as they are merely a set of functions with some common contracts. - We do not have to worry about ModelControllers' instantiation, ownership, lifetime, or anything of this nature in our design. - So, we know that everything that would be state-related will be passed as an argument in a consistent manner. - And in fact, that goes for the Ctx as well, - And that simplicity allowed us to design the base shared CRUD implementation just as a set of static functions. - Conversely, the ModelManager now can just focus on holding and managing the appropriate resources that might be needed by the various - ModelControllers, irrespective of the specific operations. - Right now, it is a very simple implementation, but it will become richer when we add more client types and database transaction support.
@kaporos Жыл бұрын
@@JeremyChone wow ! I wasn't expecting such a good response ! it was pretty clear, thank you ! (and you can call me simply kaporos, but you dont have to ahah)
@JeremyChone Жыл бұрын
@@kaporos I am making a video about this question. It came up couple of times, and it is an important point.
@DerMigi11 ай бұрын
Fantastic video! So glad that I found you since I am learning rust and do not have that much web/server experience. Found a lot of things that I can improve in my axum server. Keep it up, instantly subscribed!
@KNTH01 Жыл бұрын
Thanks for making these videos!
@lostsocket Жыл бұрын
Incredible quality! 1000000000000000000000000000000000000000000000 thanks for sharing this knowledge!!
@sunhsiang664411 ай бұрын
The best video of AXUM !
@selvarajs.74946 ай бұрын
comprehensive and high quality content.
@cheebadigga40927 ай бұрын
Thank you so so so much for these videos! Helps a lot with architecture stuff!!
@dani5318 Жыл бұрын
Love your videos, so good.
@riigel Жыл бұрын
GREAT!! 🎉🎉🎉
@FelipeSilva-ok7uz11 ай бұрын
Jeremy, another idea for this series would be implementing more Managers, services, etc, outside of ModelManager. Something like remote apis, because sometimes we need an external service request. I'm building a backend in RUST with JSONRPC using your architecture and I'm struggling with how to struct differents managers and how to handle it inside my Rpc methods. I know that with Axum we usually build an AppState that stores everything and pass it to our routes, but as we only have "one" route ("/rpc"), but different methods (task_create, task_update, etc), not always we'ill use everything the AppState provides. For example, let's suppose that `method_a` uses XManager, `method_b` only uses YManager and `method_c` uses both of them. With a linear search it can be managed very well, but the problem comes when you try to implement a registration to the rpc methods. I think that will show very well the use of traits, generics, futures handling, project structures, etc. Thanks for the videos!
@JeremyChone11 ай бұрын
This is an interesting topic, and I would love to have a discussion with you about it. If you have time, I would love to chat about this in our Discord: discord.gg/XuKWrNGKpC In short, yes, the application blueprint will eventually have multiple clients inside the ModelManager, but I am not sure we need multiple of them. However, I am definitely interested in discussing the pros and cons.
@stephenbluck269811 ай бұрын
Great video! Looking forward to the next one.
@Tszyu0111 ай бұрын
Your videos and explanations are amazing. It would be really great to see integrations when it comes to auth for this example with real world providers developers use like auth0, azure or other oauth providers.
@JeremyChone11 ай бұрын
Yes, in a future episode we will talk OAuth, probably with Google and/or GitHub as an example.
@NeotenicApe11 ай бұрын
Incredible, every time ❤
@suhrobmalikov Жыл бұрын
this is what I need. thank you
@renbrek Жыл бұрын
awesome!
@alexandruolaru78559 ай бұрын
That's an awesome course, and I even finished it, took me a couple of weeks with pauses and typing myself the code, but have a couple of questions: 1. Why for token you decided to implement from scratch as JWT has pretty much the same structure, goal and it's already an industry standard? 2. Why no diesel for migrations ? 3. JSON-RPC seems a fun way to go but is there content on how to create a graph-ql transport for the same BMC's ? Thank you again for your invaluable input and making us greater engineers! Some maybe suggestions for the structure: I had troubles to navigate forward and backward in the video as each mouse click will be pretty much 5-10 minutes of content.
@JeremyChone9 ай бұрын
Those are good questions. I wanted to write the longer answer, but here is a relatively short one: 1) Secure Web Token vs. JWT: In our case, we assume the token is designed for interpretation solely by our system. Different services may exist, but they all belong to the same organization. Hence, we don't need to disclose the algorithm used, as sharing less is preferable. The design also aims to decouple Authorization from Authentication. The token is used to verify identity, but roles, privileges, and other aspects are better managed by an independent API and re-evaluated at the time of request. Roles/Privileges should be transactional, with tokens remaining valid longer than the period suitable for checking roles/privileges. Therefore, roles in JWT are more cosmetic than security-based. In distributed systems where we don't own all the systems, JWT might be acceptable, though many don't share keys. However, one shouldn't fully trust the roles defined in JWT. At its simplest and most secure, a token comprises three essential parts: - The identifier (e.g., username or user UUID), - The expiration time, - The signature, created with minimal information sharing. In summary, while JWT may be useful in a distributed context, in a multi-service system we own, adopting a minimalistic approach with less information sharing reduces the attack surface and enforces transactional access control. 2) Diesel for Migration: Our approach here differs. For large apps, 'Migration' or 'Evolution' (as we prefer to call it) is better managed as a sidecar service, rather than at the web-app level through the Database Driver or ORM. If our ORM or SQLX manages migration within our app code, we must determine which container instance is responsible. Only one instance should update the database schema. This indicates that the web server, typically scaling horizontally, should not be responsible for schema updates. This task is more suitably handled in a sidecar, a dedicated pod/container, and thus does not need to be integrated into the ORM, SQL Builder, or lower-level database drivers like SQL. 3) JSON-RPC & QL: Refer to Episode 02 (kzbin.info/www/bejne/Y5WweWyLntx-p8k) which discusses SEA-QUERY and MODQL for advanced JSON-based queries (JSON IN and JSON OUT). More exciting developments are forthcoming. You can also view a quick spec I developed on joql.org to see upcoming features (included in the specifications). Hope this makes sense. Our philosophy is not about reusing as many wheels as possible, but rather about using the right ones. Happy coding.
@alexandruolaru78559 ай бұрын
@@JeremyChone thank you for the extended answer
@emanueley84108 ай бұрын
@@JeremyChone Wow, and that was the "short! answer :D 1) Very nice insight on the Secure Web Tokens vs JWT. 2) I'm looking forward to learn how you handle migrations/evolutions in a sidecar service Going through the comment section of your videos to find these answers is definetly worth it!
@mhemaungthuwin79165 ай бұрын
This is what I am looking for dude. Thanks a lot.
@patatasdelpapa10 ай бұрын
Some thoughs of mine while doing the course. - I had a much nicer experience using tokio's Semaphore to synchronize test than serial_test. - Because I didn't read the description I used sqlx 0.7 and my test failed so I removed the static pool and instead made a new pool with 1 connection for each test then passing that pool to the ModelManager and continuing the tests as normal. I'm currently in E01-C05 - Model 1/2 - Task CRUD so I expect to make some other changes but otherwise pretty good tutorial so far.
@JeremyChone10 ай бұрын
Thanks for the feedback. On the latest main branch, I put the fix/workaround for SQLx 0.7, which is to set max_connections = 1 for testing. It's not ideal, but it works until they fix the issue. Latest main branch: github.com/rust10x/rust-web-app Also, feel free to join the Discord. Discord: discord.gg/XuKWrNGKpC I am working on episode e02, where we've moved to sea-query and more modql. Work is still underway, but it's the next level and will be the prep for the second episode. Serial testing is required due to the brute-force database reset approach. It could be removed with some work. When to undertake that work depends on preferences/priorities. But it's potentially valid to do in some cases.
@emvdl Жыл бұрын
Thanks, well done Jeremy 👍🙌
@tony-go-code10 ай бұрын
Wow! This is great, thank you, like Rust, like your tutorial.
@user-tw3do4xk3f11 ай бұрын
I learned a lot from your video!非常感谢!我要试着写一遍代码了!
@SamirMamude7 ай бұрын
Amazing tutorial! Thank you very much!
@b1chler Жыл бұрын
Really cool! ❤
@RoughlyUnderstood11 ай бұрын
This is such an amazing resource! I am new to “production” API architecture and I was just wondering where I can read more about this particular architecture? (Web, context, event, model etc). Or if you have any resources for other API architectures you like. Keep up the absolutely spectacular work
@shanecole401 Жыл бұрын
Great video- learned a lot
@blainewordly913411 ай бұрын
Fantastic ❤
Жыл бұрын
WHAAAAT?! THANK YOU!!
@PublicAccount010 ай бұрын
well played, started to watch.
@jaredthanemartin7 ай бұрын
Wonderful video. Thanks
@kashnigahbaruda9 ай бұрын
Legend
@mottosson11 ай бұрын
Will you make a video about deploying Rust applications as well? That would be great as a last part to this series.
@JeremyChone11 ай бұрын
Yes, this is the plan. It will come a little bit later as this will be done via Kubernetes and will have multi service support.
@mottosson11 ай бұрын
Amazing! Thanks a lot!
@haoy809 ай бұрын
Thank you so much for creating this video! It seems that every function in the model controller using "ctx", and "mm " as first two arguments. Why don't we create a model controller struct {ctx, mm} and implement these functions as "methods".
@JeremyChone9 ай бұрын
Okay, this is a very good question, and usually, when we encounter repetitive patterns like this, they are good candidates for consolidation. First, let's clarify what each element is: `ctx` - This is designed to be the request/command context containing user information. Eventually, it will include on-demand PBAC (Privilege-Based Access Control) and other per-command contexts. The aim is to decouple it from the web layer, which will become more apparent in future episodes when we separate the web layer and the core layer (model, ctx, etc.) into their own sub-crate. `ModelManager` - This serves as the "model app state," where we have various clients (DBCon, S3Client, etc.) to communicate with different services. Since all BMC functions take both arguments, we might consider putting them into a single container construct to combine them. However, their responsibilities and usages are different, so the container construct would not have methods specific to sub-elements, allowing us to maintain the separation of concerns. This is why, for the time being, I have kept them separate. Other approaches are also valid as long as they provide a coherent narrative and stand the test of time.
@nikolatotev Жыл бұрын
Fantastic video extremely nice to see some production level coding! I have some quest ions about the IDE setup, how do you do the //region bits together and how do you setup those snippets you use?
@JeremyChone Жыл бұрын
It's just a code snippet that I bind to ctrl+c. Go to configure snippet for rust language `User/snippets/rust.json` "comment-section": { "prefix": "cc", "body": [ "// region: --- ${1:Section}", "${2}$TM_SELECTED_TEXT", "// endregion: --- ${1:Section}" ], "description": "Comment Section" }, keybinding `User/bindings.json` { "key": "ctrl+c", "command": "editor.action.insertSnippet", "when": "editorTextFocus", "args": { "name": "comment-section" } },
@nikolatotev Жыл бұрын
@@JeremyChoneAha! very nice I'll try it out! I'm currently following along with the video to make this project myself and this will be helpful. I really like the insights when it comes to architecture design of a web app.
@victorgxnАй бұрын
More axum content
@undefined2410 ай бұрын
Thank you so much sir
@aimericsorindev25311 ай бұрын
Really nice video ! I really like all the explaination on why we do things like these instead of another manner. I started to improve the project on my side so that i will compare with your solution on the next videos, i started with tracing and exposing metrics for prometheus. I juste have a questions about the model layer. I am not a big fan of ORM but for nested entities I didn't found good implementations to do it with sqlx. What are you thoutgh on that, do you have any ressources that could help me ?
@JeremyChone11 ай бұрын
Sorry for the late answer. Yes, eventually I am going to show how to do nested/join (like project/task relationship). You would do join. For now, you will have to use raw sqlx, since sqlb does not support join yet.
@FelipeSilva-ok7uz11 ай бұрын
Great video Jeremy. About the JSONRPC, you did a linear search approach. What about a project with alot of namespaces and methods? What's the best way to handle every possible method?
@JeremyChone11 ай бұрын
Good question, and it is something I plan to address in the future. In the meantime, here are a few points to consider: 1) For a small number of API methods, say between 10 and 20, the current approach should suffice. After all, we would need a routing table regardless of the method adopted. Whether we are using macro rules or another strategy, it should work well. 2) As the number increases, it might become necessary to create sub-web modules, each responsible for registering their respective APIs. I envision adopting a builder/plugin approach somewhat akin to the "router" strategy utilized by Axum. 3) Firs I would explore the potential of leveraging the Tower service model to aid in this process. While I am cautious not to unnecessarily complicate the system just to "reuse a wheel," the Tower model might prove to be a good fit. I will investigate this at a later stage. 4) Some time ago, I created a video on constructing an Async Router ([watch here](kzbin.info/www/bejne/r6DFpH-qqLKDgpo)). This might serve as a foundation if the Tower lib is not a fit. The goal prioritizes maintaining simplicity in the system, avoiding overly intricate solutions and focusing on meeting immediate needs. Currently, all RPC handlers can be normalized, as demonstrated, incorporating elements such as context (ctx), multimedia messaging (mm), and parameters (params), which simplifies the system considerably. While I do plan to develop such a design in the future, the existing design is scalable to around 20 methods. Beyond this point, the details become specific to web:rpc implementations, thereby having minimal impact on the rest of the code. I hope this provides some insight into your question.
@diehenne Жыл бұрын
❤❤❤❤
@KokoKoko-hz9cd6 ай бұрын
❤
@lame_lexem11 ай бұрын
1:36:45 in this chapter you use sqlb crate to build sql queries, why not use something like diesel or sea-orm for this ? what downsides to using orm instead of direct sql queries? great series btw, very nice video.
@JeremyChone11 ай бұрын
Ok, this is a great question. I plan to create a page on rust10x.com and/or a video to discuss the pros and cons of each approach and explain why we prefer the SQL (e.g., SQL builder) route. In the meantime, here are a few points: - Firstly, the Model layer code is designed to decouple implementation details from the rest of the application code. - Therefore, while the Model layer can utilize an ORM (e.g., Diesel) or a more SQL-centric approach (e.g., sqlx / SQLB), the remainder of the app's code shouldn't need to be aware of these specifics. - We have extensive experience with ORM, going back to our time working with Java, using Hibernate and familiarizing ourselves with JPA in general. - However, even during our Java days, we gravitated towards a more SQL/SQLBuilder approach, akin to JOOQ. - ORMs can simplify the initial stages but may become overly complex as development progresses. - They tend to lock language data structures (like Java classes or Rust Structs) to their respective tables, requiring meticulous attention to ensure perfect alignment between the two. - Although this approach might seem attractive initially, we found that it does not scale well for larger applications (with 200k to 500k LOC). - The intertwining of language types and database table structures and relationships can become a source of complications, causing issues for both elements. - Taking the time to understand SQL deeply and learning how to effectively query data for specific functionalities greatly simplified our system, despite the additional SQL knowledge it required. - We reduced many instances of O(n²) and O(n) complexity to O(1). This improvement was not so much a reflection on the flaws of ORMs but a benefit of abandoning a one-size-fits-all approach, enabling us to optimize our query and data assembly processes. - Indeed, working with raw SQL can also have its own set of problems; it is error-prone and can be tedious, especially when ensuring the use of prepared statements and maintaining track of argument IDs. Moreover, the necessity for order in SQL does not lend itself to composability. - This is where SQL builders, akin to knex.js in Node.js and JOOQ in Java, come into play, offering great composability benefits while staying true to the relational model. - It's crucial to note that the design blueprints at rust10x (encompassing rust-web-app, this one, and the rust desktop app - formerly known as AwesomeApp) are built with a model layer design. This means the choices made here are layer implementation details and should not affect the rest of the code base. - It is a fundamental rule that anyone wishing to read or write to any store should do so through the model layer. - Therefore, developers can utilize this blueprint and employ tools like SeaORM or Diesel without encountering many hiccups. So, in short, I believe that staying closer to the respective stores, be it a database, S3, or Redis, offers better scalability. Moreover, a good scalable design, irrespective of the approach chosen, involves establishing the right application abstraction layer (e.g., the model layer) from the outset. I hope I have somewhat answered your question. I plan to delve deeper into this subject in the future. It's important to note that the blueprint supports both approaches. I personally prefer the one that I believe scales better for our style, but other styles are completely fine too.
@junwu2211 ай бұрын
@@JeremyChone Thank you very much for your time by giving so much detail and examples!
@gabrielcournelle30555 ай бұрын
Hi Jeremy, Thanks a lot for this great in depth tutorial. I learnt a lot. I have a question regarding middlewares. In mw_ctx_resolve, we only modify the request. Could we have used map_request_with_state instead of from_fn_with_state? If yes, what is the best practice? Is it better to chain middleware with from_fn or can we also chain the map_request/map_response middlewares?
@JeremyChone5 ай бұрын
The code design approach allows for `Ctx` to be "injectable" into any Axum middleware or handler functions, enabling them to extract information or, eventually, add information to it. Since `Ctx` is designed to be per request, the appropriate Axum construct to use is Request Extractors. States are suitable for application-wide resources, such as the ModelManager (e.g., with some type of database client), and similar components. I hope this answers your question.
@jimitsoni188 ай бұрын
Hello Jeremy, i am facing an issue where some of my Task crud test randomly fail with PoolTimedOut error. which task fail is also random, and it is rare but there are also times where everything works perfectly, can you please help me with this issue?
@JeremyChone8 ай бұрын
Yes, something changed in sqlx 0.7 that causes this issue when running tests. The trick is to set the DBPool connection maximum to 1 for testing. If you check the latest main repository, take a look at the lib-core crates. When we create the SQLx client, there's a cfg test that sets the maximum to 1. It's not the most elegant solution, but it works and has no impact on production.
@jimitsoni188 ай бұрын
@@JeremyChone hello Jeremy, thanks for replying so quickly, you are a blessing, truly
@johnwilliams7999 Жыл бұрын
i havent watched this yet but i struggle with axum with the in memory database and setting up a real database stuff. Hopefully you cover that in the videeo
@JeremyChone Жыл бұрын
Oh, this video features a real Model layer that interacts with PostgreSQL. The Rust Axum Full Course serves as a mock store designed to teach the mechanics of Axum. So, I believe this video should answer your question. Please let me know if it doesn't.
@algo-zq1vu4 ай бұрын
I'm running into problems in E01-C04 - DB Live Reload - when running the docker container (works) and starting up the app, the SQL statements get executed locally rather than in the docker container (very new to this, sorry if I'm using terminology wrong). This means, I can see the newly (re)created database + tables when checking into psql locally, but when executing psql in the docker container, there are no changes (just the default users/dbs). If anyone can help with this, greatly appreciated. Spent a whole day just figuring out what's not working properly, ay!
@jimitsoni188 ай бұрын
Hello Jeremy, I am facing I am trying to follow this tutorial and I am doing everything as explained, but I am not getting the tracing logs on my stdout, can you please tell me why
@JeremyChone8 ай бұрын
Make sure that in your `.cargo/config.toml` you have the right crate names in the RUST_LOG environment variable. See: github.com/rust10x/rust-web-app/blob/main/.cargo/config.toml
@jimitsoni188 ай бұрын
@@JeremyChone thank you!
@gertrudessampaio86899 ай бұрын
Which vscode extension do you use for code snippets ?
@JeremyChone8 ай бұрын
I finally took some time to create the Rust10x VSCode Extension and a webpage with information about my VSCode setup. Everything can be found here: rust10x.com/vscode
@ronilbiswas5 ай бұрын
Where can I find the starter code for this session? (Refactored code from previous video: axum full course)
@JeremyChone5 ай бұрын
It's in the github as ". initial" It's mostly the Rust Axum Full course a little bit preped .
@ronilbiswas5 ай бұрын
@@JeremyChone thank you
@ivandardi Жыл бұрын
Do you earn any money from these courses or is this truly altruistic?
@JeremyChone Жыл бұрын
Good question. My aim is to strike a balance by offering high-quality content for free on KZbin, while also planning to build a unique learning experience on awesomeapp.dev for production coding (currently just a very simple static website). For now, I have a Patreon page (patreon.com/jeremychone), where any_help == big_help. I've been running my business focused on building Big Apps with Small Teams for some time, and I'm taking a shot at pivoting to share this expertise with a wider audience, rather than just a select group of clients. Only time will tell if this approach will be successful, but if it is, more happy coding!
@irlshrek Жыл бұрын
in my opinion, he should try to make money so that we can get more of these videos!
@stevenkovacs31132 ай бұрын
Which font do you use?
@JeremyChone2 ай бұрын
I think “menlo” for vscode, and “lato” for video text.
@abnerlee19108 ай бұрын
Hello, may I ask how to design if I want to transfer database transaction objects from the logic layer to the model layer?
@JeremyChone8 ай бұрын
Hi, what do you mean by logic layer ?
@abnerlee19108 ай бұрын
@@JeremyChone I hope that the database transaction can be started when the model method is called in the business logic code. The logic layer here refers to the place where the business logic code is written
@abnerlee19108 ай бұрын
@@JeremyChone Assuming that I have an interface for placing orders, which involves modifying multiple tables (order, order_detail, user, wallet, points, goods, etc.), I need to initiate database transactions to ensure data consistency. Currently, the framework does not involve database transactions. I hope to see this section as soon as possible. Thank you very much.
@JeremyChone8 ай бұрын
I am currently undertaking a major upgrade for seamless transaction support. Essentially, the design remains the same, but now you use `mm.dbx()` to execute SQLx commands. Then, you can initiate a connection with `mm.dbx().begin_txn()`, and any subsequent use of `mm.dbx()` for SQL will be within this transaction. This should be quite exciting. Keep an eye on the repository; a big update is coming soon. I'll try to make a video about it. For more information, feel free to join the Discord:
@abnerlee19107 ай бұрын
@@JeremyChone Wow, I'm really looking forward to it
@zrustacean9 ай бұрын
What's extension that you used to generate code?
@JeremyChone9 ай бұрын
just vscode snippets. Here are some: rust10x.com/vscode
@JeremyChone8 ай бұрын
Btw, I finally took some time to create the Rust10x VSCode Extension and a webpage with information about my VSCode setup. Everything can be found here: rust10x.com/vscode
@phinguyen73815 ай бұрын
hey sir, can u share the rust snippets for vscode, thanks
@JeremyChone5 ай бұрын
Here is the little extension I made. rust10x.com/vscode If you go to the extension install page, you can click on respository to see the github source.
@phinguyen73815 ай бұрын
@@JeremyChone thank you, sir
@surajmandal_56711 ай бұрын
Why rust is so difficult 😢.
@ryz17710 ай бұрын
This is awesome! I hope you can do another one of these but instead for a popular web app cloned in Axum like Reddit, Spotify, KZbin, or Twitter! Thanks for these lessons!
@JeremyChone10 ай бұрын
Ho, interesting, building a Spotify or Reddit clone you mean? That could be interesting once I finished the blueprint. Still many episodes to come to make it full production.
@ryz17710 ай бұрын
@@JeremyChone Yes! It's what React/ Next usually have as an advantage, as there are lots of tutorials like that which interest people. This might be a chance to bring in more people to the Rust community and maybe make the contribution to this space a lot faster than ever. Again, thanks for these kinds of tutorials, its badass great!
@JeremyChone10 ай бұрын
@@ryz177 Cool, I've considered creating new upcoming startup ideas, but just cloning existing apps could be great. The Rust10x web-app will be well-structured for that purpose. Thanks for the feedback!
@MiddlewАй бұрын
Hi great course so far, I am doing what you are doing in the course, however when I run: $ cargo test model::task::tests at 1:18:15 when my code refuses to run all the tests at the same time (both manually and cargo-watch) unless I restrict the number connections to max_connections(1) in new_db_pool() in store/mod dot rs. If I dont there is a very high likehood (>95 percent) that one of the tests fails due to Error: Sqlx(PoolTimedOut). The order of the tests does not matter (random fails each time, sometimes two fail) with the console just handing until it gives the error. No error shows up when I run them after each other, not in vscode or calling them seperately line by line. Any ideas what could be wrong? Removing #[serial] from each test did not work, and instead makes it so the code gives other errors. I have tried changing back version from the latest to the version in the video but no luck.
@MiddlewАй бұрын
Found you answer in these comments. Thanks anyways. Good to know it wasn't on my end and I figured out the solution on my own 😅
@JeremyChoneАй бұрын
Yes, this was something introduced with Sqlx 0.7. I set the max connection to 1 during testing to make it work. I think it's a decent workaround. Not sure why Sqlx hasn't fixed this issue, but it likely only happens in test mode.