looping posts and making request for every post to get comments it effects on project performance even if you are using single database that contains posts and comments , so what if we use same princip for requesting another database through api !!!!
Did that but Laravel always offers more features and the difference in speed is not that big. If you are concerned with speed then I would switch some Laravel Microservices with Golang
This would work but seems grossly inefficient. Why not make a post method that sends an array of post_ids you want the comment for and use whereIn() instead of where() so you’re only making 1 HTTP request total instead of 1 per post? Edit: made it to the end and assume this is what you’re doing in part 2
But why? This makes sense in the frontend. There should be composer level integration instead of just relying on https requests. I guess that’s my Laravel bias commenting..
nice video, I have a question when you ''connect' or attatch the comments to the post and you said thats not the best practices, what could be the best practices or that another layer??
So wait....now you end up with multiple apps with their own dependencies, which add up more maintenance cost to the entire project? From what i understand, this is created so companies can protect their codes by only giving a piece of it to each team rather than allowing entire projects to be cloned, am I correct?I can only think of it usage like this as a protection mechanism from the project owner and not at all as a way to make things function better as you could have simply created folders for the controllers and models with microservices names and have still everything under a single app.
that's the whole point of microservices, to mot build a single app which does it all, the functionalities are fragmented and spread across multiple systems hence reducing the overall workload.
Very dangerous approch. Http call inside loop. And also in microservice closely related entities should be placed together. Product and product comment should br in same database.
Data access in services should be inverted. If service A really needs data from service B, then service B needs to publish an integration event with the data and service A needs to copy it locally. Making synchronous HTTP calls between services is not microservices. It's a distributed monolith from hell
I have one course more advanced in my channel if you haven't seen it. It is hard for some people to follow it so I created this one. Still this will be a Series and you will see a lot of features
@@ScalableScripts Ah I didn't mean.. You obviously put out great content for everyone from noobs to pro.. I meant the thumbnail has a typo. BEGGINERS.. I thought my comment could help you update the typo before it starts getting lots of views.
Can you add a video on how to secure a Multi-Service-Architecture like that? How to add Authorization?
Man what a great tutorial, everything's super clear, everything awesome, great content man
you did not add the resources that you used in this video.
audio quality 👌👌
Hey dude you are awesome , super simple .. please keep up this contents
Each posts triggers a request and subsequent database call? What happens if you want to display 100+ posts?
As I said this is a series and you will get the solution in the next Laravel Microservices video.
Thank you so much 👍😊🎉👏✌🙌
looping posts and making request for every post to get comments it effects on project performance even if you are using single database that contains posts and comments , so what if we use same princip for requesting another database through api !!!!
This is what i'm looking for
How are comments being stored ? post request to a different microservice?
Nice 👍🏻 and it’s a very Simple
If you want to use Laravel just for API, is it better to use Lumens? More lightweight. What do you think?
Did that but Laravel always offers more features and the difference in speed is not that big. If you are concerned with speed then I would switch some Laravel Microservices with Golang
\Http::get error : Underfined type Http
Can you help me please?
This would work but seems grossly inefficient. Why not make a post method that sends an array of post_ids you want the comment for and use whereIn() instead of where() so you’re only making 1 HTTP request total instead of 1 per post? Edit: made it to the end and assume this is what you’re doing in part 2
Agree
But why? This makes sense in the frontend. There should be composer level integration instead of just relying on https requests. I guess that’s my Laravel bias commenting..
how to integrate these into frontend?
nice video, I have a question when you ''connect' or attatch the comments to the post and you said thats not the best practices, what could be the best practices or that another layer??
Wait the next video ;) There are multiple ways to solve this problem I will explain all of them
@@ScalableScripts nice
So wait....now you end up with multiple apps with their own dependencies, which add up more maintenance cost to the entire project? From what i understand, this is created so companies can protect their codes by only giving a piece of it to each team rather than allowing entire projects to be cloned, am I correct?I can only think of it usage like this as a protection mechanism from the project owner and not at all as a way to make things function better as you could have simply created folders for the controllers and models with microservices names and have still everything under a single app.
that's the whole point of microservices, to mot build a single app which does it all, the functionalities are fragmented and spread across multiple systems hence reducing the overall workload.
How did you open this data source window to connect any database from visual studio?
do you know how?
nice
Very dangerous approch. Http call inside loop. And also in microservice closely related entities should be placed together. Product and product comment should br in same database.
Data access in services should be inverted. If service A really needs data from service B, then service B needs to publish an integration event with the data and service A needs to copy it locally.
Making synchronous HTTP calls between services is not microservices. It's a distributed monolith from hell
good
What ide are you using? Great content!
I feel like it might be PHP storm
Is that a realtime?
Awesome content, When will part two of this video be released?
In about a month I would say, I have other videos in the pipeline
@@ScalableScripts how do u get to be this smart my guy😩
Why not use $fillable instead of an empty $guarded property?
what if i have 50 columns
@@qwizzwizz then you'd have to review the design of your table, for sure
how trivial ...
1
2
3
C'mon dude begginers?
I have one course more advanced in my channel if you haven't seen it. It is hard for some people to follow it so I created this one. Still this will be a Series and you will see a lot of features
@@ScalableScripts Ah I didn't mean.. You obviously put out great content for everyone from noobs to pro.. I meant the thumbnail has a typo. BEGGINERS.. I thought my comment could help you update the typo before it starts getting lots of views.
Ups, thank you for noticing I changed it :D