Rails框架在实时场景下的应用

LayerVault is built using the popular web framework, Ruby on Rails. The framework, at times known for its divisiveness, has allowed LayerVault to grow from a single box to a swarm of machines over the past year. Recently, there has been a wave of great JavaScript-based frameworks that make creating a “realtime” app a cinch. Because LayerVault is a perfect facsimile of a team’s filesystem, having the web interface update immediately is incredibly important. Every R is two key presses too many. Finder doesn’t require you to refresh every time a file changes, why should a web app  We’re happy with Rails, so transitioning to Meteor, Ember.js or Backbone.js whole hog isn’t the right move for us.

The phrase “realtime” is thrown around about as much as “local” and “disruptive” these days, so the phrase is often ambiguous. For the purposes of this post, a “realtime” app is the following: page refreshes are not required to see the most up-to-date state of information and new information is communicated in tens of milliseconds instead of hundreds or thousands.

This blog post will cover some of the patterns that we use to allow LayerVault customers to never worry about pressing R. This is all done by using vanilla *.html.erb templates and never rendering any parts of the page using JavaScript. Once a database record is changed, that change appears in <500ms in a customer’s browser.



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/301743/viewspace-742922/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/301743/viewspace-742922/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值