php reactphp,ReactPHP: ReactPHP is a low-level library for event-driven programming in PHP.

reactphp-logo.svg

Event-driven, non-blocking I/O with PHP.

badge.svg

ReactPHP is a low-level library for event-driven programming in PHP. At its core

is an event loop, on top of which it provides low-level utilities, such as:

Streams abstraction, async DNS resolver, network client/server, HTTP

client/server and interaction with processes. Third-party libraries can use these

components to create async network clients/servers and more.

ReactPHP is production ready and battle-tested with millions of installations

from all kinds of projects around the world. Its event-driven architecture makes

it a perfect fit for efficient network servers and clients handling hundreds or

thousands of concurrent connections, long-running applications and many other

forms of cooperative multitasking with non-blocking I/O operations. What makes

ReactPHP special is its vivid ecosystem with hundreds of third-party libraries

allowing you to integrate with many existing systems, such as common network

services, database systems and other third-party APIs.

Production ready and battle-tested.

Rock-solid with stable long-term support (LTS) releases.

Requires no extensions and runs on any platform - no excuses!

Takes advantage of optional extensions to get better performance when available.

Highly recommends latest version of PHP 7+ for best performance and support.

Supports legacy PHP 5.3+ and HHVM for maximum compatibility.

Well designed and reusable components.

Decoupled parts so they can be replaced by alternate implementations.

Carefully tested (unit & functional).

Promotes standard PSRs where possible for maximum interoperability.

Aims to be technology neutral, so you can use your preferred application stack.

Small core team of professionals supported by large network of outside contributors.

ReactPHP is non-blocking by default. Use workers for blocking I/O.

The event loop is based on the reactor pattern (hence the name) and strongly

inspired by libraries such as EventMachine (Ruby), Twisted (Python) and

Node.js (V8).

This repository you're currently looking at is mostly used as a meta

repository to discuss and plan all things @ReactPHP. See the individual

components linked below for more details about each component, its

documentation and source code.

Core Components

EventLoop

ReactPHP's core reactor event-loop.

Read the documentation

Stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP.

Read the documentation

Promise

Promises/A implementation for PHP.

Read the documentation

Network Components

Socket

Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP.

Read the documentation

Datagram

Event-driven UDP client and server sockets for ReactPHP.

Read the documentation

Protocol Components

HTTP

Event-driven, streaming plaintext HTTP and secure HTTPS server for ReactPHP.

Read the documentation

HTTPClient

Event-driven, streaming HTTP client for ReactPHP.

Read the documentation

DNS

Async DNS resolver for ReactPHP.

Read the documentation

Utility Components

Cache

Async caching for ReactPHP.

Read the documentation

ChildProcess

Library for executing child processes.

Read the documentation

PromiseTimer

Trivial timeout implementation for ReactPHP's Promise lib.

Read the documentation

PromiseStream

The missing link between Promise-land and Stream-land, built on top of ReactPHP.

Read the documentation

Built with ReactPHP

Thruway

PHP Client and Router Library for Autobahn and WAMP (Web Application Messaging

Protocol) for Real-Time Application Messaging

voryx/Thruway

PPM - PHP Process Manager

PPM is a process manager, supercharger and load balancer for modern PHP

applications.

php-pm/php-pm

php-ar-drone

🚁 Port of node-ar-drone which allows user to control a Parrot AR Drone over

PHP

jolicode/php-ar-drone

Ratchet

Asynchronous WebSocket server

ratchetphp/Ratchet

Predis\Async

Asynchronous PHP client library for Redis built on top of ReactPHP

nrk/predis-async

clue/redis-server

A Redis server implementation in pure PHP

clue/redis-server

Articles

Sergey Zhuk

A series of articles covering ReactPHP: from the basics to the real

application examples.

sergeyzhuk.me

Cees-Jan Kiewiet

Blog series about several ReactPHP components and how they work.

blog.wyrihaximus.net

Loïc Faugeron

Super Speed Symfony - ReactPHP.

gnugat.github.io

Marc J. Schmidt

Bring High Performance Into Your PHP App (with ReactPHP).

marcjschmidt.de

Marc Morera

When ReactPHP meet Symfony

medium.com/@apisearch

Talks

Getting started

