Asynchronous programming is very popular nowadays, mostly popularized by Javascript in Node.JS. Having single thread in Javascript leaves no way to do parallel things. Same picture is in PHP, where request is handled by single process or thread.

Good news is that PHP is not years behind. There are already async extensions and libraries, for example ReactPHP.

Our goal can easily be reached using ReactPHP based on callbacks or promises, but I want to add more magic with RxPHP. It is outstanding approach to solve daily tasks in a way you might never thought before.

So let’s describe ultimate goals and move on:  Efficially query remote Rest API via HTTP GET.

Continue reading

CDN is abbreviation for Content Delivery Network. Hard to believe that like 5 years ago it sounded like a rocket science in WWW. Only huge sites were able to afford it and configure it right. Now things have completely changed and today’s question is: Why you still do not use CDN for your site or blog?

Because of the W3 Total Cache plugin, setting up a CDN for WordPress based site is criminally simple. Thats another one cent in my love WordPress topic. If your website receives more than a few hundred visitors a month, or if your site makes visitors download a lot of data (images, self-hosted javascripts, flash files, etc.), this is a great setup.

There’s also an SEO benefit in using a CDN…at least indirectly. Faster sites get more traffic from Google and Bing than slower sites. By making your site faster, you increase the likelihood Google will refer people to your site.
Continue reading

WordPress has its own cron job implementation that allows you to schedule your posts and events. It was done in a way to be simple and it works in most cases.

WP-Cron is not a real cron job, it only works when a page is loaded. When a page is requested, it will then check the database to see if there is anything scheduled and after displays to your reader.

However, in some situations, the WP-Cron does not work well and this leads to posts that missed publication schedule and events not executed.  May be you have seen the “Missed Schedule” status.

Continue reading