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

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

Join 7,700 Other Freelancers Who've Built Thriving Freelance Businesses

Over 7,700 other freelancers have started thriving freelance businesses using the information on this blog. Are you next? Subscribe below to get notified whenever a new article is posted and create your own success story:

You might also like

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.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Join 7,700 Other Freelancers Who've Built Thriving Freelance Businesses

Over 7,700 other freelancers have started thriving freelance businesses using the information on this blog. Are you next? Subscribe below to get notified whenever a new article is posted and create your own success story:

Success Stories

Ready to add your name here?

Tim Covello

Tim Covello

75 SEO and website clients now. My income went from sub zero to over 6K just last month. Tracking 10K for next month. Seriously, you changed my life.

Michael Phoenix

Michael Phoenix

By the way, just hit 95K for the year. I can’t thank you enough for everything you’ve taught me. You’ve changed my life. Thank you!

Stephanie Korski

Stephanie Korski

I started this 3 days ago, following John’s suggestions, and I gained the Upwork Rising Talent badge in less than 2 days. I have a call with my first potential client tomorrow. Thanks, John!

Jithin Veedu

Jithin Veedu

John is the man! I followed his steps and I am flooded with interviews in a week. I got into two Talent clouds. The very next day, I got an invitation from the talent specialists from Upwork and a lot more. I wanna shout out, he is the best in this. Thanks John for helping me out!

Divyendra Singh Jadoun

Divyendra Singh Jadoun

After viewing John’s course, I made an Upwork account and it got approved the same day. Amazingly, I got my first job the very same day, I couldn’t believe it, I thought maybe I got it by coincidence. Anyways I completed the job and received my first earnings. Then, after two days, I got another job and within a week I got 3 jobs and completed them successfully. All the things he says seem to be minute but have a very great impact on your freelancing career.

Sarah Mui

Sarah Mui

I’ve been in an existential crisis for the last week about what the heck I’m doing as a business owner. Even though I’ve been a business for about a year, I’m constantly trying to think of how to prune and refine services. This was very personable and enjoyable to watch. Usually, business courses like this are dry and hard to get through…. repeating the same things over and over again. This was a breath of fresh air. THANK YOU.

Waqas Abdul Majeed

Waqas Abdul Majeed

I’ve definitely learnt so much in 2.5 hours than I’d learn watching different videos online on Youtube and reading tons of articles on the web. John has a natural way of teaching, where he is passionately diving in the topics and he makes it very easy to grasp — someone who wants you to really start running your business well by learning about the right tools and implement them in your online business. I will definitely share with many of the people I know who have been struggling for so long, I did find my answers and I’m sure will do too.

Scott Plude

Scott Plude

I have been following John Morris for several years now. His instruction ranges from beginner to advanced, to CEO-level guidance. I have referred friends and clients to John, and have encouraged my own daughter to pay attention to what he says. All of his teachings create wealth for me (and happiness for my clients!) I can’t speak highly enough about John, his name is well known in my home.

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!

Mohamed Misrab

Misrab Mohamed

John has been the most important person in my freelance career ever since I started. Without him, I would have taken 10 or 20 years more to reach the position I am at now (Level 2 seller on Fiverr and Top Rated on Upwork).

Join 7,700 Other Freelancers Who've Built Thriving Freelance Businesses

Over 7,700 other freelancers have started thriving freelance businesses using the information on this blog. Are you next? Subscribe below to get notified whenever a new article is posted and create your own success story: