Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
High Performance with Laravel Octane

You're reading from   High Performance with Laravel Octane Learn to fine-tune and optimize PHP and Laravel apps using Octane and an asynchronous approach

Arrow left icon
Product type Paperback
Published in Jan 2023
Publisher Packt
ISBN-13 9781801819404
Length 204 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Roberto Butti Roberto Butti
Author Profile Icon Roberto Butti
Roberto Butti
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Part 1: The Architecture
2. Chapter 1: Understanding the Laravel Web Application Architecture FREE CHAPTER 3. Part 2: The Application Server
4. Chapter 2: Configuring the RoadRunner Application Server 5. Chapter 3: Configuring the Swoole Application Server 6. Part 3: Laravel Octane – a Complete Tour
7. Chapter 4: Building a Laravel Octane Application 8. Chapter 5: Reducing Latency and Managing Data with an Asynchronous Approach 9. Part 4: Speeding Up
10. Chapter 6: Using Queues to Apply the Asynchronous Approach in Your Application 11. Chapter 7: Configuring the Laravel Octane Application for the Production Environment 12. Index 13. Other Books You May Enjoy

Exploring the Laravel ecosystem

Laravel is a great framework in the PHP ecosystem that helps developers to build web applications quickly and reliably.

It includes, as dependencies, some great tools from the PHP ecosystem, such as Symfony packages, and some other solid and mature packages such as Monolog for logging, Flysystem for accessing files and storage, and CommonMark for managing Markdown format.

From the Symfony world, Laravel includes packages such as Symfony/routing to manage routing, and http-foundation and http-kernel to manage HTTP communication.

All this is just to say that Laravel uses the best parts of the PHP ecosystem, puts them together, and provides tools, helpers, classes, and methods to simplify the usage of all the tools from the developer’s perspective.

In addition, Laravel is more than a framework. Laravel is an ecosystem.

Laravel also provides applications and services that are integrated with the framework.

For example, Laravel provides the following:

  • Cashier: For integration with Stripe and Paddle for the payment and subscription process.
  • Breeze, Jetstream, Sanctum, and Socialite: For managing authorization, authentication, the social login integration process, and exposing protected APIs.
  • Dusk and Pest: For testing.
  • Echo: For broadcasting events in real time.
  • Envoyer, Forge, and Vapor: For server or serverless management and to manage the deployment process.
  • Mix: For compiling JavaScript and CSS through a webpack configuration fully integrated with the Laravel frontend.
  • Horizon: A web user interface for monitoring queues based on Redis.
  • Nova: An administrator panel builder for Laravel applications.
  • Sail: A local development environment based on Docker.
  • Scout: A full-text search engine, backed by providers such as Algolia, Meilisearch, or simply by the MySQL or PostgreSQL database.
  • Spark: A boilerplate solution for managing billing/subscription in your application.
  • Telescope: UI module for showing debugging and insights.
  • Valet: A macOS-specific bundle of applications configured for running the PHP application. It has dependencies with nginx, PHP, and Dnsmasq.
  • Octane: For improving performance and optimizing resources.

In this book, we will analyze the last tool in this list: Laravel Octane.

We will go over the use of other tools within the Laravel ecosystem, such as Sail (for simplifying the installation process of a complete development environment), and Valet (for correctly setting up the local environment to run a web server and PHP). Also, Laravel Octane depends on important software that we will see in-depth throughout the book. Laravel Octane has strong requirements: it requires additional software such as Swoole or RoadRunner.

But one step at a time.

Before we delve into the tools and their configuration, it’s important to understand some basic mechanisms for managing HTTP requests.

HTTP

HTTP is a protocol that defines rules, messages, and methods for fetching resources on the web, such as HTML documents (web pages) and assets. Clients (who require the resource) and servers (who serve the resource) communicate by exchanging messages. The client sends requests, and the server sends responses.

One of the goals of the book is to empower you to improve the performance of your web applications by doing different things, starting with designing the architecture of the application, choosing and using the right tools, writing code, and finally, releasing the application.

The tools we are going to analyze and use will do much of the work, but I think it is important to understand the underlying dynamics to have a good awareness of how the various tools work to enable you to configure, integrate, and use them to the best of their ability.

Before we get deeper into the workings of Laravel Octane, let me take you through how servers typically deal with HTTP requests by explaining the HTTP request lifecycle.

You have been reading a chapter from
High Performance with Laravel Octane
Published in: Jan 2023
Publisher: Packt
ISBN-13: 9781801819404
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image