Posts For Tag: ReactPHP
Myths About Asynchronous PHP: It Is Not Truly Asynchronous
03 Mar 2021
Recently I had a lot of discussions about performance in PHP. Even though we have PHP 8, JIT, and all other improvements, people still continue complaining about PHP. That it is a language only for the request-response circle. That PHP...
READ MOREDriftPHP: Quick Start
08 May 2020
Idea and Architecture Let’s imagine that you are building a high-performance PHP application. Speaking of me previously I had two options: either use Symfony or ReactPHP. And to tell the truth, both solutions have their one pros and cons. With...
READ MOREReactPHP Internals: Event Loop Timers
01 May 2020
For many of you, ReactPHP and especially its EventLoop component looks like magic. We know that it handles concurrency, but the way it works inside is a sort of black box. In these tutorials I want to dig into it,...
READ MOREInterview with Marc Morera: About DriftPHP
14 Feb 2020
Recently I interviewed Marc Morera. He is an author of DriftPHP - a new asynchronous non-blocking framework on top of Symfony Components and ReactPHP. We discussed a new framework and how it became possible to make Symfony asynchronous and run...
READ MORELive Reloading PHP Applications With Nodemon
16 Sep 2019
When building a traditional web application in PHP we don’t care about reloading it. We make some changes in the source code, save it, then make the request in the browser or some other client and we can see these...
READ MOREBuilding a RESTful API Using ReactPHP: JWT Authentication
22 Apr 2019
Previously we have used Basic HTTP Authentication to protect our RESTful API. This authentication method is pretty simple, but in most cases, it can be used only in the internal network with server-to-server communication. For example, we can’t store Basic...
READ MOREBuilding a RESTful API Using ReactPHP: Basic Authentication
20 Apr 2019
In the previous article, we have created a RESTful API on top of ReactPHP HTTP server. Now we want to protect our API and add authentication. When it comes to securing a RESTful API things became interesting because a truly...
READ MOREBuilding a RESTful API Using ReactPHP and MySQL
18 Feb 2019
Today we will be looking at creating a RESTful API using ReactPHP, MySQL and nikic/FastRoute. Let’s look at the API we want to build and what it can do. Application We are going to build the API that: Handles CRUD...
READ MOREFast Web Scraping With ReactPHP: Download All Images From a Website
31 Aug 2018
Web scraping relies on the HTML structure of the page, and thus cannot be completely stable. When HTML structure changes the scraper may become broken. Keep this in mind when reading this article. At the moment when you are reading...
READ MOREFast Web Scraping With ReactPHP. Part 3: Using Proxy
20 Jun 2018
Web scraping relies on the HTML structure of the page, and thus cannot be completely stable. When HTML structure changes the scraper may become broken. Keep this in mind when reading this article. At the moment when you are reading...
READ MORESending Email Asynchronously With ReactPHP Child Processes
04 May 2018
Introduction In PHP the most of libraries and native functions are blocking and thus they block an event-loop. For example, each time we make a database query with PDO, or check a file with file_exists() our asynchronous application is being...
READ MOREFast Web Scraping With ReactPHP. Part 2: Throttling Requests
19 Mar 2018
Web scraping relies on the HTML structure of the page, and thus cannot be completely stable. When HTML structure changes the scraper may become broken. Keep this in mind when reading this article. At the moment when you are reading...
READ MOREUsing Router With ReactPHP Http Component
13 Mar 2018
Router defines the way your application responds to a client request to a specific endpoint which is defined by URI (or path) and a specific HTTP request method (GET, POST, etc.). With ReactPHP Http component we can create an asynchronous...
READ MOREWorking With FileSystem In ReactPHP
27 Feb 2018
I/O operations in the filesystem are often very slow, compared with CPU calculations. In an asynchronous PHP application this means that every time we access the filesystem even with a simple fopen() call, the event loop is being blocked. All...
READ MOREFast Web Scraping With ReactPHP
12 Feb 2018
Video Web scraping relies on the HTML structure of the page, and thus cannot be completely stable. When HTML structure changes the scraper may become broken. Keep this in mind when reading this article. At the moment when you are...
READ MOREAsynchronous PHP: Why?
02 Feb 2018
Video What is ReactPHP Asynchronous programming is on demand today. Especially in web-development where responsiveness of the application plays a huge role. No one wants to waste their time and to wait for a freezing application, while you are performing...
READ MOREManaging ReactPHP Promises
16 Jan 2018
Asynchronous application is always a composition of independently executing things. In concurrency, we are dealing with a lot of different things at once. You can compare it with I\O driver in your OS (mouse, keyboard, display). They all are managed...
READ MOREReactPHP HTTP Server Middleware
20 Dec 2017
What is middleware? What exactly is middleware? In real application when the request comes to the server it has to go through the different request handlers. For example, it could be authentication, validation, ACL, logging, caching and so on. Consider...
READ MOREReactPHP PromiseStream: From Promise To Stream And Vice Versa
07 Dec 2017
ReactPHP PromiseStream Component is a link between promise-land and stream-land From Stream To Promise One of the patterns that are used to deal with streams is spooling: we need the entire resource data available before we start processing it. One...
READ MOREBuilding ReactPHP Memcached Client: Unit-Testing Promises
20 Nov 2017
This is the last article from the series about building from scratch a streaming Memcached PHP client for ReactPHP ecosystem. The library is already released and published, you can find it on GitHub. In the previous article, we have completely...
READ MOREBuilding ReactPHP Memcached Client: Emitting Events
03 Nov 2017
This is the third from the series about building from scratch a streaming Memcached PHP client for ReactPHP ecosystem. The library is already released and published, you can find it on GitHub. In the previous article, we have faced with...
READ MOREBuilding ReactPHP Memcached Client: Errors And Connection Handling
14 Oct 2017
This is the second article from the series about building from scratch a streaming Memcached PHP client for ReactPHP ecosystem. The library is already released and published, you can find it on GitHub. In the previous article, we have created...
READ MOREBuilding ReactPHP Memcached Client: Making Requests And Handling Responses
09 Oct 2017
This is the first article from the series about building from scratch a streaming Memcached PHP client for ReactPHP ecosystem. The library is already released and published, you can find it on GitHub. Before writing any code we should think...
READ MOREUnderstanding ReactPHP Event Loop Ticks
25 Sep 2017
What Is Tick? Tick is one loop iteration where every callback in the queues has been executed synchronously and in order. ReactPHP event loop implementation has a method to schedule a callback to be invoked on a future iteration of...
READ MOREPromise-Based Cache With ReactPHP
15 Sep 2017
In the previous article, we have already touched caching (when caching DNS records). It is an asynchronous promise-based Cache Component. The idea behind this component is to provide a promise-based CacheInterface and instead of waiting for a result to be...
READ MOREResolving DNS Asynchronously With ReactPHP
03 Sep 2017
Basic Usage It is always much more convenient to use domain names instead of IPs addresses. ReactPHP DNS Component provides this lookup feature for you. To start using it first you should create a resolver via factory React\Dns\Resolver\Factory. Its create()...
READ MORECancelling ReactPHP Promises With Timers
22 Aug 2017
The Problem At first, let’s refresh in memory what is Promise. A promise represents a result of an asynchronous operation. You can add fulfillment and error handlers to a promise object and they will be invoked once this operation has...
READ MOREManaging Child Processes With ReactPHP
07 Aug 2017
ReactPHP Child Process Component enables an access to Operating System functionalities by running any system command inside a child process. We have access to that child process input stream and can listen to its output stream. For example, we can...
READ MOREMaking Asynchronous HTTP Requests With ReactPHP
26 Jul 2017
The Problem We need to perform batches of HTTP requests. For example, we need to download several video files. We can start downloading them one by one, but it will take a lot of time since we need to wait...
READ MOREBuilding Video Streaming Server with ReactPHP
17 Jul 2017
In this article, we will build a simple asynchronous video streaming server with ReactPHP. ReactPHP is a set of independent components which allows you to create an asynchronous application in PHP. ReactPHP Http is a high-level component which provides a...
READ MOREUDP/Datagram Sockets with ReactPHP
05 Jul 2017
Streams vs Datagrams When you send data through the sockets, there are situations when you really do not care if some packets are lost during the transition. For example, you are streaming a live video from your camera. The order...
READ MOREBuild A Simple Chat With ReactPHP Socket: Client
24 Jun 2017
Video In the previous article, we have created a simple chat server based on ReactPHP Socket component. We have used a telnet client to connect to this server, now it’s time to create our own PHP client, also based on...
READ MOREBuild A Simple Chat With ReactPHP Socket: Server
22 Jun 2017
Video In this article, we are going to build a simple chat server based on ReactPHP Socket Component. With this component, we can build simple async, streaming plaintext TCP/IP or a secure TLS socket server. Socket A socket is one...
READ MOREEvent-Driven PHP with ReactPHP: Promises
16 Jun 2017
Video Promises ReactPHP Promise Component The Basic Concepts A promise represents a value that is not yet known while a deferred represents work that is not yet finished. A promise is a placeholder for the initially unknown result of the...
READ MOREEvent-Driven PHP with ReactPHP: Streams
12 Jun 2017
Video Streams ReactPHP Stream Component In PHP streams represent a special resource type. The description given in php.net documentation: Streams are the way of generalizing file, network, data compression, and other operations which share a common set of functions and...
READ MOREEvent-Driven PHP with ReactPHP: Event Loop And Timers
06 Jun 2017
Video What is ReactPHP The Problem PHP was born in the 90s and was a very powerful tool for creating web pages. From its born it has a synchronous run-time, that means that we start execution of some function, and...
READ MORERECENT POSTS
- Myths About Asynchronous PHP: It Is Not Truly Asynchronous
- DriftPHP: Quick Start
- ReactPHP Internals: Event Loop Timers
- Interview with Marc Morera: About DriftPHP
- Introducing PHP-Watcher
- Live Reloading PHP Applications With Nodemon
- Building a RESTful API Using ReactPHP: JWT Authentication
- Building a RESTful API Using ReactPHP: Basic Authentication
- Building a RESTful API Using ReactPHP and MySQL
- How To Speed Up The Code Review
- Managing Concurrency: From Promises to Coroutines
- Fast Web Scraping With ReactPHP: Download All Images From a Website
- PHP Roundtable 76: Concurrency, Generators & Coroutines - Oh My!
- Fast Web Scraping With ReactPHP. Part 3: Using Proxy
- Sending Email Asynchronously With ReactPHP Child Processes
- Fast Web Scraping With ReactPHP. Part 2: Throttling Requests
- Using Router With ReactPHP Http Component
- Working With FileSystem In ReactPHP
- Amp Promises: From Generators To Coroutines
- Fast Web Scraping With ReactPHP