Brandon Werner

Archive for the ‘Mythological Ajax’ Category

Twitter Admits: Ruby On Rails Can’t Scale

Friday, April 13th, 2007

Twitter, the service I talked some time ago (and use on my website for fun) is from the same company that releases the podcasting website Odeo. In order to get their AJAX goodness, they use Ruby on Rails. Needless to say, as Twitter has exploded they’ve run in to problems in scalability. But instead of hiding it (the way us Mac users hide that there is, in fact, an OSX BSOD) the lead developer is actually pretty frank:

None of these scaling approaches are as fun and easy as developing for Rails. All the convenience methods and syntactical sugar that makes Rails such a pleasure for coders ends up being absolutely punishing, performance-wise.

EDIT: I apologize for getting the companies mixed up. I knew that Twitter came from an experienced team already use to doing AJAX work, and when I saw the response to the Twitter scaling issue came from David Hannson, of 37 Signals, I got confused.

(Link via Daring Fireball)

Congrats to Floyd Marinescu, creator of Server Side did it again

Thursday, June 8th, 2006

My buddy Floyd Marinescu, author of the best-seller EJB Design Patterns and the creator of TheServerSide.com has officially launched his latest enterprise community website, InfoQ.com. When he left the server side last year, I was floored. TheServerSide.com was, under Floyd’s leadership, one of the best places for enterprise programming.

The new site expands the enterprise world away from Java-only coverage, and takes on both horizonal topics like Java, Ruby and .Net and vertical topics like Agile, SOA and patterns. It’s also very fresh and clean with easy navigation and quick reference to information.

I promised him I’d write something for him for the new site, but I got bogged down with my work and couldn’t do it. I’m certain, given the success after the launch at JavaOne 2006, they certainly don’t need my help

Read more about it here

P.S. I meant to write about this sooner after the launch party, but I accedentially called him on Skype tonight (he’s stuck right below Bruce Tate and Dick Wall) and it jogged my memory. Add it to your links and sign up!

Are we gonna bash Restlet next?

Friday, January 13th, 2006

I got a lot of heat for stating that the way to save Java EE was to focus on architecture and not concrete JCP implementations. Although my metaphor regarding AJAX was over-represented in the press, I still believe that we shouldn’t be so concerned about using non-JCP technology in implementing Java EE architecture.

As I stated a few weeks ago:

If I am an enterprise developer, and the architect has done his job of abstracting DAO and dependent objects from the Business Objects, I can quickly plug and play from Spring to EJB 3.0 quickly. That was the whole point of DAO patterns in the EJB 1.x and early EJB 2.x days; so that when this mythical time came when CMP EJBs were fast and ready for wide deployment we could just implement that, clean the overrides and slice off the DAO / JDBC side… Why was it acceptable to do this during the J2EE 1.4 days with EJBs, but is sacrilegious to do so now to allow for Spring vs. EJB 3.0 plug-and-play? How does it not help JEE principles to write Adapter patterns to do this anymore than it did to abstract the dependent objects from DAO or to incorporate XML web service processing in our Business Delegate patterns using the Delegate Adapter Strategy?

I got knocked by Gavin pretty hard on talking down EJB 3.0, but I can’t help but think that now that his technology has been integrated in to the JCP (i.e. he won) he has become a little bit of a cheer leader for all things JCP. I wonder what he would think of Jerome Louvel’s Restlet project, a implementation of Roy T. Fielding’s excellent doctorial thesis on the REST architecture style.

The Servlet API has grown significantly over the last few years, with the addition of JSP, JSF and web service consuming all being stapled on top of the common API. Essentially, anything that has to do with HTTP travels through servlets. Although extremely simple and flexible at the base level, which has allowed for so much to be implemented on top of it, it has begun to show it’s age in its general philosophy towards persistence and mapping of sessions. Restlet is a replacement for the Servlet API and provides a lot of advantages over Servlets in HTTP communication, particularly for web services. Why has Restlet generated so much attention lately? Simply put, once again someone has decided to throw off the shackles of JCP-implied restrictions and write a solution that does not have to be crippled by the problems of the previous architecture (NIO blocking, session persistence). As we move in to thinking about SOA and the speed to which we can access and process web services from the ESB, Restlets might have appeared at just the right time.

What Spring and Hibernate did to EJB 2.x and J2EE in general, Restlet promises to do to the Servlet API.

This could mean more than just a replacement of course, but an eventual adoption and approval by the JCP. Just like Hibernate and Spring did to EJB persistence and Dependency Injection (killing my favorite asexual pattern, the Singleton), even a change in mind-set or “what is possible” could impact the next round of JCP submissions. In fact, This may already be happening as we speak.

This addition of Restlet to the Java EE open source landscape confirms what I have stated about programming to the problem domain using JEE best practices instead of just writing to the JCP specification. Those Jave EE architects who model the problem with an open mind when picking the best technologies for their next start-up or super-go-fast project will be the winners and push Java as a platform forward, particularly in SOA implementations where Java does not have the web service speed advantage.

As Gavin pointed out in his response to me, developers in Fortune 500 companies won’t be using Restlets, but then again they didn’t use Hibernate or Spring either. Although it is certain that these larger companies will always write to the vendor-pitched JCP standards, I believe that this is a demonstration of a weakness, not a strength. After all, what disruptive new way of doing something did any established company introduce? Why do they always kick themselves and try to catch up, when the obvious answer all along is that you don’t change things unless you are willing to take risks in technology?

Restlets, and its implications on the performance and flexibility of web services, is such a risk that could yield huge rewards. Unfortunately, the next Google (or maybe Google itself) will be the ones that deliver on this reward, while IBM and Sun will be demonstrating their Servlet tied technologies to Fortune 500 companies that will gawk at the idea of using such slow communication to and from their new SOA inspired Enterprise Service Bus.

But hey, at least it’s JCP approved and backwards compatible.

How To Write Java XML Pinging (Technorati, blogs) In To Your Application.

Thursday, December 1st, 2005

Another very sought after and often Googled code block from my Fatima (JavaPress) project on Java.net is how to use Apache’s XML-RPC to ping update services for blogs, podcasting, email, ect. Many services like Technorati and BlogSpot use XML pinging, and many people get led astray by using Sun’s XML-RPC library which only uses SOAP.

You must use Apache’s XML-RPC. Why? Since SUN Microsystem’s API(s) insist on using SOAP as the transmission protocol but integrators wish to have XML sent instead, you have to use the xmlrpc-1.2 code from the Apache Foundation. Technorati and others don’t accept a SOAP envelope obviously.

So, here is a ping service for you. Just download Apache’s XML-RPC and call the class.

Do to formatting issues in Internet Explorer, I can no longer include the code in this post. You may download it from the Fatima project on Java.net directly or view it in JavaLobby.

Microsoft Keynote, hardware by Sun

Wednesday, November 30th, 2005

MS Keynote, hardware by Sun If anyone needs any more examples of how behind Microsoft is in its core businesses take a look at this photo from TechEd Europe 2005. It would seem that although it’s a Microsoft keynote (TechEd), they are running the software and examples on Sun hardware. Nice photograph of the dynamics behind Web 2.0 and the new bubble that is forming. Jonathan Schwartz highlights this by stating that Sun might be the “dot in Web 2.0″ as well. The metrics he points to from James Governor’s Blog entry entitled Sun: putting the dot in web 2.0 says it all:

“I noticed an item from news.com today that made me think about Sun and its future: eBay to buy hundreds of Sun x86 servers. It turns out PayPal is also evaluating Sun’s new T1 Ultasparc line. The eBay story follows news that Google is going to buy some of the new elegant Sun kit too… You know Sun has got to be talking to MSN - and Sun is now a Windows poster child.”

I’m running Solaris x86 on all of my boxes here and at the startup. I wouldn’t run Linux again. I’ve had some of the stability and robustness sugar, and I can’t go back anytime soon to rpms, library conflicts, horrible documentation and other headaches. I think Sun Solaris 10 and OpenSolaris are the biggest unwritten stories of 2005. Then again, it’ll appear in full force in 2006 and people will wonder where it came from.