Event Sourcing on AWS - Serverless Patterns YOU HAVE To Know About

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024

Комментарии • 55

  • @WinTheCloud
    @WinTheCloud  3 года назад +8

    Here is a blog post that goes through how you can build a streaming data backend by using a serverless approach. The blog provides a complete example application that you can deploy to your AWS account: aws.amazon.com/blogs/compute/building-serverless-applications-with-streaming-data-part-1/

    • @RaGePr00fs
      @RaGePr00fs 3 года назад +2

      I would like to ask you, what online certified courses would you recommend for becoming a cloud engineer?

    • @WinTheCloud
      @WinTheCloud  2 года назад +2

      @@RaGePr00fs I have dedicated a video for this specific question ;) ruclips.net/video/-eRfvkfCY0Y/видео.html

    • @RaGePr00fs
      @RaGePr00fs 2 года назад +2

      @@WinTheCloud Ohh :DDD thank you. I watched after I wrote the comment back then ) . Thank you for your hard -work and following up.

  • @oleksandroliinyk4146
    @oleksandroliinyk4146 3 года назад +3

    Man, thank you! I've been watching your videos for 5 days and gonna watch all of them!

    • @WinTheCloud
      @WinTheCloud  3 года назад +1

      Awesome, thank you! I'm really glad you like them. I was starting to get worried people didn't find them useful..

  • @mrnobody5763
    @mrnobody5763 2 года назад +3

    Really I don't understand how a person who produce such a great quality content can have only 10k subs.
    Let's keep up this way, you're doing a great job.

    • @WinTheCloud
      @WinTheCloud  Год назад

      Thank you brother! My content is very niched, and I like it this way. I can produce videos that go over the top to get more views, but it's not my focus right now, maybe one day

  • @jackakif
    @jackakif 3 года назад +3

    keep posting educative videos like this man

    • @WinTheCloud
      @WinTheCloud  3 года назад +2

      As long as you keep giving them likes haha ! Jokes aside, I'll definitely do my best!

  • @MichelCarroll
    @MichelCarroll 2 года назад +2

    Thanks! Really interesting pattern. Been looking at event sourcing patterns for awhile, and this is one of the most immediately practical videos I've seen on the topic. Looking forward to part 2.

  • @folashocky2735
    @folashocky2735 3 года назад +6

    Great video! I'm surprised that you don't have more subscribers.

    • @WinTheCloud
      @WinTheCloud  3 года назад +1

      Thank you my friend! if you like the video, please give it a like, apparently it helps the channel to be more suggested to other people

  • @vamsiakhumukhi9582
    @vamsiakhumukhi9582 3 года назад +2

    Amazing Video... excited about upcoming videos !!!

  • @luislla3142
    @luislla3142 Год назад +1

    Amazing content!!! Thanks for your work. Please We need more use cases, like examples of scenarios and your proposed architectures and patterns applied. Thanks in advance.

    • @WinTheCloud
      @WinTheCloud  Год назад

      Thank you, Luis! I have more patterns in store, next I'm going to be talking about the GateKeeper pattern and more in the same style.

    • @luislla3142
      @luislla3142 Год назад +1

      @@WinTheCloud 😊👍

  • @anthonygrear6226
    @anthonygrear6226 3 года назад +2

    I've been getting confused with the different Amazon Kinesis products- so I'm glad they were used in this architectural design pattern.
    I have a feeling this channel will get much bigger. Keep up the good work.

  • @shadidhaque1009
    @shadidhaque1009 2 года назад +1

    Exactly what I was looking for

    • @WinTheCloud
      @WinTheCloud  2 года назад +1

      Glad it was helpful Shadid ;)

  • @saifeddinebouazizi5654
    @saifeddinebouazizi5654 2 года назад +2

    i'm currently studying to get my solutions architect certificate (associate level). your videos are really great. thanks

  • @saurabh3614
    @saurabh3614 3 года назад +2

    alot to learn from you thanks, buddy!!

  • @somedude31
    @somedude31 3 года назад +5

    At 11:36, you have an SQS queue between your consumer and producer lambdas. Why not just have a single lambda that reads from one kinesis data stream to the other? I'd imagine that the SQS queue would largely bring disadvantages.
    For example, if you use a regular (non-FIFO) sqs queue, then you lose the ordering you had within each kinesis data stream shard. If, instead, you use a FIFO queue, then you potentially create a bottleneck due to its lower throughput per message group (even if you, say, set the message group id to equal the shard id and, especially, if batching is enabled for kinesis data stream).
    Also, SQS has a smaller message size limit (256kb vs 1MB I wanna say?), so, it might be a no-go to begin with.

    • @WinTheCloud
      @WinTheCloud  3 года назад +2

      The SQS queue is mainly there to act like a buffer while the producer reads the messages from SQS in a batch manner. The idea is to leverage Lambda concurrency model + Lambda batch processing capabilities to save on calls cost: For example, we can configure Lambda to wait until 10 messages are in the queue (or once every 30 sec) before doing one round trip to SQS. This doesn't only save on cost, but also scales better since you most likely won't go over the Lambda invocation limit your account have.
      As for the message size limit, of course a bigger size message would be a new constraint that will most likely require a design change, for example: Consumer B puts object to S3, then Producer reads that object...

    • @somedude31
      @somedude31 3 года назад +4

      @@WinTheCloud Even though kinesis data stream works just fine as a buffer?
      My thoughts: Just have the kinesis data stream / lambda event source be configured with a batch size of, say, 200 records and a maximum wait time of 60 seconds. Your lambda would then poll for either 200 records or until 60 seconds has passed (whichever occurs first) before processing them all (and pushing the processed records to that other fraud detection kinesis data stream) at once. Far as I can tell, this would provide the same buffering effect you're going for. If you further keep the ParallelizationFactor at 1 (i think this is the default value), then you'd keep the within-shard ordering that you'd lose w/ a non-FIFO SQS queue. You'd end up with far fewer lambda invocations (as lambda can poll up to 1,000 records from kinesis vs 10 from SQS), fewer components (1 sqs queue and 1 lambda fewer), and fewer added constraints (kinesis data stream record size limit).

    • @somedude31
      @somedude31 2 года назад +2

      ​@Robin Chan Yes, but you get the same benefits (and more) by removing the SQS queue there.
      I like the architecture design (with the SQS queue removed) and agree with your comment that the main focus was on the separation of ownership.
      It's just that the SQS queue there doesn't help anything and yet adds size & ordering limitations. So, I'm saying remove the SQS queue and keep the rest.

    • @michaelgentry7534
      @michaelgentry7534 2 года назад

      @@somedude31 The benefit of the queue is that any number of other subscribers can subscribe to the queue as the application grows.

  • @brianwehrlefavorites883
    @brianwehrlefavorites883 Год назад +3

    I think there are some major misunderstandings about event-sourcing here- this is an event-driven pattern, not event-sourcing.

  • @djfriiky
    @djfriiky 2 года назад +2

    IMO the most important part of serverless is, that you do not need to select any size, server model etc. when provisioning a service. Therefore Kinesis is managed, but not serverless as you need to select the shard count.

    • @WinTheCloud
      @WinTheCloud  2 года назад

      I see your point. I use the same definition for Serverless as well (no size, mode... are required)

  • @kanonochina
    @kanonochina 3 года назад +3

    Very informative! Can you please do a architectural design for serverless AWS that can communicate to other APIs like Stripe? Thanks for the awesome videos.

    • @WinTheCloud
      @WinTheCloud  3 года назад +3

      How about this one? ruclips.net/video/yBGLw_eITfY/видео.html Let me know if you have questions!

  • @alexisnarvaez
    @alexisnarvaez 2 года назад +2

    Interesting video. How does Kinesis help you handling optimistic concurrency exceptions? That is a must to validate commands before emitting events

    • @WinTheCloud
      @WinTheCloud  2 года назад +1

      I haven't seen many cases where optimistic locking is handled on the data stream itself. Some AWS services like DynamoDB and ElasticSearch are pretty good at this: docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBMapper.OptimisticLocking.html

  • @tusharanand4059
    @tusharanand4059 3 года назад +2

    Good One.

  • @chatchaikomrangded960
    @chatchaikomrangded960 3 года назад +2

    Great!

    • @WinTheCloud
      @WinTheCloud  3 года назад

      Thank you. I'm happy you enjoyed it

  • @pauldarwin5111
    @pauldarwin5111 3 года назад +2

    Audio quality is great.

    • @WinTheCloud
      @WinTheCloud  3 года назад +1

      Thank you for the feedback! I appreciate it

  • @mexicanmax227
    @mexicanmax227 3 года назад +1

    Audio sounds great! Amazing video too!

    • @WinTheCloud
      @WinTheCloud  3 года назад +2

      Much appreciated!

    • @mexicanmax227
      @mexicanmax227 3 года назад +1

      I can’t thank you enough for your vids! They help me prepare for everything from coding to cloud certifications and best practices from all over the cloud industry. Plus your approach to teaching it is so well presented and easy to understand!!

  • @marianocalandranotonlyclou1579
    @marianocalandranotonlyclou1579 3 года назад +2

    Nice solution. Just to be safe: at 9:12 that DynamoDB table is just a denormalized view of the events?

    • @WinTheCloud
      @WinTheCloud  3 года назад

      It is. This DynamoDB table can be your main DB that your app reads from, so you can use whatever schema your app requires

  • @laxmisuresh
    @laxmisuresh 2 года назад +1

    Nice video. Can we push messages directly from lambda to kinesis to avoid sqs in this solution?.

    • @WinTheCloud
      @WinTheCloud  2 года назад

      Yes, definitely, the SQS is there to add a buffer in case the load spikes, but also to avoid tight coupling: If you decide to use Kafka, later rather than Kinesis, you won't have to change your Lambda function code ;)

  • @bogdanvaduva644
    @bogdanvaduva644 Год назад

    What happens if as an example, from one domain to the other, I want to send some information that is under GDPR protection, so it needs to be deleted at some point. Can I set up a lambda between Data streams and Firehose such that I strip that data from the event and only use it to produce a report (let's say) but not have it permanently stored in the S3 bucket?

  • @nithinkirthick8636
    @nithinkirthick8636 3 года назад +2

    lol can u guide road map to solution architect

  • @nicositio54
    @nicositio54 3 года назад +2

    Why not eventbridge?

    • @WinTheCloud
      @WinTheCloud  3 года назад +1

      EventBridge works for this as well - You can also use SQS to sort of "stream" data rather than Kinesis Data Stream... Many variations are possible