Skip to content

Commit

Permalink
Swoole docs (#326)
Browse files Browse the repository at this point in the history
* add Swoole backend

* phpstan: ignore swoole

* feat: swoole process scheduler

* fix(swoole): redo tasks when hash collision happens

* chore(swoole): make sure coroutines are at the root of the scheduler

* chore(swoole): set affinity / bind worker to a specific CPU core

* chore(swoole): use igbinary if available

* fix: remove comment

* fix(swoole): worker cpu affinity

* fix(swoole): cpu num

* feat: scheduler improvements

* style

* chore(swoole): remove unnecessary atomics

* chore(swoole): php backwards compatibility

* fix: phpstan, socket message size

* fix: uncomment test

* style: composer fix

* docs: Swoole backend
  • Loading branch information
mcharytoniuk authored Mar 17, 2024
1 parent 0fa98ce commit 3a81ac2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/backends/swoole.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<span style="float:right;"><a href="https://github.com/RubixML/ML/blob/master/src/Backends/Swoole.php">[source]</a></span>

# Swoole
[Swoole](https://swoole.com)/[OpenSwoole](https://openswoole.com/) is an async PHP extension that also supports multiprocessing.

!!! tip
Swoole backend makes use of [Igbinary](https://www.php.net/manual/en/intro.igbinary.php) serializer. If you need to
optimize the memory usage (or getting out-of-memory errors) consider installing [Igbinary](https://www.php.net/manual/en/intro.igbinary.php).

## Example

No parameters are required. It's a drop-in replacement for the [Serial](backends/serial.md) backend.

```php
use Rubix\ML\Backends\Swoole;

$backend = new Swoole();
```

0 comments on commit 3a81ac2

Please sign in to comment.