You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are simple apps that demo how you can use Dramatiq with Django and
110
+
Flask, respectively.
111
+
104
112
105
113
## Task queue resources
106
114
*[International Space Station notifications with Python and Redis Queue (RQ)](https://www.twilio.com/blog/2015/11/international-space-station-notifications-with-python-redis-queue-and-twilio-copilot.html)
107
-
shows how to combine the RQ task queue library with Flask to send
115
+
shows how to combine the RQ task queue library with Flask to send
108
116
text message notifications every time a condition is met - in this blog
109
117
post's case that the ISS is currently flying over your location on
110
118
Earth.
@@ -117,10 +125,10 @@ when scaling out a large deployment of distributed task queues.
117
125
short summaries for each one. The task queues are not all compatible with
118
126
Python but ones that work with it are tagged with the "Python" keyword.
is a presentation for what task queues are and why they are needed.
122
130
123
-
*[Asynchronous Processing in Web Applications Part One](http://blog.thecodepath.com/2012/11/15/asynchronous-processing-in-web-applications-part-1-a-database-is-not-a-queue/)
131
+
*[Asynchronous Processing in Web Applications Part One](http://blog.thecodepath.com/2012/11/15/asynchronous-processing-in-web-applications-part-1-a-database-is-not-a-queue/)
124
132
and [Part Two](http://blog.thecodepath.com/2013/01/06/asynchronous-processing-in-web-applications-part-2-developers-need-to-understand-message-queues/)
125
133
are great reads for understanding the difference between a task queue and
126
134
why you shouldn't use your database as one.
@@ -130,18 +138,18 @@ when scaling out a large deployment of distributed task queues.
130
138
provides a detailed walkthrough of setting up workers to use RQ with
131
139
Redis.
132
140
133
-
* Heroku has a clear walkthrough for using
141
+
* Heroku has a clear walkthrough for using
134
142
[RQ for background tasks](https://devcenter.heroku.com/articles/python-rq).
135
143
136
144
*[How to use Celery with RabbitMQ](https://www.digitalocean.com/community/articles/how-to-use-celery-with-rabbitmq-to-queue-tasks-on-an-ubuntu-vps)
137
145
is a detailed walkthrough for using these tools on an Ubuntu VPS.
138
146
139
147
*[Celery - Best Practices](https://denibertovic.com/posts/celery-best-practices/)
140
-
explains things you should not do with Celery and shows some underused
148
+
explains things you should not do with Celery and shows some underused
141
149
features for making task queues easier to work with.
142
150
143
151
*[Celery in Production](http://www.caktusgroup.com/blog/2014/09/29/celery-production/)
144
-
on the Caktus Group blog contains good practices from their experience
152
+
on the Caktus Group blog contains good practices from their experience
145
153
using Celery with RabbitMQ, monitoring tools and other aspects not often
146
154
discussed in existing documentation.
147
155
@@ -151,25 +159,25 @@ when scaling out a large deployment of distributed task queues.
151
159
* This [Celery tasks checklist](http://celerytaskschecklist.com/) has
152
160
some nice tips and resources for using Celery in your applications.
when tasks are otherwise sent over unencrypted networks.
157
165
158
-
* Miguel Grinberg wrote a nice post on using the
159
-
[task queue Celery with Flask](http://blog.miguelgrinberg.com/post/using-celery-with-flask).
166
+
* Miguel Grinberg wrote a nice post on using the
167
+
[task queue Celery with Flask](http://blog.miguelgrinberg.com/post/using-celery-with-flask).
160
168
He gives an overview of Celery followed by specific code to set up the task
161
169
queue and integrate it with Flask.
162
170
163
171
*[3 Gotchas for Working with Celery](https://wiredcraft.com/blog/3-gotchas-for-celery/)
164
-
are things to keep in mind when you're new to the Celery task queue
172
+
are things to keep in mind when you're new to the Celery task queue
165
173
implementation.
166
174
167
175
*[Deferred Tasks and Scheduled Jobs with Celery 3.1, Django 1.7 and Redis](https://godjango.com/63-deferred-tasks-and-scheduled-jobs-with-celery-31-django-17-and-redis/)
168
176
is a video along with code that shows how to set up Celery with Redis as the
169
177
broker in a Django application.
170
178
171
179
*[Setting up an asynchronous task queue for Django using Celery and Redis](http://michal.karzynski.pl/blog/2014/05/18/setting-up-an-asynchronous-task-queue-for-django-using-celery-redis/)
172
-
is a straightforward tutorial for setting up the Celery task queue for
180
+
is a straightforward tutorial for setting up the Celery task queue for
173
181
Django web applications using the Redis broker on the back end.
174
182
175
183
*[Three quick tips from two years with Celery](https://library.launchkit.io/three-quick-tips-from-two-years-with-celery-c05ff9d7f9eb)
@@ -178,21 +186,20 @@ when scaling out a large deployment of distributed task queues.
178
186
179
187
180
188
## Task queue learning checklist
181
-
1. Pick a slow function in your project that is called during an HTTP
189
+
1. Pick a slow function in your project that is called during an HTTP
182
190
request.
183
191
184
-
1. Determine if you can precompute the results on a fixed interval instead
192
+
1. Determine if you can precompute the results on a fixed interval instead
185
193
of during the HTTP request. If so, create a separate function you can call
186
194
from elsewhere then store the precomputed value in the database.
187
195
188
196
1. Read the Celery documentation and the links in the resources section below
189
197
to understand how the project works.
190
198
191
-
1. Install a message broker such as RabbitMQ or Redis and then add Celery to
199
+
1. Install a message broker such as RabbitMQ or Redis and then add Celery to
192
200
your project. Configure Celery to work with the installed message broker.
193
201
194
202
1. Use Celery to invoke the function from step one on a regular basis.
195
203
196
-
1. Have the HTTP request function use the precomputed value instead of the
204
+
1. Have the HTTP request function use the precomputed value instead of the
meta: Dramatiq is a fast and reliable alternative to Celery. It supports RabbitMQ and Redis as message brokers.
8
+
9
+
10
+
# Dramatiq
11
+
12
+
[Dramatiq][dramatiq] is a fast and reliable Python [task queue][taskqueues]
13
+
that came about as an alternative to Celery. It supports RabbitMQ and
14
+
Redis as message brokers.
15
+
16
+
<divclass="well see-also">Dramatiq is an implementation of the <ahref="/task-queues.html">task queue</a> concept. Learn more in the <ahref="/web-development.html">web development</a> chapter or view the <ahref="/table-of-contents.html">table of contents</a> for all topics.</div>
17
+
18
+
## Dramatiq resources
19
+
20
+
* The [Dramatiq][dramatiq] documentation website.
21
+
* The [source code][dramatiq-source].
22
+
*[django_dramatiq][django_dramatiq] is a Django app for integrating
23
+
Django and Dramatiq.
24
+
*[django_dramatiq_example][django_dramatiq_example] is a simple
25
+
Django app demoing how you can integrate Django and Dramatiq.
26
+
*[flask_dramatiq_example][flask_dramatiq_example] is a simple app
0 commit comments