From 24a6e2b9175cf9bd7727c38c0f67d42cd2ac8e39 Mon Sep 17 00:00:00 2001 From: matyo91 Date: Sun, 17 Sep 2023 18:26:37 +0000 Subject: [PATCH] deploy: 3194ac945acb408c1924283b2950531d93cdcafb --- docs/getting-started/changelog/index.html | 4 ++-- docs/getting-started/driver/index.html | 10 ++++++---- docs/getting-started/flow/index.html | 4 ++-- docs/getting-started/index.html | 2 +- docs/getting-started/index.xml | 8 +++----- docs/getting-started/introduction/index.html | 4 ++-- docs/getting-started/ip-strategy/index.html | 4 ++-- docs/getting-started/license/index.html | 6 +++--- docs/getting-started/ressources/index.html | 10 ++++++++-- docs/index.html | 2 +- index.html | 2 +- ...7d92da689c569ec168202fb9818bbdf6f69ef0e9059e4e93.js | 1 + ...acb8717fdc1717676515d56f1d6a70e91e379acf84879b8d.js | 1 - 13 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 index.min.30a02c1fd697b5a1fd3a02af6ec56bf4b7510d72941b30dd07d63731c270c203e891dd504255c2457d92da689c569ec168202fb9818bbdf6f69ef0e9059e4e93.js delete mode 100644 index.min.b95b4099bb6a0c1297d6bcf06fe6c231a920fe2f3e652908b1cb844c845cacb84feee2bf875e2fbaacb8717fdc1717676515d56f1d6a70e91e379acf84879b8d.js diff --git a/docs/getting-started/changelog/index.html b/docs/getting-started/changelog/index.html index f3cb2576..da8b4f77 100644 --- a/docs/getting-started/changelog/index.html +++ b/docs/getting-started/changelog/index.html @@ -2,8 +2,8 @@
+Getting Started

Changelog

Changelog can be found https://github.com/darkwood-fr/flow/blob/1.x/CHANGELOG.md

Edit this page on GitHub

- + \ No newline at end of file diff --git a/docs/getting-started/driver/index.html b/docs/getting-started/driver/index.html index b142a212..1d447ec7 100644 --- a/docs/getting-started/driver/index.html +++ b/docs/getting-started/driver/index.html @@ -2,11 +2,13 @@

Driver

Flow embark multiple drivers.

Coroutine

Drivers are useful to essentially provide asynchronous programming by using coroutines.
Thus, this can be implemented in severals ways in most popular programming languages.

Coroutine are very similar to threads and provide concurrency but not parallelism.
Advantage of using coroutine :

  • this can be a preferred usage to thread for hard-realtime context.
  • there is no need for synchronisation primitives such as mutexes, semaphore.
  • it reduces the usage of system lock for sharing resources.

Amp Driver

To use Amp Driver, you have to require the library with composer

composer require amphp/amp
+Getting Started

Driver

Flow embark multiple drivers.

Coroutine

Drivers are useful to essentially provide asynchronous programming by using coroutines.
Thus, this can be implemented in severals ways in most popular programming languages.

Coroutine are very similar to threads and provide concurrency but not parallelism.
Advantage of using coroutine :

  • this can be a preferred usage to thread for hard-realtime context.
  • there is no need for synchronisation primitives such as mutexes, semaphore.
  • it reduces the usage of system lock for sharing resources.

Amp Driver

To use Amp Driver, you have to require the library with composer

composer require amphp/amp
 

More documentation can be found https://amphp.org

Fiber Driver

More documentation can be found https://www.php.net/manual/fr/language.fibers.php

ReactPHP Driver

To use ReactPHP Driver, you have to require the library with composer

composer require react/async
-

More documentation can be found https://reactphp.org

Swoole Driver

To use Swoole Driver, you have to add the extension with your current running PHP

pecl install openswoole-22.0.0
-

More documentation can be found https://openswoole.com

Make your custom driver

You can make your custom driver by implementing Flow\DriverInterface

Edit this page on GitHub

+

More documentation can be found https://reactphp.org

Revolt Driver

To use Revolt Driver, you have to require the library with composer

composer require revolt/event-loop
+

More documentation can be found https://revolt.run

Spatie Driver

To use Spatie Driver, you have to require the library with composer

composer require spatie/async
+

More documentation can be found https://github.com/spatie/async

Swoole Driver

To use Swoole Driver, you have to add the extension with your current running PHP

pecl install openswoole-22.0.0
+

More documentation can be found https://openswoole.com

Make your custom driver

You can make your custom driver by implementing Flow\DriverInterface

Edit this page on GitHub

← Flow
Ip Strategy →
- + \ No newline at end of file diff --git a/docs/getting-started/flow/index.html b/docs/getting-started/flow/index.html index 38107a5e..08667d30 100644 --- a/docs/getting-started/flow/index.html +++ b/docs/getting-started/flow/index.html @@ -2,8 +2,8 @@

Flow

Flow implementation

According to Wikipedia, Monads is an abstract generic structure that get its usage in function composition. Monads can shortly considered as Programming with effects.

We consider Flows as a set of elements in our ensemble as a Monad implementation :

  • By using job as basic function type within the Flow.
  • By using fn as a binary operation, Flow can be composed together with others Flow element.

A Flow can process one or many Ips which has its application for asynchronous programming when mixing with Drivers.

Flow

This is the standard Flow implementation that support asynchronous Ip processing.

FlowDecorator

This is useful for implementing the decorator design pattern.

TransportFlow

TransportFlow will interact with Flow with Producer and Sender.

YFlow

YFlow use YCombinator to provide recursion.

Make your own Flow

You can make your custom Flow by implementing Flow\FlowInterface.

Edit this page on GitHub

+Getting Started

Flow

Flow implementation

According to Wikipedia, Monads is an abstract generic structure that get its usage in function composition. Monads can shortly considered as Programming with effects.

We consider Flows as a set of elements in our ensemble as a Monad implementation :

A Flow can process one or many Ips which has its application for asynchronous programming when mixing with Drivers.

Flow

This is the standard Flow implementation that support asynchronous Ip processing.

FlowDecorator

This is useful for implementing the decorator design pattern.

TransportFlow

TransportFlow will interact with Flow with Producer and Sender.

YFlow

YFlow use YCombinator to provide recursion.

Make your own Flow

You can make your custom Flow by implementing Flow\FlowInterface.

Edit this page on GitHub

- + \ No newline at end of file diff --git a/docs/getting-started/index.html b/docs/getting-started/index.html index ccec5ea4..129a9964 100644 --- a/docs/getting-started/index.html +++ b/docs/getting-started/index.html @@ -4,5 +4,5 @@ Getting Started
- + \ No newline at end of file diff --git a/docs/getting-started/index.xml b/docs/getting-started/index.xml index 474feaa4..da88b1e4 100644 --- a/docs/getting-started/index.xml +++ b/docs/getting-started/index.xml @@ -12,9 +12,7 @@ Advantage of using coroutine : this can be a preferred usage to thread for hard-realtime context. there is no need for synchronisation primitives such as mutexes, semaphore. it reduces the usage of system lock for sharing resources.Ip Strategyhttps://darkwood-fr.github.io/flow/docs/getting-started/ip-strategy/Tue, 13 Oct 2020 15:21:01 +0200https://darkwood-fr.github.io/flow/docs/getting-started/ip-strategy/Ip Strategy When processing Flow with one or multiple Ips, you can choose a strategy that will sequence the order of processing Ip. LinearIpStrategy This process Ip by order : first in, first out. StackIpStrategy This process Ip as a stack order : push ip to the top of the stack, then order ip retrieval from the top stack to bottom. -MaxIpStrategy This process Ip as soon less Ip are currently process than the current max.Ressourceshttps://darkwood-fr.github.io/flow/docs/getting-started/ressources/Tue, 13 Oct 2020 15:21:01 +0200https://darkwood-fr.github.io/flow/docs/getting-started/ressources/More information about the code Article of this project : https://blog.darkwood.fr/article/php-railway-flow-based-programming -Slides of this project : https://speakerdeck.com/matyo91/php-railway-flow-based-programming -Video of this project : https://www.youtube.com/watch?v=mxxdhGsaIjY -Railway Flow Based Programming with Elixir from Anton Mishchuk Presentation in an article : https://anton-mishchuk.medium.com/railway-flow-based-programming-with-flowex-ef04fd338e41 Presentation with video : https://www.youtube.com/watch?v=TLvbP8bt2HA Advanced implementation with multiple programming languages : https://medium.com/@anton.mishchuk/multi-language-flowex-components-fdda11d34744 Presentation in an article : https://fr.slideshare.net/AntonMishchuk/multilanguage-fbp-with-flowex Implementation in Elixir : https://github.com/antonmi/flowex Implementation in Elixir with multiple programming languages : https://github.Changeloghttps://darkwood-fr.github.io/flow/docs/getting-started/changelog/Tue, 13 Oct 2020 15:21:01 +0200https://darkwood-fr.github.io/flow/docs/getting-started/changelog/Changelog can be found https://github.com/darkwood-fr/flow/blob/1.x/CHANGELOG.mdLicensehttps://darkwood-fr.github.io/flow/docs/getting-started/license/Tue, 13 Oct 2020 15:21:01 +0200https://darkwood-fr.github.io/flow/docs/getting-started/license/The MIT License (MIT) -Copyright (c) 2022 Mathieu Ledru mathieu@darkwood.fr +MaxIpStrategy This process Ip as soon less Ip are currently process than the current max.Ressourceshttps://darkwood-fr.github.io/flow/docs/getting-started/ressources/Tue, 13 Oct 2020 15:21:01 +0200https://darkwood-fr.github.io/flow/docs/getting-started/ressources/More information about the code Article of this project : https://blog.darkwood.fr/article/php-railway-flow-based-programming Slides of this project : https://speakerdeck.com/matyo91/php-railway-flow-based-programming Video of this project : https://www.youtube.com/watch?v=mxxdhGsaIjY +Railway Flow Based Programming with Elixir from Anton Mishchuk Presentation in an article : https://anton-mishchuk.medium.com/railway-flow-based-programming-with-flowex-ef04fd338e41 Presentation with video : https://www.youtube.com/watch?v=TLvbP8bt2HA Advanced implementation with multiple programming languages : https://medium.com/@anton.mishchuk/multi-language-flowex-components-fdda11d34744 Presentation in an article : https://fr.slideshare.net/AntonMishchuk/multilanguage-fbp-with-flowex Implementation in Elixir : https://github.com/antonmi/flowex Implementation in Elixir with multiple programming languages : https://github.Changeloghttps://darkwood-fr.github.io/flow/docs/getting-started/changelog/Tue, 13 Oct 2020 15:21:01 +0200https://darkwood-fr.github.io/flow/docs/getting-started/changelog/Changelog Changelog can be found https://github.com/darkwood-fr/flow/blob/1.x/CHANGELOG.mdLicensehttps://darkwood-fr.github.io/flow/docs/getting-started/license/Tue, 13 Oct 2020 15:21:01 +0200https://darkwood-fr.github.io/flow/docs/getting-started/license/The MIT License (MIT) +Copyright (c) 2023 Darkwood Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: \ No newline at end of file diff --git a/docs/getting-started/introduction/index.html b/docs/getting-started/introduction/index.html index ed0294b8..b4d7d2bd 100644 --- a/docs/getting-started/introduction/index.html +++ b/docs/getting-started/introduction/index.html @@ -3,8 +3,8 @@

Flow

Why ?

Flow concept aims to solve

  • Adopt asynchronous as native implementation
  • Build your code with functional programming and monoids
  • Assemble your code visually

Installation

PHP 8.2 is the minimal version to use Flow
The recommended way to install it through Composer and execute

composer require darkwood/flow
-

Usage

A working script is available in the bundled examples directory

  • Run Flow : php examples/flow.php
  • Start Server : php examples/server.php
  • Start Client(s) : php examples/client.php

Messaging part require to install Docker and execute docker-compose up -d

Documentation

https://darkwood-fr.github.io/flow

License

Flow is released under the MIT License.

Edit this page on GitHub

+

Usage

A working script is available in the bundled examples directory

Messaging part require to install Docker and execute docker-compose up -d

Documentation

https://darkwood-fr.github.io/flow

License

Flow is released under the MIT License.

Edit this page on GitHub

Flow →
- + \ No newline at end of file diff --git a/docs/getting-started/ip-strategy/index.html b/docs/getting-started/ip-strategy/index.html index fcb57a97..6c0d693e 100644 --- a/docs/getting-started/ip-strategy/index.html +++ b/docs/getting-started/ip-strategy/index.html @@ -2,8 +2,8 @@

Ip Strategy

When processing Flow with one or multiple Ips, you can choose a strategy that will sequence the order of processing Ip.

LinearIpStrategy

This process Ip by order : first in, first out.

