Showing entries 91 to 100 of 101
« 10 Newer Entries | 1 Older Entries »
Displaying posts with tag: ruby (reset)
Rubyisms

Lately, I have had opportunity to evaluate a very large Ruby installation that also was growing very quickly. A lot of the work performed on site has been specific to the site, but other observations are true for the platform no matter what is being done on it. This article is about Ruby On Rails and its interaction with MySQL in general.

Continue reading "Rubyisms"

Scaling Twitter: ?Is Twitter is UDP or TCP? Its definitely UDP.?

Presented by Blaine Cook, a developer from Odeo, now probably CTO of Twitter (Obvious Corp spawed, I think). There’s a video and slides (yes, you need evil Flash so I haven’t viewed it myself). Then there are my notes… possibly with some thoughts attached to them. No, they’re not organized, I’m too busy and tired…

Rails scales, but not out of the box. This will cause Twitter to stop working very quickly.

600 requests/second, 180 rails instances (mongrel), 1 DB server (MySQL) + 1 slave (read only slave, for statistics purposes), 30-odd processes for misc. jobs, 8 Sun X4100s.

Uncached requests in less than 200ms in most of the time.

steps:
1. realize …

[Read more]
ActiveRecord

ActiveRecord, by Rabble.

  • Rails ActiveRecord is mostly database agnostic.
  • Good subset of the SQL standard is supported, so you can migrate very easily (this is what OS X Leopard will do - develop using sqlite on your workstation, then migrate to mysql on the server).
  • Integer primary keys, and classname_id foreign keys. Single table inheritance is what really works well.
  • What ActiveRecord doesn’t like:
  1. views
  2. stored procedures
  3. FK constraints
  4. cascading commits
  5. split/clustered DBs
  6. enums
  • Complexity is best located in the code, not in the database, according to the Rails developers.
  • Avoid SQL injection with find. Use an array or let it do the …
[Read more]
Business Scripting Languages or SAP?s marketing talk + Stanford HCI mashup

The after lunch talk on Business Scripting Languages, by Asuman Suenbuel and Murray Spork was something I found very hard to stay awake in. In fact, I think so did many others, some of whom walked out of the room.

The first half of the talk was filled with SAP marketing spiel, something I think should sincerely stay away from conferences that are tech-oriented. When you hear a word like “SOA”, you already know you’re in the wrong talk. Greg the architect video (link courtesy Leslie Wu), now that was funny. Saving grace, and they do mention the movies are not from SAP. Figures. SOA is like a clothes wardrobe was the other video, with some somewhat hot looking girl - sure, again, saving grace.

Model-driven development (this is not UML - this is more like the Eclipise …

[Read more]
6-8% of folk don?t want MySQL as a default back-end

At the 2nd Annual Silicon Valley Ruby Conference, about a dozen folk have stated that they don’t want MySQL to be their default database for Rails. I do presume that there might be 150-200 folk that have rocked up, so thats a small portion of the market, I guess.

From what I gather, some people have to integrate with other applications, and having two database backends, probably don’t make so much sense. For example, if you use GRASS for GIS mapping stuff, you’d not want your default web app database to be MySQL, right?

I do sincerely hope to meet them all in the next couple of days, to see what their concerns are, failing which there’s a who’s who in where we can still get contacted with later.

Then the distribution statistics. 40% on Mac OS X, 50% on Windows (ick), and a mere 10% on Linux (lots of OS X users do use Linux).

Technorati …

[Read more]
Making & Breaking Web Services (with Ruby)

Chris Wanstrath (ex-CNET, now freelancing) worked on Chow and ChowHound, and thats Ruby and MySQL based, as opposed to PHP which is something they normally use. At last years conference, he arrived still as a PHP programmer. He transformed to a Rails programmer in only a year!

The Ruby SOAP library is really hard to debug. It however, creates methods on the fly, and the library itself is reliable. mocks is a good way to test SOAP, or Mocha.

Microformats - the website is your API. Just use semantic markup, that tell the pareses what information is important. They’re very easy to add accessibility to the stuff that you already have there. mofo (sudo gem install mofo) is a gem to parse microformats. Corkd - another rails site? mofo supports pretty much everything - …

[Read more]
Second Annual Silicon Valley Ruby Conference

In addition to the MySQL Conference & Expo 2007, which I just registered for (yes, its not too late, register now!), I also registered for the Second Annual Silicon Valley Ruby Conference. Its at The Tech Museum in San Jose (I honestly have no idea where that is from the Hyatt Santa Clara, but I’m sure a nice taxi driver will), and of things that will clearly interest me are:

Day 1
9:15am - 10:15am Full-Stack Web App Testing with Selenium and Rails - Alex Chaffee
12:30pm - 1:30pm Business Scripting Languages - Asuman Suenbuel and Murray Spork
2:40pm - 3:40pm ActiveRecord - Evan (Rabble) Henshaw-Plath

Day 2

[Read more]
Updates to NDB/Connectors

The NDB/Connectors have added support for Ruby, as well as Asynchronous Transaction support for Java, Python and Perl.

The Ruby support, of course, means that new you can interact with your MySQL Cluster installation using the NDBAPI from all your Ruby code.

The async stuff is especially cool, because it means you can send transactions to the Cluster and get responses by way of callbacks defined in the connector language. So you can do something like this:

class testaclass(object):

  def __init__(self, recAttr):
    self.recAttr=recAttr

  def __call__(self, ret, myTrans):
    print "value = ", self.recAttr.get_value()

#snip

myTrans = myNdb.startTransaction()

myOper = myTrans.getNdbOperation("mytablename")
myOper.readTuple(ndbapi.NdbOperation.LM_Read)

myOper.equal("ATTR1", 245755 )

myRecAttr= myOper.getValue("ATTR2")

a = testaclass(myRecAttr) …
[Read more]
Looking For Optimal Solution: Ruby On Rails and Mongrel

This article is part of “Looking For Optimal Solution” series, devoted to testing various Ruby On Rails deployment schemes and doing some simple benchmarks on these schemes. General idea of testing is to find subset of most optimal RoR deployment schemes for different situations.

This small article is about Rails+Mongrel setup and its performance. List of other tested deployment schemes, description of testing methodology and, of course, all benchmark results you can find on “Ruby On Rails Benchmark Summary and Findings” page.

(more…)

Crappy Development Environments

Recently I've been working on a large-ish project where all of the UI is written in Javascript. That, in itself, is great. The environments (the browsers) are crappy crappy for development though. Sure, there are Firefox extensions etc etc to help, but it's Just Not Great. Javascript = Great. Ajax = Yay. Browsers = Bah.

Over the weekend I spent all sorts of time getting a simple Rails application running with Apache and mod_fcgid. When I gave up and tried making it work with lighttpd I got server error galore. Yay. What was wrong? My fastcgi? The fcgi Ruby extension? My ruby installation is in /pkg/packages/ruby-1.8.4 or some such and the gem tool couldn't find its own libraries after being installed there. Maybe something similar for something else? I have no idea, I got no error messages anywhere. Ruby = Great. Rails = Very nice[1]. Ruby Gems = It sure is no CPAN.pm. FastCGI/lighttpd/etc = Loosely coupled? No mister, you have some way to …

[Read more]
Showing entries 91 to 100 of 101
« 10 Newer Entries | 1 Older Entries »