kpacha / reactive-hateoas
可扩展的hateoas服务器
0.1.1
2014-02-08 21:14 UTC
Requires
- kpacha/reactive-silex: dev-master
- mcuadros/silex-hateoas: dev-master
- willdurand/hateoas: ~2.1.0
This package is not auto-updated.
Last update: 2024-09-28 15:44:29 UTC
README
可扩展的hateoas服务器
##主要依赖项
##安装
安装kpacha/reactive-hateoas推荐使用composer。
{
"require": {
"kpacha/reactive-hateoas": "~0.1.0"
}
}
##使用方法
查看bin/reactive.php示例,并运行它
$ php bin/reactive.php
内置基于控制台的脚本
$ bin/run list
Console Tool
Usage:
[options] command [arguments]
Options:
--help -h Display this help message.
--quiet -q Do not output any message.
--verbose -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
--version -V Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
--no-interaction -n Do not ask any interactive question.
Available commands:
help Displays help for a command
list Lists commands
reactive Start a reactive-silex instance
$ bin/run reactive -vv 8080
Server running at http://127.0.0.1:8080
Memory: 1280 KiB
Memory: 1280 KiB
##API消耗
请参阅mcuadros的仓库中的良好示例。
##可扩展性
React启动一个单进程无共享服务器,因此您可以在单台机器上实例化多个堆栈,具体取决于可用核心数,在扩展之前。CPU和内存消耗将几乎线性。平衡您的堆栈之间的负载,一切都会运行得很好!
此外,请记住将每个堆栈绑定到不同的端口,否则您将面临一些端口冲突消息!