StackIpStrategy

This process Ip as a stack order : push ip to the top of the stack, then order ip retrieval from the top stack to bottom.

MaxIpStrategy

This process Ip as soon less Ip are currently process than the current max.
You can embed it by a custom strategy with is LinearIpStrategy by default.

Make your Ip Strategy

You can make your custom Ip strategy by implementing Flow\IpStrategyInterface

Edit this page on GitHub

+Getting Started

Ip Strategy

When processing Flow with one or multiple Ips, you can choose a strategy that will sequence the order of processing Ip.

LinearIpStrategy

This process Ip by order : first in, first out.

StackIpStrategy

This process Ip as a stack order : push ip to the top of the stack, then order ip retrieval from the top stack to bottom.

MaxIpStrategy

This process Ip as soon less Ip are currently process than the current max.
You can embed it by a custom strategy with is LinearIpStrategy by default.

Make your Ip Strategy

You can make your custom Ip strategy by implementing Flow\IpStrategyInterface

Edit this page on GitHub

- + \ No newline at end of file diff --git a/docs/getting-started/license/index.html b/docs/getting-started/license/index.html index 5ee13d13..353e37eb 100644 --- a/docs/getting-started/license/index.html +++ b/docs/getting-started/license/index.html @@ -2,7 +2,7 @@

The MIT License (MIT)

Copyright (c) 2022 Mathieu Ledru mathieu@darkwood.fr

Permission is hereby granted, free of charge, to any person obtaining a copy of +Getting Started

The MIT License (MIT)

Copyright (c) 2023 Darkwood

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of @@ -13,8 +13,8 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Edit this page on GitHub

+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Edit this page on GitHub

← Changelog
- + \ No newline at end of file diff --git a/docs/getting-started/ressources/index.html b/docs/getting-started/ressources/index.html index 078bddcc..aba782e8 100644 --- a/docs/getting-started/ressources/index.html +++ b/docs/getting-started/ressources/index.html @@ -2,8 +2,14 @@

More information about the code

Article of this project : https://blog.darkwood.fr/article/php-railway-flow-based-programming
Slides of this project : https://speakerdeck.com/matyo91/php-railway-flow-based-programming
Video of this project : https://www.youtube.com/watch?v=mxxdhGsaIjY

Railway Flow Based Programming with Elixir from Anton Mishchuk

Flow Based Programming from J. Paul Rodker Morrison

Railway Oriented Programming

Coroutines in PHP

Monads and PHP

Y-Combinator and PHP

Messaging approach with East oriented code from Frédéric Hardy

Edit this page on GitHub

+Getting Started

More information about the code

Article of this project : https://blog.darkwood.fr/article/php-railway-flow-based-programming +Slides of this project : https://speakerdeck.com/matyo91/php-railway-flow-based-programming +Video of this project : https://www.youtube.com/watch?v=mxxdhGsaIjY

Railway Flow Based Programming with Elixir from Anton Mishchuk

Flow Based Programming from J. Paul Rodker Morrison

Railway Oriented Programming

Coroutines in PHP

Fibers in PHP

Monads and PHP

Article on Monads : https://blog.darkwood.fr/article/les-monades-et-leur-utilisation-en-php +Slides on Monads : https://speakerdeck.com/matyo91/monads-and-usage-in-php +Video on Monads : https://www.youtube.com/watch?v=0M6MhUpra9o

Y-Combinator and PHP

Article of Y-Combinator : https://blog.darkwood.fr/article/y-combinator-en-php +Slides of Y-Combinator : https://speakerdeck.com/matyo91/y-combinator-in-php +Video of Y-Combinator : https://www.youtube.com/watch?v=QSS_ZcO8Q1g

Messaging approach with East oriented code from Frédéric Hardy

Edit this page on GitHub

- + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index c20e05fc..b44e6d82 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,5 +4,5 @@ Getting Started
- + \ No newline at end of file diff --git a/index.html b/index.html index 7d107641..91842b2f 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ Flow - Flow

Flow

Assemble your code by adopting asynchronous as native implementation and build with functional programming and monads.

Get Started

Open-source MIT Licensed. GitHub v1.1.3

+

Flow

Assemble your code by adopting asynchronous as native implementation and build with functional programming and monads.

Get Started

Open-source MIT Licensed. GitHub v1.1.4

