首页 \ 问答 \ Faye&Ruby或Node.js的可扩展性(Faye & Ruby or Node.js for scalability)

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
更新时间:2022-03-02 21:03

最满意答案

结合更多需要考虑的事项:

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 ...
  • 你应该让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 ...
  • 我猜你必须将它部署在服务器上,而不是本地机器上。 app_dev.php不会在设计上在生产服务器上运行。 您可以通过添加自己的IP地址来修改它,然后它将运行。 无论如何,我也遇到过这个问题。 你实际上并没有处于debug模式。 只是Symfony的构建过程中出现了一些问题,因为它们的稳定版本后缀为-DEV 。 查看vendors目录中的文件Symfony/Component/HttpKernel/Kernel.php 。 寻找const VERSION 。 它的价值可能就像xxx-DEV 。 Im gues ...
  • 你是否正确配置了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 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)