Faye&Ruby或Node.js的可扩展性(Faye & Ruby or Node.js for scalability)
我正在寻找一个Web应用程序的原型,它将使用套接字将一条温和的消息流推送到移动Web应用程序客户端。 我想选择一种适用于大量客户的体系结构(如果/转移到生产时)(所以我不需要稍后再进行更改)
我想从轨道开始,因为它的熟悉和强大的结构从开始意味着更容易原型。 我认为Faye会根据pub-sub层提供我需要的内容,但是我会通过使用ruby和大量的套接字连接来创建瓶颈,或者如果您遵循Faye隔离/保护Ruby服务器的规定?
在一开始,负载不会很重要,所以它没关系,我只是不想在稍后有很多套接字连接时被阻止,我希望我使用node.js! 服务器端的JS对我来说是相当新的,但我想JS应用程序可以包含客户端也有好处
建议感激。
I'm looking to prototype a web app that will use sockets to push a gentle stream of messages to mobile web app clients. I want to pick an architecture that will work for a large number of clients if/when it moves to production (so i dont have to change later)
I'd like to start with rails because its familiar and has a strong structure from the go meaning easier to prototype. I think Faye will provide what i need in terms of a pub-sub layer but am I going to create a bottleneck by using ruby and the high number of socket connections, or will Faye isolate/protect Ruby server from that load, if you follow?
At the outset the load will not be significant so it won't matter, i just don't want to be hobbled later on when there are a lot of socket connections and i wish i used node.js ! Server side JS would be fairly new to me but I guess there are benefits in that the JS app can include the client side also
Advice appreciated.
原文:https://stackoverflow.com/questions/16220901
最满意答案
结合更多需要考虑的事项:
php app/console cache:clear --env=prod --no-debug php app/console assets:install web_directory php app/console assetic:dump web_directory
您也可能会遇到缓存目录的权限问题。 在切换到生产模式之前,我实际上首先要确保服务器上的所有工作都处于开发模式。 如果你在生产模式下得到的只是空白屏幕,那么将debug设置为true。 当然知道如何检查错误日志。
Couple more things to consider:
php app/console cache:clear --env=prod --no-debug php app/console assets:install web_directory php app/console assetic:dump web_directory
You might also run into permission issues with the cache directory. I would actually first make sure everything works in development mode on the server before switching to production mode. And if all you get is blank screens in production mode then set debug to true. And of course know how to check your error logs.
相关问答
更多-
结合更多需要考虑的事项: php app/console cache:clear --env=prod --no-debug php app/console assets:install web_directory php app/console assetic:dump web_directory 您也可能会遇到缓存目录的权限问题。 在切换到生产模式之前,我实际上首先要确保服务器上的所有工作都处于开发模式。 如果你在生产模式下得到的只是空白屏幕,那么将debug设置为true。 当然知道如何检查错误日志 ...
-
如您所见, bootstrap.php.cache中引发了此错误。 Symfony使用引导程序文件来提高类加载性能,如此处所述 。 但是,您可能会从开发环境中复制此文件,并且尚未为生产重新生成该文件。 您需要通过运行composer install或直接运行构建脚本来重新生成此文件: php ./vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php As you ...
-
首先,验证.htaccess是否存在于您应用的web目录中。 否则,从这里取出并创建它。 打开它并检查URL是否重定向到/app.php/ 。 如果您看到包含app_dev.php的行, app_dev.php更改为app.php 。 例如,如果您看到以下行: RedirectMatch 302 ^/$ /app_dev.php/ 将其更改为: RedirectMatch 302 ^/$ /app.php/ 然后,验证您的web/app.php看起来像默认 。 此外,您给出的行应该是: new AppK ...
-
Symfony记录问题(Symfony logs issue)[2022-04-13]
你应该让new AppKernel('prod', false); 你正在寻找错误的文件夹。 您的配置是在一般的PHP错误日志中写入日志 path: "php://stderr" 将config_prod.yml更改为: monolog: handlers: # [...] nested: type: stream path: %kernel.logs_dir%/%kernel.environment%.log ... -
检查服务器的错误日志以及app/logs/prod.log你会发现导致500错误的错误。 有时清除缓存rm -rf app/cache/prod也有帮助。 Check your server's error logs and also app/logs/prod.log you will find the error causing the 500 error there. Sometimes clearing the cache rm -rf app/cache/prod also helps.
-
那我的第一个问题是如何在生产中禁用例外? 据我所知,在Google上搜索时,我认为这是因为第二个参数传递给了new AppKernel('prod', ...); 是的,这启用了调试模式。 将其设置为false 。 (同样适用于config_prod.yml调试设置)。 我的第二个问题是我可以删除生产中的config.php文件(位于myBundle / web / config.php中)吗? 是的,除了生产控制器之外,还要删除任何前端控制器(如app_dev.php )。 请记住:标准版只是一个推荐。 ...
-
您必须确保在生产环境中正确设置环境变量APP_ENV 。 该文档告诉您如何为各种Web服务器执行此操作。 例如,在Apache配置中,您必须使用SetEnv 。 这看起来像这样: DocumentRoot /var/www/project/public
AllowOverride None Order Allow,Deny Allow from All ... -
symfony prod仍然开发(symfony prod still dev)[2021-11-08]
我猜你必须将它部署在服务器上,而不是本地机器上。 app_dev.php不会在设计上在生产服务器上运行。 您可以通过添加自己的IP地址来修改它,然后它将运行。 无论如何,我也遇到过这个问题。 你实际上并没有处于debug模式。 只是Symfony的构建过程中出现了一些问题,因为它们的稳定版本后缀为-DEV 。 查看vendors目录中的文件Symfony/Component/HttpKernel/Kernel.php 。 寻找const VERSION 。 它的价值可能就像xxx-DEV 。 Im gues ... -
将Symfony3应用程序从dev移动到生产服务器时出现问题(Problems when moving Symfony3 app from dev to production server)[2023-11-09]
你是否正确配置了apache? 您可能需要将虚拟主机配置添加到服务器。 您可以在Symfony网站上找到相关信息。 I finally solved the issue. I should use href="{{ path('about') }}" instead of href="/about" in all twig templates. Thanks everybody! -
Symfony\Bridge\Twig\Extension\LogoutUrlExtension扩展了Twig\Extension\AbstractExtension\AbstractExtension (这对你来说似乎很缺失)。 该文件是twig/extensions包的一部分,因此composer require twig/extensions才能实现。 为什么twig/extensions不是Symfony Twig Bridge所不需要的,我不知道。 ( packagist.org上的require ...