How would you get all the photos of the people a user follows? like in the home page of instagram, it shows all the photos of the users you have followed. Do you query all the followed of that users and then query each of them one by one to see if there is a new photo?
not only great dynamodb video, but for coding best practices as well. I have been working in a project from a while & we are using these ulid, re-usable componenets/methods, excel sheets for access patterns. found the source probably :D
This was incredible, i've been using DynamoDB for awhile now and this helped reinforce something that I have been doing as well as answer a few questions on some best practices and provide ideas on how to design future projects. Thank you so much Marcia and Alex.
Excellent... I like the use of TypeScript and the abstraction to simplify access. Really well done and informative. Still have questions though on writing DDB Single Table app when working with legacy system where entities already exist. Would like to hear more about that. Again, Excellent presentation!! Thank you Marcia and Alex!
I feel like I gotta watch this 4 times to get my brain to actual consume all of this and digest it. Im legit hating myself for trying to learn noSQL lol
thanks for the great tutorial, I have a question though, how to list down unfollowed users? in order to follow a user the application needs to provide a set of unfollowed users, right ? I don't think we should design an access pattern for this. The only solution in my mind is perform a fake join at the lambda code level which is discouraged when using DynamoDB. Any better suggestion?
The simplest thing i cant seem to figure out with dynamo.. How would go get a list of users who follow both "foobar" and "alex"? Or users who liked 2 different phots?
@@foobar_codes Sure Alex is great, but Marcia it is awesome how you ask questions from your guests to get more details that otherwise could be taken for granted by subject matter experts. Thanks a lot for the awesome content.
what a great explanation ... i do have one question: why on the sheet file we have main table for list likes for photo and not for list comments for photo ?
No puede ser... Hoy mismo estaba viendo este mismo tema 🤯🤯🤯🤯 Wow Gracias Marcia. Me gustaría un vídeo ahora en español. De todas formas este lo voy a ver. Gracias 😊😊😀
este video no creo que pueda estar en español tal cual, ya que alex solo esta en ingles. pero seguramente hare una serie de dynamo en español en el futuro. que bueno que te gusto este video
Good video. One question on scalability, lets say a photo gets multiple millions likes, in the current schema all the likes will have same PK. Do we not run the risk of hitting the limits of 10GB size limit per partition?
Yes we do, in that case one patter which i have used is that you pick a set of numbers let's say 1 to 100, and then whenever you store a like you just suffix or prefix a random number from that set in the sort key. That way your million likes would be distributed in 100 different partitions. Then you can keep a total count separately just like he did in this video with the likescount using transaction.
Great video 🎉 Should ULIDs only be for Sort Keys rather than a PK? I thought a PK should ideally generate values that will be evenly spread over partitions. I like the concept of ULID but does it increase the risk of hot partitions much?
It was really helpful to understand the basic of the one-single-db pattern. But one question, for example,, you put the User entity in the same table than follows, photos, etc ... But usually, in a microservice-based company/project , we will have a "user service", "media service", "post service" which will manage all their own business rules, right ? So concretely, in that case this pattern is still useful ? Or you duplicate data to avoid to make some proxy endpoint ?
I think it depends on the team compositions. First thing is that microservices are primarily for teams autonomy. So if we keep the teams autonomy then i think table per microservice is good. If we have a central authority for db like a dba then i think we can have a single table design.
Amazing talk as always Alex. Love your videos and I have learnt a lot. One quick qs. I created a GSI on one of the date column but since I have to do a between , I had to use scan operation. Is this a bad way to get data? I can use index with query but that won't let me do any between.
OMG, didn't see this coming. "Marcia and Alex" Dream Team, period.
thankss :D
THIS IS AWESOME! I'm so glad I've subscribed to this channel
This is great, thanks heaps both for these explanations!
Glad it was helpful!
The best DynamoDB tutorial I have seen to date. I love the clean and simple code.
How would you get all the photos of the people a user follows? like in the home page of instagram, it shows all the photos of the users you have followed. Do you query all the followed of that users and then query each of them one by one to see if there is a new photo?
not only great dynamodb video, but for coding best practices as well. I have been working in a project from a while & we are using these ulid, re-usable componenets/methods, excel sheets for access patterns.
found the source probably :D
This was incredible, i've been using DynamoDB for awhile now and this helped reinforce something that I have been doing as well as answer a few questions on some best practices and provide ideas on how to design future projects. Thank you so much Marcia and Alex.
Great to hear!
same here
Excellent contribution, I heard about his DynamoDB book and this video fits perfectly as an introduction.
Given the model shown, how would you query the table to return all users?
Thank you for this video :) Spanish community deserves this awesome stuff as well!!
Hahhaa now i need to find a Spanish version of alex 🤷🏽♀️
Excellent... I like the use of TypeScript and the abstraction to simplify access. Really well done and informative. Still have questions though on writing DDB Single Table app when working with legacy system where entities already exist. Would like to hear more about that. Again, Excellent presentation!! Thank you Marcia and Alex!
This is an excellent non-trivial example. It's also the cleanest approach to working with DynamoDB that I've seen to date 👏👏👏
Thanks! Alex is amazing
Muchas gracias Marcia por esta excelente entrevista con Alex!!!!! Saludos desde argentina!!
Thank you so much for this Marcia and Alex. This was so helpful.
I feel like I gotta watch this 4 times to get my brain to actual consume all of this and digest it. Im legit hating myself for trying to learn noSQL lol
Great presentation of DynamoDB possibilities
It's very helpful for me. Thank you so much Marcia and Alex ^^
Happy to help!
Love ulid! I was already using it with DynamoDB and the ordering property is awesome.
Yesss this library is really useful
thanks for the great tutorial,
I have a question though, how to list down unfollowed users? in order to follow a user the application needs to provide a set of unfollowed users, right ?
I don't think we should design an access pattern for this. The only solution in my mind is perform a fake join at the lambda code level which is discouraged when using DynamoDB. Any better suggestion?
Thanks so much for this video and having table of content in your descriptions is really useful.
Happy that it helps
This was really good. Learned tons about DDB. I didn't know about ULIDs either 👍
yes ULID lib is great!
The simplest thing i cant seem to figure out with dynamo.. How would go get a list of users who follow both "foobar" and "alex"? Or users who liked 2 different phots?
Alex is world class, he has so much integrity, I’d support anything he produces 🙌🏻
he is great :)
@@foobar_codes And of course you are too Marcia :)
@@foobar_codes Sure Alex is great, but Marcia it is awesome how you ask questions from your guests to get more details that otherwise could be taken for granted by subject matter experts. Thanks a lot for the awesome content.
what a great explanation ... i do have one question:
why on the sheet file we have main table for list likes for photo and not for list comments for photo ?
Thanks so much ! Appreciate the effort of bringing all this content !
Glad you enjoy it!
Thank you. Good class.
Great content, I learnt a lot from this video.
Awsome! Thanks for the message
No puede ser... Hoy mismo estaba viendo este mismo tema 🤯🤯🤯🤯 Wow Gracias Marcia. Me gustaría un vídeo ahora en español. De todas formas este lo voy a ver. Gracias 😊😊😀
este video no creo que pueda estar en español tal cual, ya que alex solo esta en ingles. pero seguramente hare una serie de dynamo en español en el futuro.
que bueno que te gusto este video
@@foobar_codes excelente 👍🏻🤗 Esperaremos la serie de DynamoDB con ansias. Es una excelente BD. Ya vi los Reinvent 🤯 Realmente es genial
Awesome..
Thanks 🤗
What i needed
Wow! this is really great stuff! Thank you both for this :D
Our pleasure!
Awesome video! DDB is ♥️
It really is!
Este video es oro
Nice video.
Got the book!
Good video. One question on scalability, lets say a photo gets multiple millions likes, in the current schema all the likes will have same PK. Do we not run the risk of hitting the limits of 10GB size limit per partition?
Yes we do, in that case one patter which i have used is that you pick a set of numbers let's say 1 to 100, and then whenever you store a like you just suffix or prefix a random number from that set in the sort key.
That way your million likes would be distributed in 100 different partitions. Then you can keep a total count separately just like he did in this video with the likescount using transaction.
Thx Marcia! Having seen this video, makes the DynamoDB setup so much more human in the project I'm working on. 🎉
Great to hear
Great video 🎉 Should ULIDs only be for Sort Keys rather than a PK? I thought a PK should ideally generate values that will be evenly spread over partitions. I like the concept of ULID but does it increase the risk of hot partitions much?
It was really helpful to understand the basic of the one-single-db pattern.
But one question, for example,, you put the User entity in the same table than follows, photos, etc ... But usually, in a microservice-based company/project , we will have a "user service", "media service", "post service" which will manage all their own business rules, right ?
So concretely, in that case this pattern is still useful ? Or you duplicate data to avoid to make some proxy endpoint ?
I think it depends on the team compositions. First thing is that microservices are primarily for teams autonomy. So if we keep the teams autonomy then i think table per microservice is good. If we have a central authority for db like a dba then i think we can have a single table design.
Great video, loved the way you all walked through the steps of designing
Thank you! Cheers!
Thank you very much for the video!
Thank you so much Marcia and Alex for making this video possible
Amazing talk as always Alex. Love your videos and I have learnt a lot. One quick qs. I created a GSI on one of the date column but since I have to do a between , I had to use scan operation. Is this a bad way to get data? I can use index with query but that won't let me do any between.
Really useful channel Thx!
Happy to help!
Thanks! Nicely explained at a high and low level .
This schema design is not suitable for search at all. I need a tutorial on a searchable dynamoDB design.
Useful
Glad you think so!
Fantastic content!
Thanks
Really helpful