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

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ส.ค. 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 ;) th-cam.com/video/-eRfvkfCY0Y/w-d-xo.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..

  • @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

  • @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!

  • @vamsiakhumukhi9582
    @vamsiakhumukhi9582 3 ปีที่แล้ว +2

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

  • @mrnobody5763
    @mrnobody5763 ปีที่แล้ว +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

  • @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.

  • @shadidhaque1009
    @shadidhaque1009 2 ปีที่แล้ว +1

    Exactly what I was looking for

    • @WinTheCloud
      @WinTheCloud  2 ปีที่แล้ว +1

      Glad it was helpful Shadid ;)

  • @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.

    • @WinTheCloud
      @WinTheCloud  3 ปีที่แล้ว +1

      Glad it was helpful!

  • @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 😊👍

  • @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)

  • @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.

  • @tusharanand4059
    @tusharanand4059 3 ปีที่แล้ว +2

    Good One.

    • @WinTheCloud
      @WinTheCloud  3 ปีที่แล้ว +1

      Thank you! Cheers!

  • @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!!

  • @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

  • @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? th-cam.com/video/yBGLw_eITfY/w-d-xo.html Let me know if you have questions!

  • @brianwehrlefavorites883
    @brianwehrlefavorites883 ปีที่แล้ว +3

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

  • @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

  • @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 ;)

  • @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

  • @nithinkirthick8636
    @nithinkirthick8636 3 ปีที่แล้ว +2

    lol can u guide road map to solution architect

  • @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?