English 中文(简体)
鲁比铁路局
原标题:Concurrency in Ruby on Rails

我正试图在“铁路网开发”书之后,在铁路上学习Ruby。 书籍。 我还没有了。 我一直在从该书上建立网络应用程序,其中提到“一个用户”。 例如,该书说,“如果用户点击......用户进入......”,就这样。

当我去1 000名用户时,情况如何? 或100 000名用户? 铁路的废墟如何与油轮(我正在使用)一起处理一致性问题? 我是否认为用户是用户,继续建设网络应用和垃圾自动顾及一致性?

问题回答

Ruby on Rails work just like any other system. Each request is processed in serial, to process multiple requests in parallel, you (usually) use multiple servers (either multiple physical/virtual hosts, or run the app multiple times on one box). 1000 (or 100000) users clicking on a link just implies 1000 (or 100000) requests to your server that get processed in series (parallel with load balancing on multiple servers).

对亚洲开发银行来说,你通常会把Sqlite用于生产网络服务器,而像MySql这样的系统会注意自己要求的一致性(指出,查询通常是无国籍的,因此,一旦一个服务器处理询问,它通常会抛弃与之相关的国家)。





相关问题
Remove ActiveRecord in Rails 3

Now that Rails 3 beta is out, I thought I d have a look at rewriting an app I have just started work on in Rails 3 beta, both to get a feel for it and get a bit of a head-start. The app uses MongoDB ...

When will you upgrade your app to Rails 3? [closed]

Now that the Rails 3 beta is here, let s take a little straw poll. Please tell us briefly what your application does and when you will upgrade it to Rails 3. Or, if you re not planning on upgrading ...

Bundler isn t loading gems

I have been having a problem with using Bundler and being able to access my gems without having to require them somewhere, as config.gem used to do that for me (as far as I know). In my Rails 3 app, I ...

bypass attr_accessible/protected in rails

I have a model that, when it instantiates an object, also creates another object with the same user id. class Foo > ActiveRecord::Base after_create: create_bar private def create_bar Bar....

concat two fields activerecord

I m so used to oracle where you can simply concat(field1, , field2) but if I m using activerecord to find the field1 and field2, and I need a space in between, how do I accomplish this? Cheers ...

热门标签