/plushcap/analysis/vonage/vonage-asyncronous-php-with-revoltphp-vonage-voice-api

Asynchronous PHP With Revoltphp & Vonage Voice API

What's this blog post about?

The text discusses asynchronous PHP programming using fibers, introduced in PHP 8.1. It highlights the benefits of using fibers for non-blocking I/O operations and showcases an example project called RevoltPhp that demonstrates how to use RevoltPhp's Event Loop to execute asynchronous code. The project uses Vonage's Voice API to send outbound calls to a large number of phone numbers, simulating an emergency scenario where park employees need to be notified quickly. The code uses PHP 8.1, Slim Framework, ngrok, and RevoltPhp to create a secure tunnel for the calls and handle the incoming webhooks from Vonage. The project demonstrates how fibers can be used to execute asynchronous code without relying on traditional synchronous operations or external libraries like Laravel Job/Queue worker or Serverless architectures.

Company
Vonage

Date published
Nov. 8, 2021

Author(s)
James Seconde

Word count
2227

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.