YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Task Queues & Cron Jobs - Developing Scalable Apps with Java

Get Embed Code
6 Languages

Showing Revision 5 created 05/24/2016 by Udacity Robot.

  1. So let's look at another feature that is needed
  2. to build scalable applications, task queues. So why do
  3. we need task queues? Well at this time this
  4. picture should be no surprise to you. Our dear
  5. users accessing our application from various devices. And our
  6. application for turning the response. Technically this response must
  7. be returned within 60 seconds from the request. But
  8. that's a long time. We've talked about the importance
  9. about returning a response as quickly as possible to
  10. our dear users. And we don't want them to
  11. wait, even for seconds, right? And certainly not 60
  12. seconds. You want to deliver that response as quickly as
  13. possible. But let's say that the user activity triggers
  14. something big to happen. For example, the user adds a
  15. new conference and as a consequence of that 10,000
  16. emails should be sent out to notify other users about
  17. this conference. First of all, that's not possible within
  18. 60 seconds. And secondly, you certainly don't want the
  19. poor user that just registered the conference to wait
  20. for this to happen. Remember, the screen update depends on
  21. your response so even seconds are crucial to keep
  22. your application responsive. Come to the rescue are task
  23. queues. This is exactly the problem task queues solve.
  24. And it may not be emails triggering the need for
  25. this, it could be something else. For example, an
  26. image needs to be analyzed or a video needs to
  27. be re-encoded. Many things that are not needed to
  28. complete the request for the user, could use task queues