PHP Training – Scalability and Asynchronous Processing

Level

Advanced

Duration

16h / 2 days

Date

Individually arranged

Price

Individually arranged

PHP Training – Scalability and Asynchronous Processing

This workshop teaches participants how to move operations outside the request lifecycle — from a synchronous monolith to an asynchronous system based on message queues. Participants start with an application where “everything happens within the request” (emails, PDF generation, status updates) and gradually introduce Symfony Messenger, workers, and queues. Each stage addresses a real-world problem: slow requests → duplicate messages → data inconsistency → different read and write requirements. The workshop concludes with a working system featuring asynchronous processing, idempotent code, and lite CQRS — patterns that can be applied both in a modular monolith and in a microservices architecture.

Who is this training for?
  • logo infoshare Graduates of the PHP Architecture training path who want to introduce asynchronous processing into their applications
  • logo infoshare PHP developers working with applications where requests take too long due to synchronous operations
  • logo infoshare Developers who have heard about message queues and CQRS but do not know how to approach them pragmatically
  • logo infoshare Teams planning a migration from a synchronous architecture to an asynchronous one

Requirements

  • PHP 8.3+: modular monolith, bounded contexts, public module APIs
  • Domain events — Symfony EventDispatcher
  • PHPUnit testing: unit and integration tests
  • Docker and Composer

What will you learn?

  • Symfony Messenger — configuration, transports, handlers, and workers
  • Moving request-blocking operations to asynchronous queues
  • Designing idempotent handlers for safe duplicate message processing
  • Eventual consistency — understanding and handling temporary data inconsistency
  • Designing multi-step processes (Saga) — coordinating order → payment → shipping
  • Lite CQRS — separating read and write models without event sourcingLite CQRS — separating read and write models without event sourcing
  • Asynchronously synchronizing read models using Messenger
  • Retries, dead-letter queues, and error handling in asynchronous processes

Training Program

Day 1

Stage 1: Symfony Messenger — Message Queues

  • Problem: the request takes 5 seconds — why, and what can we do about it?
  • Symfony Messenger — configuration, RabbitMQ transport (AMQP), messages, and handlers
  • Hands-on: sending emails and generating PDFs using asynchronous handlers
  • Worker — running and monitoring workers, Supervisor in Docker
  • RabbitMQ Management UI — inspecting queues, messages, and worker status
  • Retry and dead-letter queues — what happens when a handler fails?

Outcome: Request-blocking operations are moved to workers, making the request fast.

Stage 2: Idempotency

  • Problem: a worker processes a message twice — the customer receives two emails
  • Why duplicates happen — at-least-once delivery, network failures, and worker restarts
  • Idempotent handlers — designing handlers that are safe to execute multiple times
  • Patterns: idempotency keys, deduplication, upsert instead of insert
  • Hands-on: protecting the handlers from Stage 1 against duplicate processing

Outcome: Participants understand at-least-once delivery and can write idempotent handlers.

Day 2

Stage 3: Eventual Consistency

  • Problem: an order has been placed, but inventory has not yet been updated
  • Synchronous vs. asynchronous processing — architectural consequences
  • Eventual consistency — data will become consistent, but not immediately
  • Events as facts vs. commands as intentions
  • Saga / Process Manager — concept and demonstration of coordinating the order → payment → shipping process
  • Compensation instead of rollback — handling failures in asynchronous processes

Outcome: Participants understand the trade-offs of asynchronous processing and can design multi-step processes.

Stage 4: Lite CQRS and Summary

  • Problem: listings require joins across five tables, while writes affect only one — why treat them the same way?
  • Lite CQRS — separating the read and write models (without event sourcing)
  • Write model — aggregates, validation, and business rules
  • Read model — denormalized projections optimized for reads
  • Asynchronous read model synchronization through Messenger — bringing together all the workshop topics
  • Hands-on: implementing an order listing as an asynchronously updated read model
  • When not to use CQRS — simple CRUD applications do not need separate models
  • Retrospective — reviewing the evolution from a synchronous monolith to an asynchronous system

Outcome: Participants gain a complete picture of the progression: queues → idempotency → eventual consistency → lite CQRS.

Contact us

we will organize training for you tailored to your needs

Przemysław Wołosz

Key Account Manager

przemyslaw.wolosz@infoShareAcademy.com

Error: Contact form not found.