Threading and locking in PHP ???

Author Topic: Threading and locking in PHP ???  (Read 1439 times)

Offline chinmay.sahooTopic starter

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 2
  • Posts: 158
  • Karma: 0
    • We Helpline
Threading and locking in PHP ???
« on: 12-22-2015, 00:10:38 »
Threading and locking are very important for multiple-tier sites and two-tier sites that have many contributors. They prevent two database calls from bumping into each other, so to speak, by giving editorial control to only a single transaction at a time.

An example that clearly illustrates the value of threading and locking is a Web site that sells tickets to popular rock concerts (assigned rather than “festival” seating). Obviously, you would not want two people to be able to purchase the same seat at the same event due to a database error. The database needs some way to recognize unique requests and let only one user (or thread) make changes at any given moment, while others are locked out until the first transaction is complete.

Unless you’re sure your project (a Web log, for instance) will have only one user at a time, be careful of committing to a nonthreaded database.

Offline RH-Calvin

  • Trade Count: (0)
  • Hero Member
  • *****
  • Thank You 92
  • Posts: 1243
  • Karma: 0
  • Gender: Male
    • Cheap VPS Hosting
Re: Threading and locking in PHP ???
« Reply #1 on: 12-24-2015, 22:18:23 »
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Group.


Related Topics

  Subject / Started by Replies Last post
1 Replies
Last post 04-20-2016, 04:54:54
by TomClarke