Understanding eBay's plug-in Architecture

DZone 's Guide to

Understanding eBay's plug-in Architecture

· Java Zone ·
Free Resource
My girlfriend is an avid eBay shopper, buying everything from fine perfumes to accessories for her iPod. The other day I asked her if she was ever curious about the underlying technology supporting such a massive eCommerce site. It turns out that she is only interested in winning every bidding war she enters into for that 'must have' item. She'll sit in front of her laptop at midnight, rapidly refreshing her screen to make sure that she hasn't been outbid. She wins everytime. 

Michael Galpin has written a fascinating two part series on IBM Developer Works describing the evolution of eBay's architecture to an Eclipse-based plug-in framework that helped them solve some thorny front-end scalability issues.

"The V4 architecture took the approach of representing everything that was going to be used on the front end with strongly typed Java objects on the back end. Does your page use an image? Then there is a
Java object for that image. If you want to delete that image, it's as simple or as complex as deleting any other Java class. The same can also be said for links, CSS, and JavaScript. V4 does not use servlets or JSPs to create HTML. Instead, the actual HTML DOM is represented in the Java language, so you can
wire together CSS and JavaScript on the server."

Galpin then proceeds to show how JsDoc annoations can be used to create references to Java classes by specifying extra meta-data within the Javascript classes - This effectively allows eBay's plug-in framework to generate the Java domain objects from Javascript. He concludes the first part by showing a really cool example of how a running eBay instance can be introspected for its constituent V4 components, by mousing over an eBay Web page in production - the user is presented with a series of options, one of which includes opening up that particular component directly inside Eclipse.

I'm sure my girlfriend could probably care less about the magic happening behind the scenes here. But maybe, just maybe, the next time she's bidding on that gold bracelet, there will be a momentary appreciation of the work the good folks at eBay are doing to help her 'eBay refreshes' render at lightning speed.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}