- Видео 67
- Просмотров 334 627
Marco Lenzo
Мальта
Добавлен 30 сен 2011
Welcome to my channel!
In here you can find content about anything Software Development, Architecture, DevOps, and Leadership.
I am Marco and I am the Lead Architect and Platform Owner for an Infrastructure as a Service (IaaS) provider. I have been coding and loving everything related to software for 25 years.
My goal is to share all my experience with you!
Feel free to connect with me if you need help or want to collaborate on something. Links below. 👇👇👇
In here you can find content about anything Software Development, Architecture, DevOps, and Leadership.
I am Marco and I am the Lead Architect and Platform Owner for an Infrastructure as a Service (IaaS) provider. I have been coding and loving everything related to software for 25 years.
My goal is to share all my experience with you!
Feel free to connect with me if you need help or want to collaborate on something. Links below. 👇👇👇
Kubernetes Essential Course: Docker Basics Lab
Thank you for watching and supporting the Kubernetes Essentials Course! Your engagement means a lot to me. To ensure that creating new episodes is worthwhile, I’ve set a goal:
*New videos in this course will only be published if each episode reaches at least 1,000 views.*
In the meantime, I’m planning to create this course on a proper education platform to provide a more comprehensive and structured learning experience.
If you find this content valuable, please share it with your peers, colleagues, and communities to help spread the word. Thank you for your understanding and support 🙏
---
*Master Docker Basics | Docker Installation, First Container, and Lifecycle Management*
🚀 *Welcome to the ...
*New videos in this course will only be published if each episode reaches at least 1,000 views.*
In the meantime, I’m planning to create this course on a proper education platform to provide a more comprehensive and structured learning experience.
If you find this content valuable, please share it with your peers, colleagues, and communities to help spread the word. Thank you for your understanding and support 🙏
---
*Master Docker Basics | Docker Installation, First Container, and Lifecycle Management*
🚀 *Welcome to the ...
Просмотров: 408
Видео
Kubernetes Essentials Course: VMs vs Containers | Solving Deployment Challenges
Просмотров 28921 день назад
Thank you for watching and supporting the Kubernetes Essentials Course! Your engagement means a lot to me. To ensure that creating new episodes is worthwhile, I’ve set a goal: *New videos in this course will only be published if each episode reaches at least 1,000 views.* In the meantime, I’m planning to create this course on a proper education platform to provide a more comprehensive and struc...
Kubernetes Essentials Course: Introduction
Просмотров 24928 дней назад
Thank you for watching and supporting the Kubernetes Essentials Course! Your engagement means a lot to me. To ensure that creating new episodes is worthwhile, I’ve set a goal: *New videos in this course will only be published if each episode reaches at least 1,000 views.* In the meantime, I’m planning to create this course on a proper education platform to provide a more comprehensive and struc...
How a Kubernetes Service with No Selector Simplified My Workflow
Просмотров 400Месяц назад
In this tutorial I’ll show how you can leverage Kubernetes to manage certificates for applications running outside a Kubernetes Cluster like a webserver on a VM. 🌍 *Blog and Newsletter with other tutorials and articles* 🌏 marcolenzo.eu 🤝 Connect with me: 🤝 www.linkedin.com/in/marcolenzo/ 0:00 Why using Kubernetes to manage certificates for applications outside a Kubernetes cluster? 2:13 How can...
Inversion of Control: The hidden SECRET to Clean Architecture
Просмотров 8812 месяца назад
In this video, I explain the Inversion of Control (IoC) principle, a crucial concept in object-oriented programming that underpins popular software architectures like Onion, Hexagonal, and Clean Architecture. Learn how IoC is implemented in the Spring Framework, specifically through Dependency Injection and Spring’s IoC Container, including the BeanFactory and ApplicationContext. Discover how S...
Kubernetes Architecture Explained | How It Works and Why It’s so Popular
Просмотров 3332 месяца назад
This video breaks down the Kubernetes architecture and dives into what makes it the top choice in the cloud-native ecosystem. From understanding Kubernetes as an open-source tool that simplifies application deployment, scaling, and management to exploring its success factors-features, control loops, and extensibility-you’ll get a clear overview. Learn how Kubernetes operates like a thermostat, ...
5 Tips for Using ChatGPT in Domain-Driven Design
Просмотров 4672 месяца назад
Did you know that ChatGPT can create a domain model in few minutes? I've been using ChatGPT while working with Domain-driven Design (DDD) for several months. In the last month, I also compared extensively its 4o model vs the new o1-preview. Over time, I learnt some tricks that will guide the AI into producing more accurate domain diagrams. Let me share with you 5 tips to improve your domain-dri...
Entities vs Value Objects: Which one is BETTER?
Просмотров 8945 месяцев назад
In this video, we explore in detail the differences between Entities and Value Objects (VOs) in the context of domain-driven design (DDD). At the end of the video, we also see with concrete code example why we should prefer one over the other whenever possible. 📅 *Let's have a 1:1 Call to discuss anything you wish* 📅 topmate.io/marcolenzo 🤓 *You find much more on my website! 🤓 marcolenzo.eu 🤝 C...
Spring Boot and GraalVM Native Images: A Match Made in Heaven?
Просмотров 1,1 тыс.5 месяцев назад
Are Spring Boot and GraalVM Native Images a match made in heaven? Let's find out! In this video, we will compare Just In Time (JIT) and Ahead Of Time (AOT) compilation in Java to understand the advantages and disadvantages of each approach. We will then understand how Spring Boot supports both and finally decide whether they are a good match or not. 📢I offer one free 1 on 1 session to all my vi...
Is the NEW JetBrains AI Assistant BETTER than Copilot? | July 2024 Update
Просмотров 13 тыс.6 месяцев назад
On the first of July, JetBrains announced improved code completion in their AI Assistant, so I subscribed to test it out and save you some time and money. Is it going to be better than Copilot? Let’s discover it in this video! 📢I offer one free 1 on 1 session to all my viewers. (Mentorship / Consultancy on Software Development, Architecture and Leadership) 📢 marcolenzo.eu/services 🤓 *You find m...
Eventual Consistency: How It WORKS and Why It's IMPORTANT
Просмотров 6206 месяцев назад
Eventual consistency is a popular consistency model in distributed systems where availability, scalability and performance are key to the success of the product or company. In this video we will answer these questions: * What is strong consistency? * What challenges does strong consistency create? * What is eventual consistency? * How does eventual consistency solve the challenges we face with ...
The BEST Google Analytics Alternative... without COOKIES!
Просмотров 2397 месяцев назад
If you are a blogger or small business who wants to collect lightweight analytics without compromising on the privacy of your audience, you should switch to Plausible as I just did. Plausible makes it easier to comply with regulations such as GDPR, CCPA, PECR, LGPD because it collects no personal data and uses NO COOKIES. In this video, I will explain you why I did it and what are the necessary...
How I rebuilt Git with DDD and Clean Architecture... it was FUN!
Просмотров 1 тыс.7 месяцев назад
In this video, I will explain how I built a partial replica of a Git client as part of a CodeCrafters challenge. Rather than focusing on definitions and rules I'll describe my thinking process which you can hopefully apply to different scenarios. 🤓 Source code and more details available on my website 🤓 marcolenzo.eu/building-git-with-ddd-and-clean-architecture/ 🤝 Connect with me: 🤝 www.linkedin...
The HIGHEST API Security Risks... (and how to PREVENT them)
Просмотров 2398 месяцев назад
The HIGHEST API Security Risks... (and how to PREVENT them)
The BEST GitHub Copilot ALTERNATIVE... (it's FREE forever)
Просмотров 15 тыс.9 месяцев назад
The BEST GitHub Copilot ALTERNATIVE... (it's FREE forever)
3 Ways your API Authentication is BROKEN... (and how to fix them)
Просмотров 3829 месяцев назад
3 Ways your API Authentication is BROKEN... (and how to fix them)
Architecting Success: The Mindset Journey of a Software Engineer
Просмотров 40710 месяцев назад
Architecting Success: The Mindset Journey of a Software Engineer
The State Design Pattern EXPLAINED with examples (on GitHub repo)
Просмотров 68910 месяцев назад
The State Design Pattern EXPLAINED with examples (on GitHub repo)
The HEXAGONAL Architecture Explained | Ports and Adapters Pattern
Просмотров 7 тыс.10 месяцев назад
The HEXAGONAL Architecture Explained | Ports and Adapters Pattern
Beware of AI Coding Assistants | GitHub Copilot vs JetBrains AI
Просмотров 16 тыс.11 месяцев назад
Beware of AI Coding Assistants | GitHub Copilot vs JetBrains AI
The Clean Architecture EXPLAINED in 9 MINUTES | Clean vs Onion Architecture
Просмотров 7 тыс.11 месяцев назад
The Clean Architecture EXPLAINED in 9 MINUTES | Clean vs Onion Architecture
The Onion Architecture EXPLAINED | Should we use it?
Просмотров 6 тыс.Год назад
The Onion Architecture EXPLAINED | Should we use it?
Domain-Driven Aggregates Explained | Why you should use them
Просмотров 1,2 тыс.Год назад
Domain-Driven Aggregates Explained | Why you should use them
Event Sourcing and CQRS Explained | When should you use them?
Просмотров 6 тыс.Год назад
Event Sourcing and CQRS Explained | When should you use them?
GitOps EXPLAINED in 10 minutes | Is GitOps really a GOOD thing?
Просмотров 505Год назад
GitOps EXPLAINED in 10 minutes | Is GitOps really a GOOD thing?
What is a BFF microservice? | Why do we NEED it?
Просмотров 1,9 тыс.Год назад
What is a BFF microservice? | Why do we NEED it?
The ONLY TWO good reasons for MICROSERVICES
Просмотров 2,4 тыс.Год назад
The ONLY TWO good reasons for MICROSERVICES
OVERLOOKED Challenges of API-Based Microservices Integration
Просмотров 1,1 тыс.Год назад
OVERLOOKED Challenges of API-Based Microservices Integration
The Software Architect Role Explained (by a Lead Architect in IaaS)
Просмотров 16 тыс.Год назад
The Software Architect Role Explained (by a Lead Architect in IaaS)
APIs vs Events in Microservices | Which one is better?
Просмотров 5 тыс.Год назад
APIs vs Events in Microservices | Which one is better?
Hello Good Sir @Marco, This is a brilliant video with very helpful and useful illustration 👍🏾 However, why are you separating Orders, Payments and Shipping ? These all change or are activated for the same reason - i.e. to fulfill an order It makes no sense to separate them into different bounded contexts. This is how one ends up with micro-services (or modules) that are split too much there by creating services that require careful co-ordination between them. This is not to mention the high fan-out that can result from this structure of over-splitting micro-services
Does anyone know of a self hosted alternative to copilot that is free with no restrictions?
I don't think you got the meaning of enterprise rules right. It's not about banking, and insurance polices, lol :p. An entity is application-agnostic. Let's consider the Product entity. It can be used not only by the e-shop application of the company, it can also be used by the Stock control application. Consider the Customer entity. It can be used by the e-shop application, and the Shipping and Labeling application. These classes describe business concepts and methods that are used by many applications, not just the one you developing. These types of classes are the entities. In contrast the use cases contain methods that are used by the one application you are developing. It doesn't make sense to have the Add-to-cart functionality in the shipping and labeling application. It only makes sense to have it in the e-shop application. So such methods will go to use-case classes in the application layer. They can't be re-used by other applications.
so if I understood correctly we write data to event database and query data base simultaneously. So in general we have only one traditional database for reading(query) instead of command database and query database?
lovely course!! will follow the whole course. cant wait for its next videos
Thank you 🙏
🙂👍
Thank you
Why choreography even exists when it seems orchestration is way more better. Are their any application for choreography
Yes, of course. Orchestration is preferable when we are dealing with typical request/response scenarios or well-defined workflows. The higher level of visibility and control it offers comes at the expense of a single point of control, which might fail and could also reduce throughput. On the other hand, choreography shines when we want to model our system as pipelines using a pipe-and-filter architecture. In this approach, we receive an input and let it pass through a series of independent steps, tasks, or filters that can be developed, deployed, and scaled independently. This kind of architecture allows greater decoupling and typically achieves higher throughput because it renounces the central control offered by the orchestrator. Imagine having to build a system for a stock exchange where thousands of orders are coming in simultaneously. If we modeled this system using orchestration, we’d likely create a bottleneck at the orchestrator, where all orders must pass through a central component to be dispatched to the relevant services for tasks like validation, matching, and execution. The orchestrator could quickly become overwhelmed, slowing down the entire system. With choreography, each order can flow naturally through the system. For example: Order Received -> Validation -> Matching -> Execution When an order is placed, it triggers an event that multiple services can react to. In this model, each step is independent, with no central component orchestrating the workflow. Services scale independently based on demand-for instance, validation might require more resources during high trading volumes, while matching remains constant. This approach reduces bottlenecks, improves fault tolerance (since no single component controls the flow), and supports the high throughput required by a stock exchange. Choreography makes sense in such a scenario because it lets the system handle a massive volume of events without relying on a central controller, allowing the system to process orders efficiently and scale flexibly.
Thanks for the video. Unfortunately most of the examples for ports and adapter that I see, are very simple. This is fine to a start with, but when looking deeper I struggle with understanding how to do stuff in a real application. In your example: How would you deal with concurrent accesses to the WithdrawFundsUseCase. If the current balance is 80 EUR and there two concurrent withdrawals of 50 EUR, both read the 80 EUR and want to save with the new balance with 30 EUR. In a system that uses a SQL database and JPA Entities directly you might get an OptimisticLockException or something similar, but in your example it looks like you are completely decoupled from the database transaction. I could imagine, that you keep some Hash or Version number of the old state and send it while saving. But I am really interested in your answer.
This is a great comment! As usual, it's all about trade-offs! I'll just give you my honest opinion. We expect transactionality to be handled by the infrastructural layer or adapter. ACID transactions are a core feature of most database engines, so re-implementing them within our application's core would be redundant. The simplest approach is to add the @Transactional annotation on AccountService.withdrawFunds (which is the concrete implementation of the use case). Some might argue against using a Spring annotation in the core, but this concern seems misplaced to me. The annotation doesn't tie us to a specific transaction manager or database. It just declares that the method's operations should execute within a transaction. As for testing, this approach means that concurrency testing would primarily be handled through integration tests rather than being confined to unit tests within the core layer. Could we avoid using Spring @Transactional in the core? Certainly! We could replicate its behavior or adopt patterns like Unit of Work, two/three-phase commits, or optimistic locks (which are similar to what you described). This would eliminate the Spring dependency, but does the gain justify the complexity? In my view, it doesn't. In a distributed system, you eventually need to rely on the infrastructure to coordinate operations across multiple threads and processes. There's no way round it.
Just came to mind that you could even use the Jakarta @Transactional instead of the Spring one, and still have it being recognized by the framework. docs.spring.io/spring-framework/reference/data-access/transaction/declarative/annotations.html
@@MarcoLenzo Thanks a lot for the comprehensive answer. This makes a lot of sense. I was not aware that using the @Transactional annotation (JTA or Spring) might be an option. I thought that it might be "forbidden" in the core application. And I also was not sure that it would work after mapping from Account JPA Entity to Account Domain Object and back and then updating in the database. This ties your repository adapter implementation to a JTA aware implementation, if you want to handle transactionality. The MongoDB or HashMap implementation would behave differently from the JTA implementation for this concurrent call use case. So you need to know about the restrictions of your adapters for the driven ports, but this always applies (e.g. local file access vs. reading a file from a network). It seems to be another leaky abstraction problem. But as you said, it is a trade-off and probably not worth the effort to remove it.
In my limited experience, APIs were able to solve most of the problems. Async messages are valuable, but seldom their cost pays off. Again, just in my experience in areas that I've worked. It was easier to start simple and add more complex solutions only if necessary.
That's a fair point. Avoiding over-engineering (or complex solutions) is possibly the most important thing when developing software. It helps us deliver more quickly a system that's also easier to operate and extend in the future. Both functional and non-functional requirements typically determine if asynchronicity is really necessary. However, my gut feeling is that if you are fine with two microservices talking over API synchronously, there's a very high chance that those two components could be merged in a single deployable where code is segregated with proper modularization. Obviously, each case is different and there's no right or wrong: just trade offs. :)
This is gold!
Too kind!
Clear explanation. Thanks.
Thank you
I have some doubts about portability of containers. When I have to move a docker container from one host to another, I backup all data from the container, create a new container on the other host and restore the data. Trying to find all the containers files and transfering them to the other host never worked for me. Importing a VWmware VM into Proxmox or Virtualbox is a walk in the park compared to this. I'll hope Kubernetes will solve this, I do like the Idea of containers.
Yeah we'll see it later in the course how we can leverage several implementations of the Container Storage Interface (CSI) to manage our persistence. If you want to read ahead of time, a lightweight solution is Longhorn which is what I use in my home lab. It takes care of creating multiple copies of a volume in different nodes allowing pods (and containers) to be scheduled in any node even if they require persistence. Hope this helps
Die KI Aussprache / Übersetzung ist noch ausbaufähig ...
Yeah, I totally agree. It's a new feature from RUclips and it surely needs refinement!
Thanks, Super video. Although at 18:07 problems started. In the end took your GIT code for python, various errors (with connexion, etc).. but after a few hours worked. :)
Do not hesitate to contact me on my email if you need more support 🙏
no free
Are you sure? I just checked and there's still a free plan
Your content is super rich i wish you could improve the English accent, said with love and feedback ♥️🙏🏻 loved your video a d find it super useful
Hi :) Feedback taken and appreciated! 🙏 I'm doing my best but in the meantime I'm making sure to have all new videos with manually corrected subtitles. I just noticed this video does not have proper subtitles. I'll make sure to update it. I'll also cover other popular videos of mine. Have a great day!
Great video . Thanks for explanation
Thank you 😊
thanks for explaining hexagonal so well!
Thank you 🙏
Guten Abend
Good evening!
Nice explanation
Thanks for liking
pls how can i start my new project using hexagonal architecture in Go or java
Download a sample project. I have one linked in the video description and start from there. There are many more available scaffolds out there. If you're still stuck, contact me over email. You find the contact on my website.
Thank you for the video
Thank you!
atomikos and bitronix are solutions for XA(2pc) and database need support xa, is not alternative of saga. 🤔
Correct. Let me explain why I say the saga is an alternative to a distributed transaction. (Either / or) I say alternative because if you can afford doing distributed transactions, there's less value in adopting a Saga pattern. That said the two approaches could coexist but I see it as a rare scenario.
@@MarcoLenzo yes, in my opinion,nowdays xa is not the first consideration in distributed tx for its poor capacity. in jdbc scenario, other solutations like Seata(AT mode) is better.
@XiaolongLu-j1t Thanks a lot for sharing. I never used Apache Seata. You gave me something new to learn!
Would you write a modern web application without Inversion of Control, i.e. without Spring or similar frameworks?
Great info. Thanks for sharing 🙏
Thank you
Agree!
👍
Agree!
💪
Did you know you can use Kubernetes to implement any declarative API? Let me know if you wish a tutorial on this 🫡
Thank you for the overview and highlighting the issues.
Pleasure
I use codeium but afaik it doesn't work with jetbrains ide
IntelliJ IDEA is my primary IDE and I use Codeium on it. If you prefer JetBrains IDEs, just give it a shot and see how it works for you.
Helpful tips for working with ChatGPT
🙏
It was nice to see what I am already using for free was the tool that you suggest as github copilot alternative :)
Have you ever used ChatGPT for DDD or Software Architecture in general? 🤓
Good day greetings
Have a nice day you too!
gr8 kontent
Thank you 🙏
any Sim City players will appreciate the colour-coding of the layers. Infrastructure = Industrial, Domain = Commercial, Presentation = Residential. Makes sense as the users live in the presentation layer :)
Good one! 😆
This was very clear - thanks!
Thank you!
Robinson Ronald Thompson George Thomas Jose
👋
I use ChatGPT the limited free version. Downside is it hasn't a scope view about your questions. So to get what you want takes a lot of time. The good side it gives great code and overall quality is great.
Perfect video for taking notes. Thank you boss.
Thank you
Cody anyone? I use it VSCode, but It causes all kinds of errors in Intellij. It's not bad though -
I did have a few errors lately. However, they don't seem to affect the IDE negatively. Hopefully, they'll be solved in future updates.
Hi Marco, great video thanks. Im a little bit confused on how manage order Items in order aggregate without expose the item set, how iterate over them, update item quantity (may be a easy method) and mapping to dto? And, what method explotion mean? I appreciate your advice a lot.
Hi, excuse me for the late reply. I'm not sure I understand your problem with the item set. Why don't you want it in the aggregate? It's fine having it there.
Hi! Excuse me for the late reply. Why don't you want the item set in the aggregate? You can have a set or list of VOs in an entity or aggregate.
Great video. Thanks for the precise explanation!!
Thank you!
Thanks for the video. Exactly what I wanted to know and what I suspected.
Glad I could help
The only problem I can see with copilot in Pycharm is that you don’t get the link in the run window when an error has occurred to ask the AI to explain etc. with the Jetbrains AI you do. Unless I’m missing something!
You are correct. JetBrains AI Assistant enjoys a way deeper integration with their IDEs than the competition. This is the reason why I keep testing it. I use JetBrains IDEs and if their assistant was on par with the competition I would happily use it too. Unfortunately my experience has never been extremely positive with their assistant. I'll keep on giving it chances though. More or less I experiment with it every quarter :)
Copilot. And I am satisfied so far.
Yeah I agree.
omg it is working...i cannot imagine it is free to use. Any limitation that i can use it per day?
As far as I know there are no limits when you use their base model. Limitations are on the use of other models like GPT4, etc.
been a week trying to get my head around. this is very simple to understand
Let me know if you are interested in a particular topic and I will do a video on it.
Setters shouldn't be private for RGBColor VO as rule of thumb ??? Creating VO with "new" and "public" constructor? Setter would return a new instance everytime of RGBColor, something is not good....
If you notice, RGBColor is a Java record. In Java records, all fields are (implicitly) final and there are no setters to foster immutability. Give it a try and let me know.
@@MarcoLenzo what is setRed setBlue and setGreen? They r not setters?
Oh now I understand what you are referring to. Those are examples of side-effect free functions. They are not typical setters. Maybe I should have given a different example naming the functions differently to avoid confusion. The idea is that VOs are not data containers with no behavior. It is fine for them to implement functions that act on its state. However, when this happens, we need to enforce immutability, thus we are forced to return new instances. This way there is no risk to change the state of some other object that was holding a reference to the initial VO. You can find this concept explained in the book by Vernon "Implementing DDD" in the chapter dealing with Value Objects. Hope this clarifies it. Excuse me for the poor example. Also search the web for side-effect free functions and you'll find a lot of material. I'll try to cover them in another video.
@@MarcoLenzo yes please, would b great
I tested both and Copilot wins easily.
Agree