JMS053: How to Use a Queue To Speedup PHP Processing Tasks

In this episode of the John Morris Show we cover: how to use a queue to speedup the processing of tasks in PHP, the advice an ex-Microsoft engineer has for developers, what this year’s holiday means for web developers, the little-talked-about secret to success on Upwork and answers to your questions:

An Ex-Microsoft Engineer’s Advice to Programmers

I would advise folks in software to do one thing, and that’s write. Learn how to write … It’s actually useful. You need to know how to express yourself. And it’s really tough for a lot of engineers to step up and do public speaking… Once you create a successful piece of software, you’re probably going to be writing English as much as you’re going to be writing Java or Objective C. I’ve created multiple pieces of software at DocuSign that went viral, and people liked them and wanted to use more of them. And I probably wrote 10 times the documentation and explanation, and answered questions in paragraph form.

A comment on this post summarized it best:

You may be the best engineer in the building but if others else sell their ideas better than you, their designs will make it into the product.

Read the full article here

Thanksgiving/Black Friday Online Sales Hit $4.5B, 34% Of Purchases Made On Mobile

The first two days of the holiday sales period have netted $4.45 billion in U.S. online purchases, with mobile devices — led by smartphones — accounting for a record $1.5 billion of that amount, with $2.72 billion spent on BlackFriday and $1.73 billion on Thanksgiving. The figures come from Adobe, which has been tracking some 4,500 sites, including 80% of the top 100 retailers.

Mobile is still not as popular as desktop for buying things, but it’s definitely growing, especially as a place to browse. Mobile accounted for 60% of all online traffic on Thanksgiving, IBM said, up 14.8% on a year ago; and it took 54.4% of traffic on Black Friday, up 16.6%. On Thanksgiving, 40% of all sales were completed on mobile devices, another rise compared to last year, when one-third of sales were made on smartphones and tablets. Black Friday saw 35.3% of sales on mobile, IBM said.

Not necessarily a big shock or moral to the story here, but more evidence of what we know. Mobile is continuing to grow. Important to remember for web developers as you consider your path forward career-wise. Prob a good idea to be diving into mobile development.

Also important for site builders. If you’re making the shift to mobile-first… you’re playing an ever smaller game. You may not be tracking a ton of mobile traffic yet but I’m convinced that’s because your site isn’t optimized for mobile. So, people see it and click away. Stats show people browse and make decisions on mobile then pop over to the desktop to buy.

You’re losing before you start if you’re not going mobile-first.

A Destructive Mindset

I have NO coding experience and no extra $$$ to take any classes. I am a semi-retired female, unmarried, with SS income of too little. I MUST HAVE EXTRA SOURCE OF INCOME JUST TO LIVE.

A very dangerous way to think. You’ll likely have the money… it’s simply a matter of priorities. At some point, you just have to decide to go for it.

How to Use Queue To Speedup PHP Processing Tasks Part 1: Queueing Slow Tasks

Basic concept: Offload resource-intensive tasks to be performed after the initial script call. Store the necessary data in a database. Run a scheduled task to execute through queue at an interval. Clean up queue as you execute.

Example: Email Queue

Create a database table to store queued emails. Instead of sending emails immediately in scripts, send them to the queue. Every hour process 100 queue items. Delete or move to different storage as you send each email.

Here’s the full tutorial

The Little-Talked-About Secret to Success on Upwork

The secret is building your own audience outside of it.

  • You gain exposure not controlled by Upwork so not a slave to their algorithms
  • You build trust BEFORE they see your profile which makes you easier to hire
  • You set pricing expectations outside of the competitive enviro of Upwork

Here’s what I suggest you do right now:

  1. Decide video or written (video is better)
    Decide on a niche (membership sites)
    Create DIY tutorials for your potential clients

Always include a blurb at the end about: “Don’t want to do this yourself? Let me do it for you. Check out my profile here…”

Post once a week. Create a 3-month calendar of upcoming tutorials. Set time aside each week to knock it out.

Questions & Answers

I’m looking for tutorials courses to help me: 1) build a simple form to collect data (like a registrations page) and 2) send automated emails from a form submitted.

  1. Consider WordPress or an existing solution. Standard issues like this are handled much more easily. Doesn’t all have to be custom.
  2. How to create a custom PHP contact form with validation:
  3. How to Insert Form Data Into a MySQL Database Using PHP:
  4. JavaScript AJAX PHP mySQL create a Dynamic web Form project:

Is PDO the definitive method to connect to MySQL?

Not necessarily, MySQLi has some advantages and PDO has its own:


  • seems to be slightly faster
  • OOP and procedural


  • 12 different drivers
  • named parameters

Most important is the environment you’re working in and what you’re comfortable with. Both can do the job effectively.


Thanks for listening! If you have a question, comment or suggestion for the show shoot me an email at [email protected].

If you liked the show, give it a like and share with the communities and people you think will benefit.

Finally, you can always find all my tutorials, podcast episodes and more on, @jpmorris on Twitter and

You might also like

Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on pinterest
John Morris


I’m a 15-year veteran of freelance web development. I’ve worked with bestselling authors and average Joe’s next door. These days, I focus on helping other freelancers build their freelance business and their lifestyles.

The simple secrets to high-paying freelance clients

What makes clients willing to pay $5,000, $10,000 even $20,000 and up for your services? Download and install my mobile app and I’ll show you. It’s free. Just click the button below:

Clients Like:

Inc. Magazine Logo
Lewis Howes Logo
Ray Edwards Logo


Daniel Mohlendick

On the Freelancing on Upwork course: “This is by far the best course i have watched on Skillshare!! Thank you so much.”

Michael Skye

Michael Skye

John is a man of integrity, who gives generously of himself to projects and people he cares about.

Oliver Wainwright

Oliver Wainwright

I’m a fan. I have completed several of John’s courses. I find him very knowledgeable and he has a great delivery.

Sukh Plaha

John is a fantastic and patient tutor, who is not just able to share knowledge and communicate it very effectively – but able to support one in applying it. However, I believe that John has a very rare ability to go further than just imparting knowledge and showing one how to apply it. He is able to innately provoke one’s curiosity when explaining and demonstrating concepts, to the extent that one can explore and unravel their own learning journey. Thanks very much John!

Jason Rumley

Jason Rumley

John has a habit of over-delivering on the expectations he sets up. That’s why he’s the best.

Thabo Motsoahae

John is one of the best instructors I have come across, I learned a lot from his online tutorials.

Bob Patterson

Not only is John a very talented programmer and developer, he is also an excellent communicator. He has a talent for taking complex subjects and communicating them in terms that anyone can understand. This is a rare combination. This ability has enabled me to take my skills and knowledge to the next level. Thank you John for for all that you do.

Steve Dimmick

Steve Dimmick

John has provided expert knowledge and advice on multiple occasions that have helped me better serve my clients. John is a Rockstar!

Xan Barksdale

Xan Barksdale

Very professional worker who is extremely knowledgable in WordPress and Wishlist Member. I would definitely hire again.

Chris Aitken

He significantly improved my site through his expert knowledge of PHP, CSS and Javascript. Would definitely recommend John to others.

Ray Edwards

I recommend John every chance I get. If every person I worked with were as committed to excellence, punctuality, value, and unquestionable integrity… the world would be a better place. Highest recommendation.

Lewis Howes

John is amazing at building membership sites. He converted one of my sites over from it’s existing (hardly working) platform over to the clean and simple to use WishList membership platform. I highly recommend using John and WishList for any of your membership site needs.

Lori Grant

John did an outstanding job on my project. I highly recommend him and look forward to working with him on future projects.