3 posts tagged “svrc2007”
Follow us on the collaborative svruby.tumblr.com tumblelog!
[Tor Norbye on IDE support for Ruby]
Nick Sieger, JRuby: Ready for Prime Time
[JRuby, started at 2002 (CRuby 1.6)]
"Applets... remember those? Oooh."
Why Java?
+ HotSpot, Unicode, (Generational / Tunable) Garbage Collection, "java Monitoring & Management Console"
Microbenchmarks: CRuby beats JRuby (interpreted) most of the time, but JRuby (compiled) "starting to kick some butt" (work-in-progress)
Supported? Yes: Hpricot, Camping, etc.
Supported? Maybe: Mongrel, (Super-)RedCloth, ...
JRuby = more compelling for long running applications (due to start-up times)
[WAR builder live demo, deploy mephisto]
Big Bird (scaling twitter), Blaine Cook
Rails Scales (but not out of the box)
600 requests per second. 180 Rails Instances (Mongrel). 1 DB Server (MySQL) + 1 Slave.
30-odd Processes for Misc. Jobs, 8 Sun X4100s.
"March was difficult." (see graphs)
It's Easy, Really.
1. Realize Your Site is Slow
2. Optimize the Database
3. Cache the Hell out of Everything
4. Scale Messaging
5. Deal With Abuse
Don't Be Like Us
- Munin, Nagios
- AWStats, GOOG Analytics
- Exception Notifier / Exception Logger
"The Next Application I Build is Going to Be Easily Partitionable" - Stewart Butterfield
"Denormalize A Lot." (singlehandedly what saved us)
"Don't Be Stupid: bob.friends.map(&:email)"
"We're so not blocked on our database."
_ActiveRecord nano_. 90% API Requests, Cache Them!
"There are only two hard things in CS: cache invalidation and naming things" -- Phil Karlton
DRb:
+ Stupid Easy (it's kinda slow actually)
+ Reasonably Fast
- Kinda Flaky, Zero Redundancy
- Tightly Coupled
ejabberd <-> jabberclient (drb)
Moved from DRb to Rinda, Shared Queue (TupleSpace). RingyDingy makes it stupid easy.
"O(N) for take(). Sigh."
Twitter, TCP/IP or UDP? "It's definitely UDP."
Options:
- ActiveMQ (Java)
- RabbitMQ (erlang) -- looks promising, no Ruby clients, "wasn't going to write one on Wednesday"
- MySQL + Lightweight Locking -- what LiveJournal does
- Something Else?
Starling: Ruby, will be ported to something faster. 4000 transactional msgs/s. First pass written in 4 hours. Speaks MemCache (set, get). Works great. Use Messages to Invalidate Cache.
Abuse:
The Italians -- "friending everyone on the site... costing us thousands of dollars." They were "inverse spamming themselves."
9000 friends in 24 hours (doesn't scale), delete those users.
Q: JavaScript for relative times on the twitter front pages? Yea, maybe we'll do that.
"We were on a 32-bit database... until Thursday."
Inject database, render time, and server source as <!-- HTML comments --> in pages themselves.
[A number of detailed questions and answers on their architecture, spoofing, scaling, and so on.]
Lunch
Yet Another (the third) [Nameless Search Engine] Developer Talk :)
On Heckle, by Ryan Davis and now Kevin Clark. Compare with Dawson Engler's work.
Ezra Zygmuntowicz (ez), started Engine Yard, blog at brainspl.at.
Mongrel -- "Faster is Possible"
"FastCGI is Poop"
Rails isn't Thread Safe, mutex around dispatch. Mongrel is thread safe.
"Building Mongrel Handlers is easier [than] you think"
":in_front => true to put a custom Mongrel Handler in process with your Rails app and have it intercept"
SecureFile handle example (should use Path.expand_path).
(Aside, see notes on Merb.)
Merb -- "Clean room implementation of ActionPack"
"Thread Safe with confiurable Mutex Locks"
"Rails compatible REST routing"
"Merb... A hacker's framework"
Merb holds mutex lock for much shorter compared to Rails dispatching.
Rails routing is 1800 lines of *very complex* non thread-safe code
Merb's router is 200 lines of complex but *thread safe* code and much more efficient for route matching
Compiles routes to regexen and a case.
"At this point it is not premature anymore ;)"
Merb -- less magicks! than Camping. More familiar to Rails developers.
Used in prod for half a million uploads+downloads every day.
Rubinius, Evan Phoenix
"A Tool of the Future, aka the road to enlightenment"
Mantra of rubinius: If it can be done in ruby, then it shouldn't be in C.
"An idealist is a person who helps other people to be prosperous." --Henry Ford
"If you're not failing every now and again, it's a sign you're not [doing] anything very innovative." --Woody Allen
Project has really sped up since last October.
Goals: 98% first class, 1.8.5 compatible, MRI (Matz Ruby Interpreter) C API compatible.
Timeline? 1.0 by October, 2007 - RubyConf. Near 100% compatible with 1.8.5, able to run Rails 1.2.
2.0, JIT and Optimizers.
Strongtalk? Can't understand it. Written in "C++ that's unable to penetrate my brain."
Currently supports green threads. Contains low level sync / sharing mechanism called Channel (PI Calculus-like channel.) Native Thread support in a MxN scheme (eventually).
"Compiler is a normal class, which opens doors..."
[Description of generational garbage collection strategies used.]
puts "OMG #{a} PONIES!"
Ed: okaybyethanksfortheconference!
Part two.
Chat about Apollo being a "machine language"... but Mozilla/XUL(Runner)-as-platform lags far behind Silverlight and Apollo.
ActiveRecord talk, Evan (Rabble) Henshaw-Plath (testingrails.com)
[Insert Scary Dog Picture here.]
Pretty slides, explanation of ActiveRecord concepts.
Many to Many:
- Simple Joiner Table = has_and_belongs_to_many (neglected by rails-core)
- Joiner Model = has_many :through
"I want to thank all the Flickr photos that I used" --
anarchogeek.com+ A number of pretty good questions -- see the video (?) for details.
Conf is getting more interesting again :)
Natural Language Date/Time Parsing with Chronic
[Describes NLP-ish grammar of relative times.]
[Describes detailed implementation of Chronic -- what's the take away? Hmm...]
Todo: time zones, recurring events.
Building an IDE for Ruby, CodeGear from Borland (Mark Howe)
"Why don't we have good tools for Ruby?"
"Is DLTK the answer?"
"Dynamic languages pose some unique problems for tool vendors" M. Howe's blog
"DLTK also adds type inference which allows... to... guess... the type required"
Silicon Valley Ruby Conference 2007
"Full-Stack Web App Testing with Selenium and Rails"
This really isn't a Ruby or Rails talk, but an intro to Selenium. PLabs folks added three or four JS functions to ThoughtWorks's Selenium testing tool.
Someone from the peanutgallery pointed out that Selenium can't bork if you're using a JS lib that mucks with the JS Event model.
(Looking for this recent ruby blog post on "writing a DSL" vs. "writing DSL" -- you're probably doing the latter, not the former.)
(Blogged by Collin Charles too.)
SVRC Links
A collaborative sv ruby conf tumblelog, svruby.tumblr.com
Err's talk
Ruby's SOAP bindings, great but "a jungle" of complexity. Nobody uses it? SOAP is for legacy interop.
Microformats, mofo.
Hpricot is cool, makes writing DSL for microformat parsing super easy.
Lunch
Give away "free screenshots" for peepshow.
The day started with a bit more of a corporate feel that I'd like. "spend two days drinking from a ruby-colored firehose" = ugh.
SAP Research
"protect existing assets"
"Example of customer using Rails on top of R/3: Colgate Palmolive"
Greg_the_architect, a video. Poppy voice vid: "Innovation is the process of... yadda yadda yadda"
Embedded constraint solvers. "CMIL-Ruby" -- not on google yet.
Model-Driven (Architecture) Development = External DSLs, Ruby DSLs = Internal DSLs.
Promise of CASE Tools = Visual Programming, Biz Analysts directly create models. Ruby DSL: The Promise of Meta-object protocols = Review by domain experts, directly executable.
Meta-modeling Frameworks = common metamodeling language. Ruby DSL: Domain-model hard coded if at all.
Agile Language Development: Meta Model -> DSL Syntax -> Interpreter -> Meta Model -> ...
"Meta-programming combined with Meta-modeling is very powerful" but "Still work to be done on consuming external metadata/models in Ruby"
"Aspectual concerns: does Ruby alleviate the need for Aspect-oriented Modeling?"
How to Contribute to the Ruby Open Rails Open Source Project
How many people don't know about Trac? Nobody raises their hand.
Instructions for how to set us up the dev env.
(Ed: Not a fan of this conference so far, but met some cool folks along the way. Methinks the organizers expected a different sort of crowd... This is a Silicon Valley "Ruby" Conf, held in the SJ Tech Museum on a weekend, and you gotta pay more than two-hundred bucks to just get in, do you expect Ruby newbies to show? Honest to goodness ones, not serial entrepreneurs or jaded engineers.)