Skip to content

Brisbane WebTech 28 May 6:30pm asynchronous/parallel database queries

Brisbane WebTech 28 May 6:30pm asynchronous/parallel database queries

Details

Those using Javascript are already used to asynchronous http requests. But there is an additional way to optimise your application on the server side. It's not actually new, but as I rarely see it used I think it's worth a meetup session!

Several MySQL and MariaDB client libraries support asynchronous queries. That is, you could send a SELECT query and not wait for the result but instead pick it up later. If you were to open multiple database connections (even to different servers) this would allow you to truly run queries in parallel, but at the very least you could do some other tasks in PHP while the query is getting processed.

Similarly, a write query could be sent off and you just need to make sure it gets done before the script ends, but no need to have the user wait right now... process other stuff while waiting.

These are just a few examples. It means using different application logic (since generally your server-side script language is not multi-threaded), but it can be done.

For PHP, the php/mysqli extension can be used. You will also need to learn a few more things about MySQL/MariaDB configuration.

At this meetup, we'll look at how it works, and discuss how to best use this feature!

Please arrive before 6:30pm so that we can start on time.

Tell your dev friends, rsvp, and see you all there!

Photo of Brisbane Web Tech group
Brisbane Web Tech
See more events
Toowong Library (Meeting Room)
9 Sherwood Rd, Toowong Village Shopping Centre · Toowong