\ No newline at end of file diff --git a/index.min.30a02c1fd697b5a1fd3a02af6ec56bf4b7510d72941b30dd07d63731c270c203e891dd504255c2457d92da689c569ec168202fb9818bbdf6f69ef0e9059e4e93.js b/index.min.30a02c1fd697b5a1fd3a02af6ec56bf4b7510d72941b30dd07d63731c270c203e891dd504255c2457d92da689c569ec168202fb9818bbdf6f69ef0e9059e4e93.js new file mode 100644 index 00000000..2497f2f7 --- /dev/null +++ b/index.min.30a02c1fd697b5a1fd3a02af6ec56bf4b7510d72941b30dd07d63731c270c203e891dd504255c2457d92da689c569ec168202fb9818bbdf6f69ef0e9059e4e93.js @@ -0,0 +1 @@ +var suggestions=document.getElementById('suggestions'),search=document.getElementById('search');search!==null&&document.addEventListener('keydown',inputFocus);function inputFocus(a){a.ctrlKey&&a.key==='/'&&(a.preventDefault(),search.focus()),a.key==='Escape'&&(search.blur(),suggestions.classList.add('d-none'))}document.addEventListener('click',function(a){var b=suggestions.contains(a.target);b||suggestions.classList.add('d-none')}),document.addEventListener('keydown',suggestionFocus);function suggestionFocus(b){const d=suggestions.querySelectorAll('a'),e=[...d],a=e.indexOf(document.activeElement),f=suggestions.classList.contains('d-none');let c=0;b.keyCode===38&&!f?(b.preventDefault(),c=a>0?a-1:0,d[c].focus()):b.keyCode===40&&!f&&(b.preventDefault(),c=a+1{a.result.forEach(a=>{b[a.doc.href]=a.doc})});for(const d in b){const e=b[d],a=document.createElement('div');if(a.innerHTML='',a.querySelector('a').href=d,a.querySelector('span:first-child').textContent=e.title,a.querySelector('span:nth-child(2)').textContent=e.description,suggestions.appendChild(a),suggestions.childElementCount==c)break}}function c(){while(suggestions.lastChild)suggestions.removeChild(suggestions.lastChild);return!1}})() \ No newline at end of file diff --git a/index.min.b95b4099bb6a0c1297d6bcf06fe6c231a920fe2f3e652908b1cb844c845cacb84feee2bf875e2fbaacb8717fdc1717676515d56f1d6a70e91e379acf84879b8d.js b/index.min.b95b4099bb6a0c1297d6bcf06fe6c231a920fe2f3e652908b1cb844c845cacb84feee2bf875e2fbaacb8717fdc1717676515d56f1d6a70e91e379acf84879b8d.js deleted file mode 100644 index 2e5cd90c..00000000 --- a/index.min.b95b4099bb6a0c1297d6bcf06fe6c231a920fe2f3e652908b1cb844c845cacb84feee2bf875e2fbaacb8717fdc1717676515d56f1d6a70e91e379acf84879b8d.js +++ /dev/null @@ -1 +0,0 @@ -var suggestions=document.getElementById('suggestions'),search=document.getElementById('search');search!==null&&document.addEventListener('keydown',inputFocus);function inputFocus(a){a.ctrlKey&&a.key==='/'&&(a.preventDefault(),search.focus()),a.key==='Escape'&&(search.blur(),suggestions.classList.add('d-none'))}document.addEventListener('click',function(a){var b=suggestions.contains(a.target);b||suggestions.classList.add('d-none')}),document.addEventListener('keydown',suggestionFocus);function suggestionFocus(b){const d=suggestions.querySelectorAll('a'),e=[...d],a=e.indexOf(document.activeElement),f=suggestions.classList.contains('d-none');let c=0;b.keyCode===38&&!f?(b.preventDefault(),c=a>0?a-1:0,d[c].focus()):b.keyCode===40&&!f&&(b.preventDefault(),c=a+1{a.result.forEach(a=>{b[a.doc.href]=a.doc})});for(const d in b){const e=b[d],a=document.createElement('div');if(a.innerHTML='',a.querySelector('a').href=d,a.querySelector('span:first-child').textContent=e.title,a.querySelector('span:nth-child(2)').textContent=e.description,suggestions.appendChild(a),suggestions.childElementCount==c)break}}function c(){while(suggestions.lastChild)suggestions.removeChild(suggestions.lastChild);return!1}})() \ No newline at end of file