Python Microservices Full Course - Event-Driven Architecture with RabbitMQ

  Рет қаралды 90,020

Scalable Scripts

Scalable Scripts

Күн бұрын

👉 Check our website: scalablescripts.com
In this video, we will create a simple Microservices example with Python Django and Python Flask, We learn how to create an Event-Driven Architecture with RabbitMQ. The apps will use Python Pika to send events to the other apps and everything will seem to work as a Monolithic app but is actually a Microservices app.
Source Code: github.com/scalablescripts/py...
00:00:00 Introduction
00:04:05 Django Setup with Docker
00:11:08 Database and Migrations
00:20:17 Django Products CRUD
00:36:29 Flask Setup with Docker
00:50:21 RabbitMQ
00:58:01 Consumer Service
01:02:55 Data Consistency
01:10:37 Finishing the apps
#python #microservices #django #flask

Пікірлер: 53
@cbaxtermusic
@cbaxtermusic 3 жыл бұрын
Great Application, Very easy to follow, and an awesome example of using multiple technologies for a project.
@brucehaskinvt
@brucehaskinvt 3 жыл бұрын
Quality work. Greatly appreciate your efforts.
@arturkabitcher
@arturkabitcher Жыл бұрын
great stuff! keep on going with materials like this one
@saifgaida5872
@saifgaida5872 Жыл бұрын
before even starting you know it's gonna be awsome!! thank you for sharing
@henriquekubenda6063
@henriquekubenda6063 3 жыл бұрын
pretty straightforward, it was even fun to follow, thanks a lot!
@ScalableScripts
@ScalableScripts 3 жыл бұрын
Glad you liked it!
@astrolillo
@astrolillo 3 жыл бұрын
Excellent, no fluff, no idiotic remarks, no yelling, very refreshing, compared to most coding youtube "teachers"
@kamaleshpramanik7645
@kamaleshpramanik7645 2 жыл бұрын
This is an awesome video. Thank you very much Sir.
@ashokavanjare
@ashokavanjare 3 жыл бұрын
Thanks for your videos. Excellent Explaination.
@yeabsiraashenafi3924
@yeabsiraashenafi3924 2 жыл бұрын
Very helpful video, Thanks
@wispawelwis38
@wispawelwis38 Жыл бұрын
this is how you make tutorials, thanks
@Raj0x01
@Raj0x01 2 жыл бұрын
Basically 9:35 volumes of docker-compose work like synced directory with container and host application folder.
@elsofernandes
@elsofernandes 2 жыл бұрын
thanks a lot!
@ScalableScripts
@ScalableScripts 3 жыл бұрын
Reminder that you can combine this video with other videos: React and Python Microservices: kzbin.info/aero/PLlameCF3cMEva65psDFX1y_gN2Tmh704t VueJS and Python Microservices: kzbin.info/aero/PLlameCF3cMEu_67Jy1HzqP97X4rmqr1wR Angular and Python Microservices: kzbin.info/aero/PLlameCF3cMEsKfHvtGOsioMOoS_oFicHr
@shashankgehlot5683
@shashankgehlot5683 Жыл бұрын
thankyou sir.
@davitkvaratskhelia4033
@davitkvaratskhelia4033 Жыл бұрын
Happy 3 years anniversary to this video!
@meoconhoccode
@meoconhoccode 4 ай бұрын
thanks
@natetolbert3671
@natetolbert3671 3 жыл бұрын
What is the point of creating a virtual environment inside a docker container? Seems a bit redundant...
@natetolbert3671
@natetolbert3671 3 жыл бұрын
Regardless, great video.
@zhunisali
@zhunisali 2 жыл бұрын
For vscode it's helpful.
@inspisiavideos8542
@inspisiavideos8542 2 жыл бұрын
Probably a bit redundant. There are many companies that have their own way. Great video though
@futhedude4848
@futhedude4848 Жыл бұрын
recap: this video is about 2 module: "product" and "main" "main" is like a client side where it will list the products and client can give it a "like", this service is by django "product" is like a admin side where admin can do CRUD for the products, this service is by flask the database is basically the same, except for the "like" behavior. this 2 service use rabbitMQ to sync data to each other. Ex: when admin do CRUD for the products in the "product" service, it will create message to sync to the "main" service as well. when client give product a "like", it will create message to sync to the "product" service as well.
@snagendra5415
@snagendra5415 3 жыл бұрын
good work,thanks for posting in youtube .as you said in description it seems monolythic but is not. can you/anyone say at where it is representing microservices.
@TheAremoh
@TheAremoh Жыл бұрын
Thanks for this tutorial. My question is, can I also create the consumer file in the product app of the admin?
@vineethsai1575
@vineethsai1575 2 жыл бұрын
If anyone gets `OSError: mysql_config not found` when installing mysqlclient, Make sure to install this first `sudo apt-get install libmysqlclient-dev` For Linux users.
@HARSHYADAV-wk2zb
@HARSHYADAV-wk2zb 2 жыл бұрын
can the frontend directly interact with the rabbitmq. consider a scenario where there may be lot of api calls that might slow down the server so can we directly update the queue from frontend
@juanandresrodriguezpedreir8922
@juanandresrodriguezpedreir8922 2 жыл бұрын
I´m unable to connect to the database at 14:44. Do I need any docker image configuration not mentioned?
@sanathrao2009
@sanathrao2009 3 жыл бұрын
what are the pre-requisites in terms of tech language to start this video
@abhishektiwari9561
@abhishektiwari9561 3 жыл бұрын
I am unable to edit files in products app after running startapp from container. Please help.
@abhipatel8510
@abhipatel8510 2 жыл бұрын
Docker-compose up giving me docker excption: docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'The system cannot find the file specified.') I have the file but it stills shows this. can anyone help?
@bonfimjustino3455
@bonfimjustino3455 2 жыл бұрын
Very good video, any way to consume messages from rabbitmq in a websocket client?
@3elasm
@3elasm Жыл бұрын
Basically same question here, I’m using a producer class which is inherit of thread to keep the WS alive and every single message i receive on my WS callback is sent to rabbit
@chihabahmed5207
@chihabahmed5207 3 жыл бұрын
Hi there, Do you think its a good idea to have auth service, account service in a microservices or just one of them responsible for login , logout, register, delete account, forgot password etc etc at the moment I have two service, auth and account account is responsible for adding user and other user profile features. the auth is only responsible for issuing token when the user tries to request. so it only has one function at the moment but thinking about this, I realized that I am over doing things, I could include anything to do with user in one service and thats it instead of having account service talking to auth service about a new user added. do you get my point ? what is your input on this ? do you think its a good idea to have auth service and account service or the account service alone should be enough and later I can create a service that will responsible for controlling users settings as an example. so basically what I mean, I should have one service called "account service" and that service is responsible for adding user, login, logout etc etc just like in a monlith app or two services, one responsible for generating token and checking if users is banned, not verified. so for example, if I ban a user , I only need to switch that isBanned to true from the auth. well I could do the same in account service. what do you think a good option to have or both are valid thanks
@jorisjansen2892
@jorisjansen2892 3 жыл бұрын
Hi Chihab, I was wondering if you al ready did some research or finished something in the mean time? I’m thinking about creating multiple different Django application connected to each other, but I can’t find any about this. Thanks!
@chihabahmed5207
@chihabahmed5207 3 жыл бұрын
@@jorisjansen2892 I created a service called Auth and another one called account The account is responsible for all account stuff, profile update, create account, forget password etc etc The Auth is responsible for issuing jwt on login success I went with this choice, although you can merge all of them in one.. As for the lang, j used node js, nats streaming for communication between services like rabbitmq and kubernetes to control all services
@jorisjansen2892
@jorisjansen2892 3 жыл бұрын
@@chihabahmed5207 thanks for the response. Do you check the JWT on every request on the auth microservice before you handle the request?
@chihabahmed5207
@chihabahmed5207 3 жыл бұрын
@@jorisjansen2892 I have actually watched a really nice lecture regarding this but I forgot what it was But basically on you tube check for how to secure microservices or something like that There many security practices you can take into consider At the moment my app is not secure enough So I need to implement refresh token strategy At the moment, share jwt with all services in kubernetes, because kubernetes have a jwt key variable so you can use it in all services. Basically the service would connect via process.env in node js and it will get the jwt key In regards to using it in every request, yes at the moment I am doing that but I need to rewatch that lecture again because it's really helpful. So I can't give an actual answer because I am not done yet
@chihabahmed5207
@chihabahmed5207 3 жыл бұрын
@@jorisjansen2892 sorry for the confusion Basically, at the moment the Auth service gives you token if login pass okay Then j have react native app would store that key, so the next request should be to private or secure endpoint it would send the token in header Since that service has access to jwt secret in kubernetes then it can verify if that token is valid or not This what i have so far Here is lecture kzbin.info/www/bejne/iX3GZJaKod6jra8
@cando_jo
@cando_jo 7 ай бұрын
why did you have to copy requirements.txt first in the Dockerfile? Aren't you copying everything anyways?
@brucebatmanwayne8514
@brucebatmanwayne8514 Жыл бұрын
is it difficult to answer "why" before just copy pasting the code? eg: at 27:53, couldn't you have mentioned why you are copy pasting the code? it's a "python microservice course" not a Django course. It is bad teaching habit in my opinion to assume the learner would be familiar with Django
@ilhanmertalan640
@ilhanmertalan640 2 жыл бұрын
when i try to connect main app's mysql, getting 'Communications link failure' err ? anyone get & fixed or any idea
@joaorenatomendes2200
@joaorenatomendes2200 2 жыл бұрын
me too... could you find an answer?
@iansabi4935
@iansabi4935 8 ай бұрын
This error occurs because tag for mysql mentioned in the video is not supported anymore In the docke-compose.yml file, change the MySQL image tag example, db: image: mysql:5.7.44
@cursedgrape1247
@cursedgrape1247 Жыл бұрын
am I missing the microservices part?
@varadaamrutharatna9116
@varadaamrutharatna9116 2 жыл бұрын
Which application are you using to do this all code?
@vineethsai1575
@vineethsai1575 2 жыл бұрын
Looks like PyCharm.
@varadaamrutharatna9116
@varadaamrutharatna9116 2 жыл бұрын
@@vineethsai1575 Yes. Thank you
@doloreslaflipoflopo2746
@doloreslaflipoflopo2746 7 ай бұрын
are you Albanian?
@sridhar7251
@sridhar7251 6 ай бұрын
the simplest fucking thing you couldve done is tell what all softwares are supposed to be pre-installed for this project, for beginners like us
Introduction to RabbitMQ for Python Developers
12:26
Denis Orehovsky
Рет қаралды 38 М.
Python Django Web Framework - Full Course for Beginners
3:45:41
freeCodeCamp.org
Рет қаралды 4,2 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 17 МЛН
NodeJS Microservices Full Course - Event-Driven Architecture with RabbitMQ
1:01:29
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 55 М.
django Architecture - Connection Management
15:10
Hussein Nasser
Рет қаралды 43 М.
Migrating a Monolithic Application to Microservices (Cloud Next '19)
39:44
What is RabbitMQ?
10:10
IBM Technology
Рет қаралды 311 М.
EVENTS IS THE SOLUTION. EVENT-DRIVEN ARCHITECTURE IN PYTHON
16:15
Andrey Ivanov | Python
Рет қаралды 8 М.