Download presentation
Presentation is loading. Please wait.
Published byTamia Anson Modified over 10 years ago
1
Batch/Queue API What we can learn from Drupal 7 for CiviCRM 4.1
2
About myself Chang Xiao Emotive LLC chang@emotivellc.com chang@emotivellc.com IRC: changx Forum handle: xcf33
3
Batch. Yum…. A Batch of cookies
4
Characteristics of Batch Works on right after the series of action desired to be performed is submitted. Provide feedbacks to user on completion status. Example: 3 records imported, etc etc Submit import formImport user 1Import user 2 Import user 3
5
Benefits Provide user feed back on the progress. (Usually user take it for granted). Good and smooth user experience. Preventing user errors.
6
Potential Pitfalls Waiting, Waiting and Waiting. PHP settings (timeout, memory, etc) Database settings (MySQL has gone away) Conclusion: Not suitable for large scale operations.
7
Queue, errr A line on Black Friday
8
Characteristics of Queue First in First out (FIFO) Processes a series of tasks in sequence Example: 3 records imported, etc etc Submit import form Import Queue
9
Benefits Can be stopped and resumed at any time. Provides granular scalability and robustness. Separate user input and actual process
10
Potential Pitfalls Complex design Resource consumption
11
Current CiviCRM applications Bulk mailing Each mailing is in a queue. Each mailing contains X number of emails and sits in a mailing queue Contact Import ETC
12
When to use? Batch: Tasks that will exceed php time out Tasks with tolerable time frame (i.e. 5 minutes) Tasks that needs to provide continuous feedback Queue: Tasks that takes a lot of time Tasks that can be stopped and resumed Distribute processing.
13
Where to use it Exporting contacts Importing process Running large reports CiviMail bulk mailing process Dedupe processes Synchronizing processes Installation/Upgrade
14
Conclusion Batch Queue
15
Why not Have your cookie and …. Eat it too?
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.