This document provides an overview of a presentation on Laravel Octane given by Albert Chen. The presentation covered: the lifecycle of PHP and Laravel applications; an introduction to Laravel Octane and how it makes applications more friendly for long-lived processes; reminders for developing long-lived PHP applications; Laravel's service container and how containers work in Octane; how Octane supports concurrent tasks using Swoole; additional Octane features like tickers, caching, and process communication; blocking I/O in PHP and how coroutines work in Swoole; whether Octane supports coroutines; and a benchmark comparing Octane to PHP-FPM with Nginx. The document concludes with an
Event-Driven Messaging and Actions using Apache Flink and Apache NiFiDataWorks Summit
At Comcast, our team has been architecting a customer experience platform which is able to react to near-real-time events and interactions and deliver appropriate and timely communications to customers. By combining the low latency capabilities of Apache Flink and the dataflow capabilities of Apache NiFi we are able to process events at high volume to trigger, enrich, filter, and act/communicate to enhance customer experiences. Apache Flink and Apache NiFi complement each other with their strengths in event streaming and correlation, state management, command-and-control, parallelism, development methodology, and interoperability with surrounding technologies. We will trace our journey from starting with Apache NiFi over three years ago and our more recent introduction of Apache Flink into our platform stack to handle more complex scenarios. In this presentation we will compare and contrast which business and technical use cases are best suited to which platform and explore different ways to integrate the two platforms into a single solution.
Adrian Chlubek: Dowiemy się, czym jest Swoole, w jakim celu został stworzony i jakie funkcjonalności oferuje – wszystko to na żywych przykładach. Przede wszystkim jednak spróbujemy odpowiedzieć sobie na pytanie: czy używanie Swoole ma sens?
Repozytorium z przykładami: https://github.com/achlubek/swoole_experiments
Dokumentacja Swoole: https://www.swoole.co.uk/docs/
Event-Driven Messaging and Actions using Apache Flink and Apache NiFiDataWorks Summit
At Comcast, our team has been architecting a customer experience platform which is able to react to near-real-time events and interactions and deliver appropriate and timely communications to customers. By combining the low latency capabilities of Apache Flink and the dataflow capabilities of Apache NiFi we are able to process events at high volume to trigger, enrich, filter, and act/communicate to enhance customer experiences. Apache Flink and Apache NiFi complement each other with their strengths in event streaming and correlation, state management, command-and-control, parallelism, development methodology, and interoperability with surrounding technologies. We will trace our journey from starting with Apache NiFi over three years ago and our more recent introduction of Apache Flink into our platform stack to handle more complex scenarios. In this presentation we will compare and contrast which business and technical use cases are best suited to which platform and explore different ways to integrate the two platforms into a single solution.
Adrian Chlubek: Dowiemy się, czym jest Swoole, w jakim celu został stworzony i jakie funkcjonalności oferuje – wszystko to na żywych przykładach. Przede wszystkim jednak spróbujemy odpowiedzieć sobie na pytanie: czy używanie Swoole ma sens?
Repozytorium z przykładami: https://github.com/achlubek/swoole_experiments
Dokumentacja Swoole: https://www.swoole.co.uk/docs/
ZgPHP 97 - Microservice architecture in LaravelFrano Šašvari
We would like to present the challenges on which we encountered while we were developing microservice architecture in Laravel and also, to show you possible solutions such as: RPC style API, communication between microservices, validation, history, monitoring, integration tests.
Where is my bottleneck? Performance troubleshooting in FlinkFlink Forward
Flinkn Forward San Francisco 2022.
In this talk, we will cover various topics around performance issues that can arise when running a Flink job and how to troubleshoot them. We’ll start with the basics, like understanding what the job is doing and what backpressure is. Next, we will see how to identify bottlenecks and which tools or metrics can be helpful in the process. Finally, we will also discuss potential performance issues during the checkpointing or recovery process, as well as and some tips and Flink features that can speed up checkpointing and recovery times.
by
Piotr Nowojski
This slide deck Introduces Chef and its role in DevOps. The agenda of the deck is as follows:
- A Review of DevOps
- BMs Continuous Delivery solution
- Introduction to Chef
- Chef and Continuous Delivery
Read more on DevOps: http://sdarchitect.wordpress.com/understanding-devops/
This Edureka "Node.js Express tutorial" will help you to learn the Node.js express fundamentals with examples. Express.js is flexible and minimal node.js web application framework that provides robust set of features to develop mobile and web applications. It facilitates the rapid development of node.js applications. Below are the topics covered in this tutorial:
1) Why Express.js?
2) What is Express.js?
3) Express Installation
4) Express Routes
5) Express Middlewares
Our Sr. Web Operations Engineer, Justin Lintz, goes over some parameters we tuned in TCP and NGINX to improve the performance and stability of our systems. These slides are a complement to a two part blog post found over on our engineering blog.
http://engineering.chartbeat.com/2014/01/02/part-1-lessons-learned-tuning-tcp-and-nginx-in-ec2/
http://engineering.chartbeat.com/2014/02/12/part-2-lessons-learned-tuning-tcp-and-nginx-in-ec2/
This presentation was created as an introduction to the Apache NiFi project; to be followed by “Lab 0” of the “Realtime Event Processing in Hadoop with NiFi, Kafka and Storm” tutorial hosted here: http://hortonworks.com/hadoop-tutorial/realtime-event-processing-nifi-kafka-storm/#section_1
Stephan Ewen - Experiences running Flink at Very Large ScaleVerverica
This talk shares experiences from deploying and tuning Flink steam processing applications for very large scale. We share lessons learned from users, contributors, and our own experiments about running demanding streaming jobs at scale. The talk will explain what aspects currently render a job as particularly demanding, show how to configure and tune a large scale Flink job, and outline what the Flink community is working on to make the out-of-the-box for experience as smooth as possible. We will, for example, dive into - analyzing and tuning checkpointing - selecting and configuring state backends - understanding common bottlenecks - understanding and configuring network parameters
PHP Conference Japan 2019 Track6-5 Aurimas Niekis - How to Supercharge your PHP Web API
https://phpcon.php.gr.jp/2019/
https://www.youtube.com/watch?v=ZtTvUQCDDTM
ZgPHP 97 - Microservice architecture in LaravelFrano Šašvari
We would like to present the challenges on which we encountered while we were developing microservice architecture in Laravel and also, to show you possible solutions such as: RPC style API, communication between microservices, validation, history, monitoring, integration tests.
Where is my bottleneck? Performance troubleshooting in FlinkFlink Forward
Flinkn Forward San Francisco 2022.
In this talk, we will cover various topics around performance issues that can arise when running a Flink job and how to troubleshoot them. We’ll start with the basics, like understanding what the job is doing and what backpressure is. Next, we will see how to identify bottlenecks and which tools or metrics can be helpful in the process. Finally, we will also discuss potential performance issues during the checkpointing or recovery process, as well as and some tips and Flink features that can speed up checkpointing and recovery times.
by
Piotr Nowojski
This slide deck Introduces Chef and its role in DevOps. The agenda of the deck is as follows:
- A Review of DevOps
- BMs Continuous Delivery solution
- Introduction to Chef
- Chef and Continuous Delivery
Read more on DevOps: http://sdarchitect.wordpress.com/understanding-devops/
This Edureka "Node.js Express tutorial" will help you to learn the Node.js express fundamentals with examples. Express.js is flexible and minimal node.js web application framework that provides robust set of features to develop mobile and web applications. It facilitates the rapid development of node.js applications. Below are the topics covered in this tutorial:
1) Why Express.js?
2) What is Express.js?
3) Express Installation
4) Express Routes
5) Express Middlewares
Our Sr. Web Operations Engineer, Justin Lintz, goes over some parameters we tuned in TCP and NGINX to improve the performance and stability of our systems. These slides are a complement to a two part blog post found over on our engineering blog.
http://engineering.chartbeat.com/2014/01/02/part-1-lessons-learned-tuning-tcp-and-nginx-in-ec2/
http://engineering.chartbeat.com/2014/02/12/part-2-lessons-learned-tuning-tcp-and-nginx-in-ec2/
This presentation was created as an introduction to the Apache NiFi project; to be followed by “Lab 0” of the “Realtime Event Processing in Hadoop with NiFi, Kafka and Storm” tutorial hosted here: http://hortonworks.com/hadoop-tutorial/realtime-event-processing-nifi-kafka-storm/#section_1
Stephan Ewen - Experiences running Flink at Very Large ScaleVerverica
This talk shares experiences from deploying and tuning Flink steam processing applications for very large scale. We share lessons learned from users, contributors, and our own experiments about running demanding streaming jobs at scale. The talk will explain what aspects currently render a job as particularly demanding, show how to configure and tune a large scale Flink job, and outline what the Flink community is working on to make the out-of-the-box for experience as smooth as possible. We will, for example, dive into - analyzing and tuning checkpointing - selecting and configuring state backends - understanding common bottlenecks - understanding and configuring network parameters
PHP Conference Japan 2019 Track6-5 Aurimas Niekis - How to Supercharge your PHP Web API
https://phpcon.php.gr.jp/2019/
https://www.youtube.com/watch?v=ZtTvUQCDDTM
In the context of parallel computing, Load Balancing is the distribution of a set of tasks over different computing units (or related resources), to make the overall process easier to execute and much more efficient. Ensuring no single server bears too much of demand and evenly spreading the load, it improves the responsiveness and availability of applications or websites for the user.
Provisioning Oracle Fusion Middleware Environments with Chef and PuppetEdwin Biemond
Provisioning Oracle Fusion Middleware Environments with Chef and Puppet
This session presents case studies and experiences involving automated provisioning of Oracle Fusion Middleware environments with the popular DevOps tools Chef and Puppet. In addition, it discusses experiences in orchestrating multinode environments with these tools, together with others such as MCollective and some custom-built tooling. The presentation also covers issues such as installing, creating domains, patching, configuring resources such as JDBC, and deploying applications. It also spends a little time on how this provisioning can contribute to building an environment for cloud-based automated acceptance testing.
Applications increasingly talk to each other behind the scenes via APIs. Google’s recent acquisition of Apigee, an API management company, is an indicator of the continued importance of APIs. APIs are like building blocks, providing services and data that can be connected with other APIs to build powerful customized apps. However, developing and testing an API can be challenging because there is no built-in interface, breaking changes can cause widespread outages, sensitive data may be exposed or accessed, and accepted agile testing paradigms can be difficult to adapt to APIs. This session is an introduction to restful APIs and how to test them for security, performance, functionality, and backwards-compatibility risks.
Push jobs: an orchestration building block for private ChefChef Software, Inc.
Push jobs is a new feature in Opscode Private Chef that will allow a user to run commands across hundreds of chef managed servers. Push Jobs leverages Erlang/OTP and ZeroMQ to provide scalable and fault tolerant execution.
In this talk I’ll cover the general motivation behind the design and an architectural overview of the system. This will include details of we used Erlang and ZeroMQ to build a robust, scalable system. I’ll also do a demo of the push job feature in action, covering the push jobs server, execution client and knife command line interface.
Threading Made Easy! A Busy Developer’s Guide to Kotlin CoroutinesLauren Yew
Kotlin Coroutines is a powerful threading library for Kotlin, released by JetBrains in 2018. At The New York Times, we recently migrated our core libraries and parts of our News app from RxJava to Kotlin Coroutines. In this talk we’ll share lessons learned and best practices to understand, migrate to, and use Kotlin Coroutines & Flows.
In this presentation, you will learn:
What Coroutines are and how they function
How to use Kotlin Coroutines & Flows (with real world examples and demos)
Where and why you should use Coroutines & Flows in your app
How to avoid the pitfalls of Coroutines
Kotlin Coroutines vs. RxJava
Lessons learned from migrating to Kotlin Coroutines from RxJava in large legacy projects & libraries
By the end of this talk, you will be able to apply Kotlin Coroutines to your own app, run the provided sample code yourself, and convince your team to give Kotlin Coroutines a try!
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...Flink Forward
In this session, we will look at how Apache Flink can be used to stream anonymized API request and response data from a production environment to make sure staging environments are up-to-date and reflect the most recent features (and bugs) that comprise a service. The talk will also examine how to deal with issues of data retention, throttling, and persistence, finishing with recommendations for how to use these sandbox environments to rapidly prototype and test new features and fixes.
Training Slides: 205 - Installing and Configuring Tungsten DashboardContinuent
This training session introduces Tungsten Dashboard from installation to configuration in a demo type format. Tungsten Dashboard is the ideal tool for cluster maintenance and this training demonstrates how.
TOPICS COVERED
- Present the Dashboard
- Cluster Maintenance with the Dashboard
- How to Install the dashboard
"WTF is Twisted? (or; owl amongst the ponies)" is a talk that introduces the Twisted asynchronous programming framework, how it works, and what uses it.
WebSocket in Enterprise Applications 2015Pavel Bucek
Presentation from JavaOne 2015.
This session, which covers use cases of JSR 356 (Java API for WebSocket) and some features of Oracle’s implementation related to enterprise applications, contains description of standard use cases and recommends optimizations and best practices for using the JSR 356 API. After that, it presents more-complex schemes involving authentication support, fallback support, and clustering.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
3. Outline
• Lifecycle in PHP and Laravel
• Introduction of Octane
• Reminders in Long-Lived PHP
• Service Container
• Concurrent Tasks
• Other Features in Octane
• Blocking I/O in PHP
• Coroutine
• Benchmark
• Q&A
8. Lifecycle in Laravel
Autoload Load App Bootstrap
Register
Service
Providers
Boot
Service
Providers
Http
Kernel
Middleware
Dispatch
by Router
Routes
Match
Controller
Response
Terminate
Middleware
Request
public/
index.php
9. How many files are required for one
request in Laravel?
426
get_included_files()
In Laravel 8.52
10. Stateless PHP
• How do we serve PHP today?
• PHP-FPM
• mod_php for Apache
• Both patterns are all stateless
11. Stateless PHP
• Pros
• Easy scaling
• Simple, less risk causing memory leaks
• Cons
• States can't be shared between requests
• States must rely on external storages
• Resources can't be reused e
ffi
ciently
• Connection cost is expensive (like database)
• Not good for high performance
13. Laravel Octane
• Published in April 2021
• Maintained by o
ffi
cial Laravel team
• Supports Swoole and Roadrunner
• Requires Laravel 8 and PHP 8
• Becoming more friendly in long-lived app
• Hot reload support
• Brings additional features
14. What is RoadRunner?
• Built with Golang
• A replacement for web server and PHP-FPM
• Works on both Linux and Windows
• HTTPS and HTTP/2 support (including HTTP/2 Push, H2C)
• No external PHP dependencies
16. What is Swoole?
• A C extension for PHP
• An asynchronous network engine for PHP
• Features:
• Event-driven non-blocking I/O
• HTTP / HTTP2 / Websocket / TCP / UDP
• Coroutine (CSP Model)
• Excellent performance for high concurrency
20. Reminders in Long-Lived PHP
• Global States Pollution
• Global states will be shared in
di
ff
erent requests.
• Use global variables carefully
unless you know what you’re
doing in long-lived PHP.
• You need to reset these states in
the beginning of request if you
don’t want to share them.
25. Laravel’s Service Container
protected static $app;
protected static
$resolvedInstance;
Facades
Service Container
• $app->singleton(‘event’, …)
• $app->singleton(‘db’, …)
• $app->singleton(‘auth’, …)
Service Provider
event db auth
26. Containers in Octane
• Warm Up Initial Container
Container
Auth Cache Con
fi
g Cookie
DB Encrypt Files Hash
Log Router Routes Session
Trans Url View
Default Services
Register
33. • PHP’s Blocking I/O Model
Concurrent Tasks
Process Send API A Send API B Query DB A Query DB B
50ms 50ms 20ms 20ms
140ms in total
Request
34. Concurrent Tasks
• PHP’s Blocking I/O Model
Process
50ms
Child
Child
Child
Child
Fork
Return
Send API request A
Query DB A
Query DB B
50ms
Send API request A
20ms
20ms
Request
35. Concurrent Tasks
• Concurrent Tasks in Octane (Swoole Only)
Process
Task Worker
Dispatch Task Worker
Task Worker
Task Worker
Workers Pool
Send API request A
Send API request B
Query DB A
Query DB B
Return
Request
38. • Ticker
• You can set a timer to execute periodic tasks
(e.g. Report your server states every 10 seconds)
Other Features in Octane
39. • Cache & Table
• High performance swoole table driver shared by di
ff
erent
workers without external storage
Other Features in Octane
40. • Cache & Table
• High performance swoole table driver shared by di
ff
erent
workers without external storage
Other Features in Octane
41. • What will this counter number be?
Process Communication
1
2
3
1
4
1
42. • Each worker has its own memory space
Process Communication
Worker
Memory
Worker
Memory
Worker
Memory
Worker
Memory
43. • Use Swoole Table for Sharing Data
Process Communication
Worker
Memory
Worker
Memory
Worker
Memory
Worker
Memory
Swoole Table
44. Blocking I/O in PHP
• PHP is originally created as glue layer to call C functions
• The I/O model is blocking by default
• Almost all client-side libraries involving I/O are blocking
• Multiple process for handling blocking I/O
• I/O bound concurrency depends on process number
• Cost for context switch in processes is expensive
45. Blocking I/O in PHP
• Resource can't be reused
• I/O requests are blocking
• 80% time cost on blocking I/O
46. Concurrency Problem
• 100 requests at the same time need 100 processes
• 100 connections will be established as well
• Scale to increase concurrency
54. • Does Octane support coroutine?
Coroutine in Octane
Coroutine A
Coroutine B
Coroutine C
Process
Request
Request
Request
Yield & Resume
55. • Does Octane support coroutine?
Coroutine in Octane
Coroutine A
Coroutine B
Coroutine C
Process
Request
Request
Request
Yield & Resume
ContainerA
ContainerB
ContainerC
Container ???
56. • Does Octane support coroutine?
Coroutine in Octane
59. • Concurrent Tasks in Coroutine
Coroutine in Octane
Process
Coroutine A
Yield & Resume
Coroutine B
Coroutine C
Coroutine D
Send API request A
Send API request B
Query DB A
Query DB B
Request
max_concurrency=1
60. • Concurrent Tasks in Coroutine
• Connection pool support for database
• No global variable modi
fi
cations in coroutines
• Only one request in one worker at the same time
• Still not e
ff
ective enough unless container supports
coroutine
Coroutine in Octane