开发者

How does PivotalTracker.com update its view in real time?

I'm trying to build a view similar to PivotalTracker where there are a variety of rows in different buckets. There is some polling to the server because rows could be updated by other users while you're working on it and the page should update on its own without having to manually refresh it.

I know how to poll the server and get updated rows, but it's not simply a matter of redrawing each row in place when it's been updated, because the row could change locations or order on the screen, and also be deleted, etc.

It's complex enough that I don't think they are doing it manually with javascript.

It looks like they are doing a versioned view, where only the diff of the changes (in JSON) is pushed down to the client on a poll so the view is kept in synch with the DB using these diffs.

I've never really heard of or seen a library to do a "versioned view" but maybe such a library or framework exists? Or is there some other way they are doing it? Thanks!

By the way, I'm using开发者_运维百科 Ruby on Rails to build this.


Mark Michael from Pivotal Labs recently authored a blog entry which details their client-side architecture.

http://pivotallabs.com/users/mark/blog/articles/1693-what-powers-pivotal-tracker-client-side-architecture


Just peeking at the tracker page source it looks like they are using YAHOO UI widgets to do things. Their javascript has been compressed (no whitespace), so it's a pain to wade through it all, but it looks to me like they are using the yui library to update all of their views.


An email from the Pivotal tracker guys confirms that is is custom coded solution. Each UI component listens for commands from the user. The server can send commands from other users on a poll. It sounds complicated - a home grown solution.

I decided to build something similar using only RJS. Still figuring it all out..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