Slashdot Mirror


Twitter Reportedly May Abandon Ruby On Rails

Raster Burn writes "According to TechCrunch, Twitter has plans to abandon Ruby on Rails after two years of scalability issues. Candidates to replace Rails are said to be PHP, Java, and Ruby without the Rails framework." The post links a brief comment (at 139 characters, probably a tweet) from Twitter founder Ev Williams saying it ain't so. The comments following the post embody the controversy over whether or not RoR sucks.

56 of 423 comments (clear)

  1. I'm surprised they didn't do it sooner by drix · · Score: 2, Insightful

    How complex can Twitter be on the inside? In the 1.5 years they've been publicly grousing about Rails they could have redone it ten times over.

    --

    I think there is a world market for maybe five personal web logs.
    1. Re:I'm surprised they didn't do it sooner by moderatorrater · · Score: 4, Funny

      You're obviously underestimating the amount of effort it takes to store usernames, passwords, and phone numbers in a database, then associate them with messages no more than 120 characters in length.

    2. Re:I'm surprised they didn't do it sooner by neoform · · Score: 5, Funny

      That sounds like advanced stuff to me.

      On an unrelated note, is anyone here good with hello world programs? Mine keeps crashing.

      --
      MABASPLOOM!
    3. Re:I'm surprised they didn't do it sooner by moderatorrater · · Score: 4, Funny

      I'm fairly certain your problem is trying to talk to the whole world at once. Your computer program's seeing that, and it's trying to yell too loud. Try doing "Hello user" and see if that helps.

    4. Re:I'm surprised they didn't do it sooner by Bogtha · · Score: 2, Insightful

      Yeah, because message queues and SMS gateways and email-parsing daemons just write themselves

      Twitter don't use Rails to handle most of that though, do they? I don't think drix is suggesting that they rewrite every piece of code they have, just the Rails portion.

      --
      Bogtha Bogtha Bogtha
    5. Re:I'm surprised they didn't do it sooner by prockcore · · Score: 2, Interesting

      Don't forget the aim bot.

  2. Re:What is Twitter? by revscat · · Score: 5, Informative

    Twitter is a major site, even if you yourself have never heard of it, with many tens of thousands of users. As such it is felt by many to by *the* flagship RoR application. Unfortunately it has suffered from numerous outages, some of these lasting days at a time.

  3. Re:What is Twitter? by LWATCDR · · Score: 4, Informative

    twitter is a microblogging system.
    You can twitter from your cell or PC.
    I think it is one of the most usless things on the face of the earth but it seems popular for some strange reason.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  4. Does a clean architecture matter? by BadAnalogyGuy · · Score: 5, Interesting

    I have an argument with a coworker frequently about architectural orthogonality vs performance. I fall on the "architecture should be clean and easy to understand and maintain" side of the argument and he falls on the "speed, memory, and response time at all cost" side.

    What is more important? Is developer time and productivity over the software lifetime more valuable than CPU cycles? If the price of that productivity imposes a maximum limit on performance, how much optimization should be undertaken?

    It's a hard question to answer. On the one hand employees are expensive and hardware is cheap. On the other hand, you can't simply forego developing for performance just because of some religious belief that architecture should be clean.

    1. Re:Does a clean architecture matter? by Penguin+Programmer · · Score: 2, Insightful

      I think Twitter has probably done it right: use the clean architecture to build the app cleanly and quickly, then put developer cycles into making it fast and efficient, possibly losing some of the niceness of the architecture in the process.

      That said, I don't really think that clean architecture and speed are orthogonal goals. Frameworks like Rails add overhead because they are general - they allow you to do all sorts of things on top of them, and still support all those things even when you're only using some of the functionality. You can maintain your clean design while improving efficiency. What you lose is the ease of adding new features, since you strip out the generality and agility of the framework.

    2. Re:Does a clean architecture matter? by vux984 · · Score: 4, Insightful

      On the other hand, perhaps the bottlenecks are somewhere inside the Rails framework, and the Twitter team thinks that it'd be simpler to move to a new framework than to invest the effort to fix Rails.

      That would be the crux of it, as I read it.

      The rails framework is aptly named. Its like driving a train. You follow the rails. Its easy, simple, and those are its strengths. But if one day, you decide you want to cut across a field save a few hours of travel, well, you probably shouldn't have chosen 'train' as your mode of transportation.

      The simpler and easier a framework is the harder it is to change its behaviour in ways the designers didn't expect. Its like using Microsofts web rendering controls in an application... they are drag and drop simple to use and that's great. But if you want to tweak them so they handle a particular css element in a different way [read standards compliant way], its not going to happen. The -best- you can hope for is to pre-parse the document to rewrite it in a way that the rendering control will get the appearance right, because you are NOT going to change the rendering behaviour itself easily. Better by far to just switch to a different rendering engine.

      Conversely the more robust a framework is, and the more hooks they give you to inject/alter behavior, the more complicated and bug-prone it is to develop with.

      Rails is a trade off... great when it fits what you need, abysmal when it doesn't. And rails in particular from what I've heard is especially frustrating when its 'oh-so-close-but-not-quite' what you need.

    3. Re:Does a clean architecture matter? by samkass · · Score: 3, Insightful

      While system responsiveness is often a product of optimization, scalability rarely is. When a system can scale across orders of magnitude, it's because of a clean, maintainable architecture that allowed components to be completely revamped and swapped in, identified and eliminated high-polynomial (or worse) growth patterns, and allowed more developers to be spun up on it fast enough to keep up with demand.

      On the other hand, if you spend all day pondering the ultimate architecture, you'll never ship and if you do you won't meet requirements. Learning where those tradeoffs are is all about experience and is why the engineers with over a decade of real world experience earn more.

      --
      E pluribus unum
    4. Re:Does a clean architecture matter? by Anonymous Coward · · Score: 2, Insightful

      What is more important? Is developer time and productivity over the software lifetime more valuable than CPU cycles? If the price of that productivity imposes a maximum limit on performance, how much optimization should be undertaken?

      It's a hard question to answer. On the one hand employees are expensive and hardware is cheap. On the other hand, you can't simply forego developing for performance just because of some religious belief that architecture should be clean. This position presents a false dichotomy: a choice between achieving passable performance through good design, versus optimizing for developer efficiency. Efficient use of resources and ease of development are not mutually exclusive -- why should they be?

      When developers say "Hardware is cheap" in response to poor architectural choices, what they're really saying is that "Our hardware costs are externalized".

      This has little to do with "speed, memory, and response time at all cost", and everything to do with architecting for your problem space, avoiding grossly inefficient architectures -- you must model the natural concurrency of the system, use only the RAM you need to get the job done (not the RAM you need to run 50 duplicate interpreters), etc.

      The basic architecture of shared nothing, fork()-based scaling in Rails is flawed in this regard, and that has little to do with developer productivity and everything to do with poorly thought out architecture, and poorly implemented abstractions.
    5. Re:Does a clean architecture matter? by vux984 · · Score: 2, Informative

      The rest of your post is sound, but this particular snippet is simply technically incorrect, assuming we're talking about ASP.NET.

      That would be an incorrect assumption. I was actually referring to a winforms web browser control:

      e.g.
      http://msdn.microsoft.com/en-us/library/2te2y1x6.aspx

      This is a control that takes an url or webpage as input and renders it in a control. Its basically an embeddable web browser. And of course it relies on the Internet Explorer (Trident) rendering engine. I use them, for example, for printing in quick and dirty utility apps. Suppose I've got some data structured as an xml document -- its SOOO easy to just write a quick xsl transform, and push the xml through it to an attractive formatted html/css document and feed it to this control which renders it, and can also print it.

      Instant attractive report printing, and as a bonus I've got attractive onscreen display that copes with rezizing etc, the option to save as html/css. or even as an xml/xsl pair. Which makes it easy for someone else to work with the data, and view it attractively.

      Contrast with the effort of developing something to print 'manually'. Which just gets me printer output and is a TON more work.

      The big handicap though is that I'm basically embedding 'Internet Explorer', and leveraging its features... but I get all its warts too, and have little real control over the rendering.

      All stock Web controls provide a protected non-sealed virtual method named "RenderControl" (actually, they all inherit it from their common base class). You can always override that in a derived class, and do what you see fit in your implementation, without any preparsing.

      All true, and I'm a big fan of ASP.NET because of this. The only things that really bug me about asp.net rendering output is that:

      a) some of the defaults really suck (but can be easily fixed as per above),

      b) the fact that they seem to have disowned maintaining the browser-capabilities which is why safari 3 gets treated as 'downlevel' for items like certain menu control configurations when it's more than capable of handling the uplevel code correctly. And worse the company they handed it off to... 'cyscape' has even less interest in maintaining it... no they want me to pay for their product that does it.

      If Microsoft wants to support uplevel/downlevel browsers and send custom code to different browsers, that's great. But I shouldn't have to manage this myself except maybe for bleeding edge beta browsers. And I certainly shouldn't have to bloody pay for it.

      c) the __VIEWSTATE and a couple other item names that piss off 'html tidy' and don't validate as strict xhtml. I've never found a good way of 'fixing' that. I've seen a few idiotic solutions that run a regex on the incoming requests and outgoing pages to fix it, but that's a stupid performance hit just to get a 'green-checkmark'.

      -cheers

    6. Re:Does a clean architecture matter? by bill_kress · · Score: 3, Insightful

      Premature Optimization is the root of all evil.

      I've never seen anything saying otherwise.

      Follow any of these sets of rules:

      http://c2.com/cgi/wiki?RulesOfOptimization
      http://schwern.org/~schwern/talks/What_Works/What_Works/slide016.html
      http://www.cs.cmu.edu/~jch/java/rules.html

      Or my version--
      1) Don't optimize, no really, don't.
      2) If you absolutely have to, write it unoptimized, test it, write it optimized, then:
      2a) If the first is anywhere in the ballpark, throw away the second,
      2b) If the second has enough of a proven, documented speed gain to get you past some accept/no accept barrier, comment out the slower one, but keep it so the next guy can follow the "Good" code.

      If you don't document exactly what you did in the code and why, I'm going to refactor it into something readable the second I see it.

      Also--know how to program. Choosing a linked list instead of an array list for an insertion sort is just programming correctly. It's not an optimization.

      -1 offtopic... Just wanted to help the parent out with his cow-orker.

  5. According to Penny-Arcade: by spun · · Score: 4, Informative

    This is what Twitter is for.

    --
    - None can love freedom heartily, but good men; the rest love not freedom, but license. -- John Milton
    1. Re:According to Penny-Arcade: by mini+me · · Score: 2, Informative

      And Penny Arcade is a Rails site!

  6. Re:What is Twitter? by svandoren · · Score: 2, Informative

    What is Twitter and why is it significant that they are abandoning it as opposed to anyone else?

    It's a service to announce to your friends what you're having for dinner, how satisfying your bowel movements are, and whether or not you intend to see the hip concert that is happening next week in your neighborhood.

    It's the blog without the content, the conversation without the words, the letter to a friend without the feeling, and the kiss goodnight without the tongue.

    As for the significance of them allegedly leaving RoR, that's anyone's guess. Probably to incite more PHP vs. RoR battles on /.

  7. Re:What is Twitter? by nine-times · · Score: 5, Insightful

    I think it is one of the most usless things on the face of the earth but it seems popular for some strange reason.

    Most popular things are useless.

  8. Ruby Can't Scale by Foofoobar · · Score: 5, Insightful

    And for all those Ruby people in denial to the fact that people have been saying this for years, here is your proof yet again. Of course I will be marked down as being a troll for pointing this out by the RUBY comunity but it is time that they acknowledge the inherent achilles heel of the language.

    --
    This is my sig. There are many like it but this one is mine.
    1. Re:Ruby Can't Scale by ivan256 · · Score: 3, Informative

      They're complaining that the framework can't scale. Not the language.

      Please refrain from commenting when you don't know what you're talking about. The desire to stir up a flamewar is not sufficient justification.

    2. Re:Ruby Can't Scale by Masters+Champion · · Score: 2, Interesting

      What is it exactly, about the framework/language that makes it difficult to scale? Honestly, I've heard this complaint about RoR for years, but no one I know has enough knowledge to verbalize the issues. Can someone who is knowledgeable in RoR give a few points here?

    3. Re:Ruby Can't Scale by Standard+User+79 · · Score: 2, Informative

      Sure, the problem is that 1) Rails isn't thread safe/no native threads and 2) Ruby processes are very expensive in memory.

      So. Since rails isn't thread safe you have to use a process model where one process handles one request. Now these ruby processes can get up to 100MB in ram (depending on application). That means it takes 100MB to post a comment, display a page,etc.. This is an extremely unforgiving environment when you are trying to scale. There are many scenarios where just a little extra i/o wait in your system will cause everything to crash and burn.

      A lot of RoR developers are looking at merb. No native threads but it is thread safe and solves the problem I described above.

    4. Re:Ruby Can't Scale by ivan256 · · Score: 2, Insightful
      You don't have to RTFA. Just read the fine summary:

      Candidates to replace Rails are said to be PHP, Java, and Ruby without the Rails framework.


      If the language were a problem, then Ruby without Rails wouldn't be an option, now would it? Think about that, genius.

      And actually, I'm not a ruby developer. Nice try though.
    5. Re:Ruby Can't Scale by DragonWriter · · Score: 2, Informative

      Well for starters, active record and the notion that everything always should go to the database. In the rails world, caching refers to page generation where in like the ASP and J2EE worlds, there is also data caching from the database.


      Using memcached to cache, among other things, ActiveRecord objects instead of always hitting the database has been a common practice for people using Rails (and lots of other frameworks, Ruby and otherwise) for years. So, AFAICT, you're just plain wrong here. Now, it may be a valid complaint that database caching isn't integrated into Rails, but its certainly not something foreign to the Rails world as you suggest.

      No threading or service module notion. Everything is tied to servicing a web page. Long lived jobs mean long lived web page renders.


      Assuming you write the long-lived jobs in Rails, which is just the wrong way to do it. You are right that everything written in Rails is centered around servicing web requests; if you need to trigger off long-running processes from that that are themselves only indirectly bound to the request-response cycle, you do that outside of Rails entirely. I would guess the easiest way to do that would be to use the database as the communications vehicle between Rails and whatever system you build to handle the long-running processes using ActiveRecord on the Rails side (and, if you are using Ruby "off the Rails" for the other end, possibly on that end as well), though there are other options.

      Rails isn't even conceptually aimed at being a general alternative to the kind of technologies you hold it up against (J2EE in particular).
  9. Hype vs. reality... again. by revscat · · Score: 4, Insightful

    Rails was the cat's pajamas two years ago. The future. The in-thing. Revolutionary. Exciting. Radical. Amazing!

    Then like so many similar times before, reality set in. It turned out to be buggy, unstable, less performant, and heavily dependant upon an evangelical base.

    Ruby the language is interesting. Not my personal cuppa, but I have nothing against it. Rails, however... After having analyzed it and developed a prototype application for my company, I came to realize that there are other frameworks out there that are more worthwhile, epecially in an enterprise environment. The problems I've seen Twitter experience only solidify this.

    If you are doing green-field development Rails should probably not be your first choice. Yes, Rails is interesting. No, it is not the end-all-be-all, and it certainly has some rather major warts.

    1. Re:Hype vs. reality... again. by revscat · · Score: 2, Interesting

      When Twitter opened it was handling 11,000 requests per second and doing it well. Twitter has gone from nothing to sensational in a very small amount of time. If you hit the ground running that quickly, your growing pains will be evident regardless of what framework or language choice you're using.

      That I'm going to have to disagree with you on. For starters the most recent troubles that have plagued Twitter happened as recently as a few days ago. They have had plenty of time to mature their stack, but they are still seeing major downtime.

      Second, I work for a major website and over the past two years we have *never* experienced downtime like what I've seen on Twitter, and we get far more traffic. We're on a J2EE stack, and without getting into evangelism I wonder how much of an impact that has had. It certainly has a better track record for us.

      Now, large-scale enterprise applications are difficult (if not impossible) to meaningfully compare. But one can't help but notice these things. Twitter goes down a lot, and it's not all that complicated of an application. Why? A lack in a robust QA group? Operations? Rails itself? All of the above?

    2. Re:Hype vs. reality... again. by Anonymous Coward · · Score: 2, Interesting

      Standard prologue: I work at yellowpages.com, a Rails site that gets millions of searches a day. The site went from 125,000 lines of Java to around 14,000 lines of Ruby and shrinking. For more details, see our presentation at RailsConf.

      How many servers has your operations group had to add? What has been the increased cost for co-location space?

      Decreasing the lines of code doesn't require stick ing a fork in scalability. Servers, power, and cooling are NOT free.
  10. Re:What is Twitter? by gatzke · · Score: 3, Funny


    In my day, we had talk, finger, vi, and elm and we never complained! Green vt100 terminals were all anyone really needed! Get off of my lawn!

    Seriously, talk had advantages over IM. You actually could see what the other person typed as they typed it, including backspaces...

    And finger worked great. I knew a nerd that had his .plan updated automatically to show where he physically was logged in. As if anyone cared?

    The more things change, the more they stay the same.

  11. Re:What is Twitter? by Anonymous Coward · · Score: 5, Funny

    See Hilton, Paris

  12. Re:What is Twitter? by garcia · · Score: 2, Informative

    I think it is one of the most usless things on the face of the earth but it seems popular for some strange reason.

    It depends on what you use it for. For what I use it for it's quite useless but if you're into notifying groups of friends what you happen to be doing and want it to be delivered by their preferred method of receiving that information, then it's great.

    I want to tell 10+ people that I'm going away for the weekend and I don't want to deal with two SMSs, three e-mails, four IMs and one phone call so I just fire off a message on twitter and it's all done and everyone gets the information quickly and easily.

  13. Re:What is Twitter? by Poltras · · Score: 4, Funny

    and digg, reddit. Not slashdot though.

  14. The problem is ruby by mdipierro · · Score: 4, Interesting

    The problem is Ruby. It is a very slow language (http://www.blognone.com/node/4385). My tests confirm it is 20 times slower than python in simple loops. Java is a dinosaur and PHP is not easy to maintain. I would go with Django or web2py. If they use web2py (http://mdp.cti.depaul.edu), I will help them. web2py scales very well because allows you to bytecode compile the models, the controllers and the views (so there is no parsing when serving a page) and cache every function in ram.

    1. Re:The problem is ruby by DragonWriter · · Score: 2, Insightful

      My tests confirm it is 20 times slower than python in simple loops. /blockquote

      Since in many simple tests, JRuby and Ruby 1.9 are 10+ times faster than Ruby 1.8, I wouldn't be really impressed that on some simple tests Python is 20x faster than Ruby 1.8. Not that any of the speed tests in the tables on the linked page show a 20:1 ratio in either direction between Python 2.4 and Ruby 1.8; and the only one that is over 10:1 in favor of Python doesn't use similar methodology in the Python and Ruby tests.
  15. Rails Gives Fast Development, Not High Performance by randyjparker · · Score: 2, Interesting
    Twitter was smart to use Rails to develop their business, and is also smart to move the performance-critical message queueing and posting portions to a higher performance technology when it got big and mature. The evolving parts are best left on Rails.

    Rails remains the best way to develop solid and maintainable web apps. But it will not compete with C for speed. Once you understand your business process, and have developed a mature algorithm to make the business work, there is nothing wrong with writing the core infrastructure in C. There are lots of C libraries that do the core part of Twitter. But the company would have been idiotic to start with them, and would be foolish to move new development off Rails.

  16. I saw it on the Internets, it's true by CommandoCody · · Score: 2, Insightful

    So, er... TechCrunch says "multiple sources claim that Twitter is abandoning RoR."

    The guy who founded Twitter says, "no, not really."

    And TechCrunch says, "but we have MULTIPLE SOURCES."

    Guess what? I have MULTIPLE SOURCES that say the Earth is flat!

    Must be a slow news day.

  17. Re:What is Twitter? by petermgreen · · Score: 2, Interesting

    Seriously, talk had advantages over IM. You actually could see what the other person typed as they typed it, including backspaces...
    ICQ actually offered a "chat session" feature that did that. but it required direct client-client connection which made many people (me included) abandon it. Also it apparently had fairly high network overhead.

    I tend to think being able to compose your thoughts before letting the other end see them is probablly a good thing anyway.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  18. The problem is the database by arevos · · Score: 2, Informative

    I don't think the problem is Ruby. Whilst I'm not associated with Twitter, I have seen some of their presentations on subject of performance, and the major bottleneck seemed to be the database, and ActiveRecord's unoptimized querying of it.

    MatzRuby 1.8 is somewhat slow, but it does proportionality very little work compared to the MySQL and Memcached back end. Quite frankly, I've never seen a performance profile of a Rails site where Ruby was the problem; it's almost always the database, or too many AR queries.

  19. Comment removed by account_deleted · · Score: 4, Informative

    Comment removed based on user account deletion

  20. Re:What is Twitter? by LurkerXXX · · Score: 4, Insightful

    Or you could just email them all.

    Unless you are claiming there are a substantial percentage of folks who use twitter but don't use email. I'll want citations for that though, because I don't believe it for a minute.

  21. Re:Sense, you're not making any... by claytonjr · · Score: 2, Informative

    The RoR is a movement that depends on it's public perception. If Twitter abandons the RoR framework, then RoR could lose (if it hasn't already) a lot of steam, and appeal to the general public.

    The RoR community does not want this to happen.

  22. Re:What is Twitter? by STrinity · · Score: 3, Funny

    Twitter is a site popular with a small coterie of techies who talk about it incessantly, but which no normal person would ever use.
    Fixed that for you.
    --
    Les Miserables Volume 1 now up with my reading of
  23. Re:Examples? by beldraen · · Score: 4, Interesting

    Having worked with Rails for a year, I have found listening to people who talk on any web forum about any language draws out nothing but hyperbole. So, I would take most of what is said here with a grain of salt since it is obvious that most of the people commenting here are stating "truths" from religious wars.

    The framework operates a multiple levels. At the highest, a complete page can be generated from scaffold that automatically hook model to controller to view. I have found the scaffolds to be lack luster. From a completely database-centric view, there are some neat things that are automatically generated. For instance, verification methods in models are use to display errors on the page and mark input fields in red. My personal experience has found scaffolds to be lackluster.

    Most well-designed applications revolve around the application's use, not its internal data representation. Using scaffold strongly ties the interface to data representation which creates the situation that "the user can be wrong." You see this in Microsoft Access databases where you can enter something in or choose options that are mutually exclusive. Because the application lets you see that data, the program generates an error if you are wrong. From what I have seen, the gripe is that the full scaffold is too specific and rigid. Well, duh?! That's the point of each layer of scaffold--to provide a guide for usage.

    Personally, I have shunned most of the page scaffolding and tend to rely on creating my own use flow. I use the controllers to present that choices are possible and to manipulate the models as opposed to the common practice of having the controller just load a set of records and pass it to the view (which formats the output). The advantage is that the user is never wrong. Options that are logically inconsistent are never presented. Add to this the ability to monkey-patch (the extension of predefined classes) and lambdas, the code is clean and concise. Both can be used to refactor procedural code into functional code and move it out of the controllers and models. Most importantly, the design allows you to think about what you want to manipulate and then after the fact extend the functionality. A common example of the is the statement:
    1.day.from_now
    The numeric class is extended in Rails so that you do not have find and use a static date class, but can state simply the desired result.

    So, where does it fail miserably? So far, I have not found any great place that it does. It performs as well I need it to serve about a dozen users on a lowly Pentium 4 machine with 256 megs of RAM. So far, the application has been 99% maintenance free. A date verification package I am using had a Feb 29th bug in it. The cool thing is that since I can see the source, I could fixed it. Perhaps there are issues with scaling, but from what I understand, the system was designed around a non-centric design. In theory, a correctly designed application should be able scale horizontally.

    Given that there are other high-profile, high-use web sites written in Rails that do not suffer from Twitter's issues, I am left thinking that its failure in general looking for a specific reason. Rails has been very stable and easy to extend, but then I write for maintenance and ignore hype.

    --
    Bel, the mostly sane.. "Of course I can't see anything! I'm standing on the shoulders of idiots." -- Me
  24. Yes, in fact, RoR DOES suck (WARNING: RANT.) by pseudorand · · Score: 4, Interesting

    Pardon the off topic rant (please feel free to mod appropriately), but I have to agree that RoR DOES SUCK. (At least I didn't set up my own blog just to rant about it.) The RUBY language is the best thing since sliced bread, but Rails isn't. And I'm not talking about the installation and management issues like everyone else. I mean from a developer's perspective, RoR is horrible. Here's why:

    1) Automated copy-n-paste is still copy-n-paste
    Maybe it's changed since the last time I used it, but creating a rails application COPIES a bunch of files from the distribution into the app directory it creates. How do you upgrade? Painfully, that's how. I have numerous small applications that break when I upgrade rails and it's dependencies because the copied files don't work with the newer version. My applications should be 100% code I write directly. Everything else should be kept separate and accessed via includes so emerge/apt/yum/gem dependencies can keep the rails code compatible with itself and I never have to "fix" code I didn't write.

    2) RoR gives you the 1% that's used 10% of the time, not the 10% that's used 90% of the time.
    So you set up a RAILS app, create your database table, and run 'generate' to get your pseudo-MVC (seen #4 below). You've got everything you need to edit a single table via the web, but that's not even close to an application. It probably saved me about 1/2 of setting things up by hand. That's simply not good enough. It should be able to create an app that supports validation (both JS and server-side for obvious stuff like numeric and lengths), sorting, filtering, searching, relationships, and css skins. It could do this just from the information available in the database metadata, which would get you 90% done. And a huge number of simple apps could be completed simply by writing a custom CSS skin and adding some graphics.

    3) No UI components, which are the hardest part of web development.
    Most of what rails does buy you is the back-end stuff. It's an easy way to get stared with ActiveRecord, which does the heavy SQL lifting. AR, the one shining gem of RoR, is a great object-relational model and I believe it is responsible for 99% of RoR's popularity. But SQL isn't that complicated in the first place. The real tough part of web development is getting rich, graphical, reusable UI components that work across web browsers. Prototype/Scriptaculous are a wonderful starting place, but I need code that I can feed an AR class (and possibly a list of columns and/or related tables+columns) that will generate cross-browser compatible HTML view of the table complete with searching, sorting, filtering, and paging. There could be functions/objects that render it as a table, a list, a tree, etc. You're probably thinking I should just use .NET and it's various components, but I don't want to work on Windows, I don't want to work with IIS, I don't want to write VB or C#, and .NET really does a bad job of layouts and makes a lot of other stuff more complicated. And it's ORM simply can't touch ActiveRecord. Rails does only a tiny amount of what it could and should.

    4) It's NOT MVC
    The Model-View-Controller design pattern is about limiting the amount of communication necessary by having one instance of some code (the controller) that all access to data (the model) from other code (the views) goes through. Views subscribe to a model, get their data and then do their thing without worrying about other views. If some other view changes the model, the controller notifies all other subscribed views of the change. Rails MVC is something totally different that doesn't solve the same problem. Rails does provide data validation via AR, which is part of true MVC, but it still misses the point of MVC, which is a coherent and always up to date set of views into the model. In fact, an MVC is impossible to implement over the web because communication is one way: the browser must initiate all communication with the web server. (For those that don't "get" this,

    1. Re:Yes, in fact, RoR DOES suck (WARNING: RANT.) by keester · · Score: 2, Informative

      You are wrong about MVC. In classic MVC, Vs access Ms directly. Cs manage changes to Ms and select Vs to be displayed (which in turn access Ms). Web frameworks do not implement classic MVC. What you're describing is something that used to be called model 2 in the struts world.

      The /*/view mapping is a way to have "restful" URLs and are the result of browsers (and I guess HTML) not fully supporting/integrating with HTTP. In general, they are good thing, and you'll see them outside of Rails, of course. "view" just happens to be a bad one because browsers support GET which is what a view is going to be.

      --
      Take it easy? I'll take it anyway I can get it . . .
    2. Re:Yes, in fact, RoR DOES suck (WARNING: RANT.) by graznar · · Score: 2, Informative

      You're obviously very misinformed or your information is out of date or something.

      1) Yes, it copies things into your Rails directory. Know how to fix that little upgrade problem? rake rails:update. Done. They made a task to do exactly what you describe.

      2) There are plugins available that do all the things you describe, but the Rails framework is meant to be a very slim platform to build applications on. If you want all the bells and whistles, look up things like ActiveScaffold, Magic Models, etc. The point of Rails isn't to make an application for you like Joomla or something; it's a framework/platform to build things like Joomla on top of.

      3) Again, plugins. It isn't Rails job to generate your HTML designs for you.

      4) It's as close to MVC as you're going to get on the web. It IS MVC in a loose design pattern sense, but of course I'm not a purist so who cares.

      5) You don't have to use mod_rewrite. Rails has extremely rich routing. You can make any URL point to any controller, action, and even provide custom parameters to that action dependent on the URL. I don't think Rails has used mod_rewrite in something like 3 years. Even further, most heavy duty deploys of Rails these days use nginx, not Apache or Lighty as you describe.

      It seems that your opinions are based on an old version of Rails or something. So, I adjure you to go check out the new version. It's matured a lot in the past 1.5-2 years.

      --
      [ check out my ruby book @ http://ww
  25. Re:Sense, you're not making any... by hairyfeet · · Score: 2, Insightful
    Uh,thanks,but if you'd read any of my past posts you would know(probably to your horror)that i wasn't trolling. When you need to whip off a simple interface to a database EXTREMELY fast for a little Mom&Pop shop IMHO nothing beats VB6+either Access or MySQL(depending on what is handy and the size of the shop).


    I know it isn't considered trendy,although "Good Old VB6" is still in the top 5 of programming languages(number 3 to be precise) and as long as you aren't trying to build some gigantic multi-use program it really works great. Of course I've been using BASIC since the days of the VIC 20(recording my programs to a cassette,boy THAT was fun) so for me it just works.YMMV of course and I've known guys that can do the same in Java,C++,etc. IMHO if it does the job you need it to and the customers are happy I say go for it.

    --
    ACs don't waste your time replying, your posts are never seen by me.
  26. Re:There's a whole monty python sketch for this sh by Hognoxious · · Score: 3, Funny

    it's a conversation starter for people who enjoy arguing.
    No it isn't.
    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  27. Re:What is Twitter? by kadnan · · Score: 2, Funny

    Most popular things are useless.

    Like Windows?
  28. Re:What is Twitter? by Irish_Samurai · · Score: 4, Insightful
    They have figured out how to monetize it.

    Actually, all of these free social networking services have figured out how to monetize it.

    Twitter is the honeypot to collect a group of users. After a density of users is reached, larger communication companies will start looking at purchasing Twitter so they can "integrate" their service. Nevermind that integrating a free service with an available API doesn't require purchase.

    What the larger company is actually doing is buying customers.

    From the TOS:

    Business Transfers Twitter may sell, transfer or otherwise share some or all of its assets, including your personally identifiable information, in connection with a merger, acquisition, reorganization or sale of assets or in the event of bankruptcy. You will have the opportunity to opt out of any such transfer if the new entity's planned processing of your information differs materially from that set forth in this Privacy Policy. Build Service - Grow Userbase - Sell Demographic data.

    It's the web 2.0 business model, all coated in a lovely veneer of altruistic "doing it for the love of geekiness" bullshit.
  29. Re:What is Twitter? by achacha · · Score: 3, Insightful

    Personally I would never run a high volume site on top of a scripting language platform. While RoR is pretty nice on getting a site up and running and integrated with a database, it is still poor in the scalability department.

    For a medium to large site they should consider using servlets and java and avoid J2EE.

    For a very large site I would recommend C/C++ and maybe java if they have the budget for hardware.

    The toughest part is getting developers that can code webapps (not just CGIs) in C/C++ (while easy to do C/C++ developers overall are hard to find and are not as cheap as ruby/perl/python ones and even java ones; this is from experience of trying to hire them). So they should check their developer base and see what is the fastest language they feel very comfortable with and go with it. From experience they may have to settle for java since that will provide them a large pool to pick developers from and the learning curve is slightly less steep than C/C++.

    I suspect they fell into the trap of building a demo fast using RoR and then just going with it into production, I have seen this way too many times unfortunately.

  30. Re:What is Twitter? by lgw · · Score: 2, Interesting

    Wow, generating and serving web pages in C/C++ - does anyone still do that? Are there any modern libraries that, for example, make your tables look good by emitting different HTML based on the browser? That layer of abstraction is key these days, but I've only seen people doing it in PHP.

    A modern C++ library that takes an abstract layout description and creates browser-specific HTML to match that description would be a very cool thing. A C++ library that merely generates "standard HTML, verified by the W3C" would be a nighmare to work with/around.

    --
    Socialism: a lie told by totalitarians and believed by fools.
  31. Re:What is Twitter? by achacha · · Score: 2, Informative

    Actually yes and majority of the huge sites on the web use C/C++ (having worked on several where 10 million hits a day is an easy load). Most places have their own but stl + boost is pretty damn nice and will do most of the things you want. You would probably want to look into writing ISAPI extension or apache modules which is not difficult at all and the performance difference between say C and java is significant. One point to note, java garbage collector under severe loads is not pleasant to tune (I have to deal with that currently and it's a pain). Its not uncommon for java process to spike to 1GB+ in a matter of seconds before GC has a chance to kick in and slow things down :) In C you can allocate and release memory in a much more controlled way thus controlling the server's footprint under spikey loads.

  32. Re:Follow the script by fm6 · · Score: 3, Insightful

    C/C++ fastest way to execute web apps but also more difficult If all your web apps are faster with C/C++, you must run some very strange web apps. The efficiency of C++ comes from the fact that it compiles to machine code. Machine code only has an advantage when the CPU is the bottleneck. What kind of web application is CPU bound? Network and disk, more likely.

    And indeed, your experience differs a lot from that of thousands of web developers. Perl in particular had been called the Duct Tape of the Internet.

    Speaking of Perl, I notice that your complaint it is not that it's slow, but that it's hard to support. That's a legitimate complaint, but it says nothing about the relative efficiency of scripting languages.

  33. Groovy on Grails instead? by LionMage · · Score: 2, Interesting

    I wonder if they've considered Groovy on Grails instead of Java or PHP? Groovy has all the dynamic language features that make Ruby and JavaScript popular with developers, but is essentially 100% backward compatible with Java (since it's running on top of the Java VM and is implemented in Java). Groovy also leverages Java and any other language that can be hosted on the Java VM because it interoperates with all of that stuff, and itself runs on the same VM. You also get legitimate closures and simplified syntax for many things. It can even give you Java 5 semantics (generics, enumerations, etc.) under JDK 1.4.

    Grails is very similar to Rails, but is not a straight port -- more "inspired by," as it's described by its proponents. Grails also doesn't have the problem that Rails has in terms of scalability and performance, since it's built on Groovy/Java (which have a real threading model). No screwing around with creating a zillion Mongrel instances to scale your site, etc. And if you don't care to use the built-in web server that comes with Grails, you can have the Grails framework generate a WAR file which you can deploy in any container like Tomcat or Jboss.

    At a recent 3-day Grails training session taught by Scott Davis, I was surprised to hear that some major corporations have jumped on the Groovy/Grails bandwagon, including Mutual of Omaha. For a conservative company to make that kind of leap says something. (Furthermore, they used to be a COBOL shop -- the rationale appears to be that it's easier to get COBOL programmers to make the leap to Groovy first, then switch slowly to Java, as opposed to migrating directly to Java.)

    After that 3-day training, I was pretty impressed. The biggest win for Grails seems to be rapid development and deployment, but all the other stuff you get for free in the package makes it something you'd like to stick with. I'd say the thing that most impressed me with Grails was GORM, which makes Hibernate even easier to work with. GORM spoils me, since it obviates the need to write SQL most of the time.

  34. Re:Follow the script by mysqlrocks · · Score: 2, Funny

    I have been writing web apps since 1993 and have used C/C++, java, perl, python, ruby, and even lisp and honestly I have yet to encounter a script language that can handle high load environments.

    Have you tried PHP? I hear it runs several high load websites ;-)