Jump to content

Database-as-IPC

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mjsa (talk | contribs) at 08:01, 11 December 2017 (Added definition.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In computer programming, Database-as-IPC is an anti-pattern where a database is used as the message queue for routine interprocess communication in a situation where a lightweight IPC mechanism such as sockets would be more suitable. Junade Ali defined the Database-as-IPC Anti-Pattern as using a database to "schedule jobs or queue up tasks to be completed", noting that this anti-pattern centres around using a database for temporary messages instead of persistent data.[1]

Using a database for this kind of message passing is extremely inefficient compared to other IPC methods and often introduces serious long-term maintenance issues, but this method enjoys a measure of popularity because the database operations are more widely understood than "proper" IPC mechanisms.[2]

References

  1. ^ Ali, Junade (Packt Publishing Limited). Mastering PHP Design Patterns | PACKT Books (1 ed.). Birmingham, England, UK. p. 11. ISBN 978-1-78588-713-0. Retrieved 11 December 2017. {{cite book}}: Check date values in: |date= (help)
  2. ^ 5 subtle ways you’re using MySQL as a queue, and why it’ll bite you Schwartz, Baron. 2011 September 14.