GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing www.fullstackpython.com — Task Queues Task QueuesTask queues manage background work that must be executed outside the usual HTTP request-response cycle. Why are task queues necessary?Tasks are handled asynchronously either because they are not initiated by an HTTP request or because they are long-running jobs that would dramatically reduce the performance of an HTTP response. For example, a web application could poll the GitHub API every 10 minutes to collect the names of the top 100 starred repositories. A task queue would handle invoking code to call the GitHub API, process the results and store them in a persistent database for later use. Another example is when a database query would take too long during the HTTP request-response cycle. The query could be performed in the background on a fixed interval with the results stored in the database. When an HTTP request comes in that needs those results a query would simply fetch the precalculated result instead of re-executing the longer query. This precalculation scenario is a form of caching enabled by task queues. Other types of jobs for task queues include
Task queue projectsThe defacto standard Python task queue is Celery. The other task queue projects that arise tend to come from the perspective that Celery is overly complicated for simple use cases. My recommendation is to put the effort into Celery's reasonable learning curve as it is worth the time it takes to understand how to use the project.
Hosted message and task queue servicesTask queue third party services aim to solve the complexity issues that arise when scaling out a large deployment of distributed task queues.
Open source examples that use task queues
Task queue resources
Task queue learning checklist
What's next to learn after task queues?
1. Introduction
2. Development Environments
3. Data
4. Web Development
Web Frameworks
Django
Flask
Bottle
Pyramid
TurboGears
Falcon
Morepath
Sanic
Other Web Frameworks
Template Engines
Jinja2
Mako
Django Templates
Web Design
HTML
Cascading Style Sheets (CSS)
Responsive Design
Minification
CSS Frameworks
Bootstrap
Foundation
JavaScript
React
Vue.js
Angular
Task Queues
Celery
Redis Queue (RQ)
Dramatiq
Static Site Generators
Pelican
Lektor
MkDocs
Testing
Unit Testing
Integration Testing
Debugging
Code Metrics
Networking
HTTPS
WebSockets
WebRTC
Web APIs
Microservices
Webhooks
Bots
API Creation
API Frameworks
Django REST Framework
API Integration
Twilio
Stripe
Slack
Okta
Security
SQL Injection
CSRF
5. Deployment
6. DevOps
Changelog
What Full Stack Means
About the Author
Future Directions
Page Statuses
...or view the full table of contents.
Full Stack Python
Full Stack Python
is an open book that explains concepts in plain language and provides
helpful resources for those topics.
Updates via Twitter & Facebook. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |