Skip to content
This repository was archived by the owner on Oct 6, 2021. It is now read-only.
This repository was archived by the owner on Oct 6, 2021. It is now read-only.

Non-Blocking I/O Servers Support ( Swoole, ReactPHP, Amp ... etc ) #205

Description

@azjezz

i intend to follow up with PR next week, first i have some questions :

  • does AirShip uses any global variables ? ( $_COOKIES, $_POST, $_GET ... etc)
  • does AirShip uses any HTTP related function ? ( e.g: header(), setcookie() ... etc )
  • does AirShip uses PHP Session Extension functions ? ( e.g: session_start() ... etc )

for this i suggest having 1 class AirShip\Networking\Server and multiple drivers ( e.g : AirShip\Networking\Server\Driver\SwooleDriver, AirShip\Networking\Server\Driver\AmpDriver .. etc )

Activity

  1. azjezz commented on Nov 16, 2018

    @azjezz
    Author

    this is an issue

    i think first we need few changes before supporting Swoole or any other non-blocking IO server ( such ReactPHP or Amp ) :

    1. new session interface instead of ParagonIE\Cookie\Session
    2. use dflydev/fig-cookies instead of ParagonIE\Cookie\Cookie
      • we can build a wrapper around this for encryption by example
    3. PSR-15 support :
      • MIDDLEWARES ARE COOL !
      • clean the mess in public/index.php
        • error handling and enabling debug can be done in an early middleware
    4. PSR-6 support :

    what do you think @paragonie-scott

  2. changed the title [-]Swoole Support[/-] [+]Non-Blocking I/O Servers Support ( Swoole, ReactPHP, Amp ... etc )[/+] on Nov 16, 2018
  3. PeeHaa commented on Nov 27, 2018

    @PeeHaa

    @azjezz how would you envision async support as no part of airship is build with non blocking support in mind?

  4. azjezz commented on Nov 28, 2018

    @azjezz
    Author

    @PeeHaa the only problem i currently see is the usage of global variables and the session extension, but for now I'm waiting for @paragonie-scott opinion on this.

    the usage of global variables $_GET and $_POST can be avoided by using the PSR7 request,
    $_COOKIES can be avoided by using dflydev/fig-cookies instead of ParagonIE\Cookie\Cookie
    and we need a new session implementation, one that doesn't use the session extension, something like this : zendframework/zend-expressive-session-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions