Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aerys Docs TODO #5

Closed
36 tasks done
bwoebi opened this issue Feb 12, 2016 · 1 comment
Closed
36 tasks done

Aerys Docs TODO #5

bwoebi opened this issue Feb 12, 2016 · 1 comment

Comments

@bwoebi
Copy link
Member

bwoebi commented Feb 12, 2016

SIMPLE

START

  • Intro [php bin/aerys -d -c demo.php]
  • Very simple setup of Host + static Root

HTTP

  • Sample http function [mention Router, Response, Request]
  • Response [headers, end()]
  • Request [headers, query array]
  • parseBody function + ParsedBody class
  • Router [methodname('/route', $callable), mention dynamic routes]
  • Dynamic routes [having route info as last arg, explain route info]
  • Cookies [refer to Session, Request::getCookie(), Response::setCookie()]

WEBSOCKET

  • websocket(instanceof Websocket) [explain clientId, onOpen, onClose, onData, yield $message]
  • Websocket\Endpoint [send(), close(), Websocket::onStart()]
  • Websocket::onHandshake [second parameter of onOpen]

HOST

  • expose(), name()
  • encrypt() [HTTPS ... per port! HTTP2 needs openssl 1.0.2 !!!]
  • use() [explain exactly]
  • redirect() [is the last action, e.g. combine with router, redirect in case of not found]

I/O

  • Typical Amp promises usable in Websocket methods and HTTP callable [refer to Amp docs]
  • Big fat warning about blocking I/O

HELPERS (only intros)

  • Overview (Reverse proxy, Session) (link to docs / github repo)

LOGGING

  • PSR3 Logger
  • Bootable imports Logger

OPTIONS

  • AERYS_OPTIONS, Server::get/setOption, Request::getOption
  • "simple" options [user, sendServerToken, allowedMethods]

ADVANCED

HTTP

  • Response::stream()
  • Response::push()
  • Managing routes

PERFORMANCE

  • Aerys is not the bottleneck. Your App is. [explain (careful about memory_limit), tips?]
  • Perf critical options [balance against DOS etc.]
  • Response::stream() and Websocket\Endpoint::send() return Promises!
  • explain Body = Websocket\Message PromiseStream [only increase accepted data limit for these] + ClientException may be thrown in while waiting. No need to catch.
  • BodyParser (incremental API)

MIDDLEWARES

  • Intro [powerful, use with care, ...]
  • Middleware::do() [no I/O, "protocol" of string, array, null and false]
  • InternalRequest [headers, locals, Request::get/setLocalVar()]

END

  • Sum it up [mention CommandClient, HttpDriver]

CLASSES

  • All APIs documented per class
@bwoebi
Copy link
Member Author

bwoebi commented Mar 27, 2016

Initial writing done.

@bwoebi bwoebi closed this as completed Mar 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant