Well, the Day Three notes are a bit rough. Wrapping up 800 miles of commuting and not enough sleep during the conference. But at least I didn’t have to come up with bail money 🙂 Stay tuned. Expect updates, spell-fixes and proper grammar as I punch this up over the weekend…
Josh Susser, Pivotal Labs
dawn of history: agriculture, pyramids, smalltalk
what the hell happened to smalltalk? In the 80s,
arguably the most advanced software development
platform in the world. The best of the best.
At Apple, wrote a memo damning C++
Bjorne’s fault.
C++ is portable structured assembler.
SmallTalk had IDE, garbafe collection, and a big blind spot.
It’s greatest strength is also his greatest weakness.
Consider SuperMan. His moral certitude is his greatest flaw, too.
With SmallTalk, the virtual image stored everything, down to
the network stack and primitives of the file system.
Just the kernel needed to actually be implemented on the OS
itself.
Squeak is the modern implementation.
Virtual Image was very powerful, but not without costs: it made
it nearly impossible to deliver client applications.
Updating a client involved sending them code for them to compile
to update the application code, which was mixed in with
the data in the Virtual Image. Problem. Multiple vendors couldn’t
really practically share a VI, since they could easily clobber each
other’s stuff.
Was a regular at OOPSLA for years; it was all SmallTalk for the longest time. Then
C++ came along, and OOPSLA was all C++. And it wasn’t that C++ was so much
better than SmallTalk, it was that it was so much better than C.
Argues Ruby is prodeominant because of Rails, and Rails predominates because of
web apps and XP. Extreme Programming is highly adopted in the Rails community,
and TDD is very easy to accomplish. “It’s almost easier to test than not.”
Many current issues will be solved with MagLev or Rubinius or Marv.
Problem with the flexibility of Ruby/Rails is the strength and weakness: meta-programming and on-the-fly in-code creation of classes and method means that code is executed that doesn’t exist anywhere on disk. How can you find and modify and refactor code that’s not there? Answer: tough. But we have testing that should describe all the behaviors or our application, even the just-in-time code. Modifications to base classes such as Active Record to hook in and capture the creation of classes and methods. Clever!
RESTful possibilities, REST in Rails and Beyond
James Golick
Survey: who codes REST? half the hands
Example: you host a web site, want to map some data. Don’t have the geocodes, want to oursource that
Solution: remote procedure calls, SOAP or CORBA. Complexities of underlying stacks is huge: 41,659 LOC for the SOAP client in Ruby. rpc = FAIL. Roy Fielding’s PhD dissertation. Describes http as Representational State Transfer (REST)
anything can be a resource http is verb (GET, PUT) and a noun (location) Argues POST http://example.com/comment/create is NOT RESTful – Don’t Verb the Noun map.resources :post – tells the Rails router to route the request not only on the noun, but also on the verb
standardization is good.
Assumes that most “professional” ruby developers have worked with these conventions, and therefore will be productive much faster. RESTful api with YAML, JSON or XML exposed. powerful tooling. Example: James had an idea, Tweet:”walking my dogs thought I’d bore you with details of my life, blahblahblah” right from the command line. 35 minutes from concept to shipping
Things not to do in Boston while you’re drunk: Bukowski Tavern FAIL
Using Berkeley DB and Ruby for large data sets Matt Bauer
Tweets: Still at the Boston police station. #prorubyconf08 Bailsman is on the way. Still not processed completely yet. Long nite
Data collection of bike racing, 28 data points captured every 5 seconds, 1.7 TERAbytes of data annually .
Wrote a custom lighttpd plugin, SleepyCat (BerkeleyDB) and merb for data collection.
Bullet points: Open Source, highly concurrent (thousands of threads), scales to 256 TB, keys/data to 4 Gb, Supports ACID transactoion
embedded/ runs in same address space, written in C with many bindings, very small: 399 kb of text space, no SQL or Schema
Doesn’t operate on Keys or Data
Two data stores: concurrent: no recoverability; transactional: Fully recoverable, ACID
BerekeleyDB is like an Indy Car: wicked fast, but you will hit the wall. Advice: read the manuals! Plan for recovery.
Specs on performance he’s measured: Concurrent, nearly 1M records posted per second, Transactional, 128K/s
Ruby & Dbd bindings, two versions: Guy Decoux 2002-2008, passed away! Dan Janowski (2006-2007) exact
implementation of C API, Oracle API, Quite Stable, Only Three Test Cases.
Very frank about “hating” SQL – like swim floaties, we can do better. I’m not sure he understands the problem space
that SQL solves.
Code example, very C-like
Four data storage patterns: BTree (sorted balanced trees, can set fill factor high on ordered insertion),
Hash (extended linear hashing), Queue (fixed length records, head/tail push/pop), Recno (stable record number).
Simple tuple can be 8 Gb in size, one key (4 Gb), one value (4 Gb)
Flags are all-important to interface, each method call has parameters to be tunable.
Cursor support, open, first, next, last, close. create, save.