ReactPHP consists of a set of individual components.

This means that instead of installing something like a "ReactPHP framework", you actually

pick only the components that you need.

This project follows SemVer for all its stable components.

The recommended way to install these components is through Composer.

New to Composer?

For example, this may look something like this:

# recommended install: pick required components

$composer require react/event-loop react/http

As an alternative, we also provide a meta package that will install all stable

components at once. Installing this is only recommended for quick prototyping,

as the list of stable components may change over time. This meta package can be

installed like this:

# quick protoyping only: install all stable components

$composer require react/react:^1.1

For more details, check out ReactPHP's homepage for

quickstart examples and usage details.

See also the combined changelog for all ReactPHP components

for details about version upgrades.

Support

Do you have a question and need help with ReactPHP? Don't worry, we're here to help!

As a first step, check the elaborate documentation that comes with each

component (see links to individual documentation for each component above).

If you find your question is not answered within the documentation, there's a

fair chance that it may be relevant to more people. Please do not hesitate to

file your question as an issue in the relevant component so others can also

participate.

You can also check out our official Gitter chat room.

Most of the people involved in this project are available in this chat room, so many

questions get answered in a few minutes to some hours. We also use this chat room

to announce all new releases and ongoing development efforts, so consider

staying in this chat room for a little longer.

Also follow @reactphp on Twitter for updates.

We use this mostly for noteworthy, bigger updates and to keep the community

updated about ongoing development efforts. You can always use the #reactphp

hashtag if you have anything to share!

We're a very open project and we prefer public communication whenever possible,

so that more people can participate and help getting the best solutions available.

At the same time, we realize that some things are better addressed in private.

Whether you just want to say thank you, want to report a security issue or

want to help sponsor a certain feature development, you can reach out to the

core team in private by sending an email to support@reactphp.org. Please keep in

mind that we're a small team of volunteers and do our best to support anybody

reaching out.

Do you want to support ReactPHP? Awesome! Let's start with letting the the world

know why you think ReactPHP is awesome and try to help others getting on board!

Send a tweet, write a blog post, give a talk at your local user group or

conference or even write a book. There are many ways you can help. You can

always reach out to us in private and help others in our support channels.

Thank you!

Tests

To run the test suite, you first need to clone this repo and then install all

dependencies through Composer:

$composer install

To run the test suite, go to the project root and run:

$php vendor/bin/phpunit

The test suite also contains a number of functional integration tests that rely

on a stable internet connection. Due to the vast number of integration tests,

these are skipped by default during CI runs. If you also do not want to run these,

they can simply be skipped like this:

$php vendor/bin/phpunit --exclude-group internet

License

MIT, see LICENSE.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可执行UML(Executable UML)是一种基于模型驱动架构(Model-Driven Architecture,MDA)的建模方法。MDA是一种软件开发方法论,强调将系统设计和实现的过程建立在模型之上。与传统的编码开发相比,MDA通过使用可执行UML实现了更高层次的自动化。 可执行UML提供了一种更具体和精确的UML语言扩展,可以用于描述系统的行为和交互。这种扩展允许开发人员将UML模型和代码直接关联起来,并通过模型转换和代码生成实现系统的自动生成。通过将模型与代码保持同步,可执行UML提供了一种可追踪性和可验证性的方式,以确保模型和实际代码保持一致。 可执行UML还提供了一个基于模型的执行环境,使开发人员能够在模型级别上进行实时的系统调试和测试。这种模型驱动的调试和测试方法使开发人员能够更早地发现和解决系统中的问题,减少了传统开发方法中的迭代和修复成本。 通过使用可执行UML,开发人员可以更好地理解和控制系统的复杂性。它提供了一个统一的模型化语言,使得不同团队之间的交流更加顺畅。此外,可执行UML还提供了一种将业务流程和系统需求直接转化为可执行代码的方法,从而更加直观地与业务逻辑进行对应和验证。 总而言之,可执行UML作为模型驱动架构的基础,通过提供更具体的模型语言扩展、模型与代码的自动生成以及模型级别的调试和测试环境,提供了一种更高效和可靠的软件开发方法。它使得开发人员能够更好地理解和控制系统的复杂性,并以更精确的方式与业务需求对接。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值