Tuesday, February 17, 2009

Eclipse in the Cloud

About a year ago, at EclipseCon, we showed a demo of how the Eclipse IDE could look like if it was browser-based, talking to an Eclipse server "in the cloud". The reactions were lukewarm: "Looks cool, but why would I want to run an IDE in a browser?" "I have yet to see web enabled IDEs as an industry trend".

This industry trend is now starting to happen.

On Thursday, Mozilla and their new developer tools lab launched Bespin, an "experiment proposing an open, extensible web-based framework for code editing". Within a few days, 30,000 people logged into their public server, 400 people joined their discussion group, about 50 bugs were filed, several of them with patches, and many articles, blogs and even a Wikipedia entry were written. Congratulations, Ben and Dion of Mozilla (and Ajaxian fame), on the successful launch!

We looked at Bespin and asked, wouldn't it be great if Eclipse could play in this space too? Wouldn't it be cool if we could implement a Bespin server using Eclipse plug-ins that already exist?

Well... that Eclipse-based Bespin server is available now, after two days of development!

Simon Kaegi and I locked ourselves into a room and just implemented it. Today, we are declaring success, and are sharing the code as part of the e4 project with anyone interested. If you would like to give it a spin, check out this wiki page.

The Eclipse IDE, as you know it, is an OSGi-based application, and is built entirely out of components (called plug-ins or bundles). Many of these components can run headless, on a server, such as the underlying resource model, the incremental Java compiler, etc. Using the headless components, it was very easy to implement the Bespin client-server API. Like Mozilla's Bespin server, our server supports browsing files and folders, and editing files. In addition to that, we implemented extra features such as showing compile errors and warnings, and checking out projects from CVS servers using anonymous CVS.

Bespin already shows a lot of promise at this early stage. It consists of a surprisingly fast code editor written in JavaScript using Canvas, a file browser, and an emacs-like command line interface for issuing commands. There are two backend implementations provided by Mozilla, one in Python, and one in Java, and the browser-based client talks to the server using a RESTy API. Here is how it looks like:



If you would like to play with the Eclipse Bespin server, or work with us on it, check our wiki page. If there are any questions, hop on IRC, where we can be found on #eclipse-e4/irc.freenode.net or #bespin/irc.mozilla.org as borisb6i and skaegi.

P.S. Mozilla has a cool-looking and fast client, and Eclipse has a lot of experience with IDE features, and good amounts of code that can run headless. Sounds like a great opportunity for collaboration, doesn't it? Well, thanks to Mike and the Eclipse Foundation who organized it, and Dion and Ben who are investing their time and some of Mozilla's travel money, we will have an in-person meeting on Thursday, in Ottawa, to talk about this. These guys are moving fast!

18 comments:

Anonymous said...

Hi Boris,

exciting stuff! Keep us posted.

Personally, I am convinced that web-based IDE's are coming. Certain scenarios, such as learning/training, collaboration and web development could benefit a lot.

A concrete example is Heroku Garden. It's a cloud-based ruby-on-rails hosting service and development environment. Some features are a file browser, a ruby editor with syntax highlighting, console, etc. The whole thing lowers the bar for development and sharing of RoR apps considerably.

Cheers,
Elias.

Ian Skerrett said...

Boris,

This is great news. Very exciting...

Unknown said...

Could you elaborate on how this would work? Are you saying that you'd use Bespin editor on the front end? How does Eclipse integrate with Bespin on the server side? Is Bespin controlling Eclipse, or is Bespin plugged in to Eclipse?

My questions are all leading to how quickly I could support a DSL for domain-driven design/development. Would I want to create an Eclipse plugin for that, or would I need to support the DSL editing on Bespin?

Thanks!
Vaughn

Boris Bokowski said...

Vaughn, Bespin consists of a client part and a server part. We have replaced the Bespin server with one that only uses Eclipse components and left the client unchanged, except for three commands we added.

Not sure about your question on DSL editing - if the DSL is textual, you should be able to use any text editor, including Bespin.

Unknown said...

Ok, thanks. I think the answer then is that I'd create an Eclipse plugin. I know I can do text editing of my DSL, but I want code assist and syntax highlighting, etc. And I want my DSL parser-translator to report errors with the correction squiggly and to the problems window on the fly.

Thanks!
Vaughn

Doug Schaefer said...

Since you seem to have quoted me, I'll have to reaffirm my stance. Sure, hosted development may be interesting in the enterprise space, but my customers in the embedded and desktop space would freak if they couldn't cd into a directory and cat their code.

My fear with e4 is a widening split between Enterprise and Embedded in the Eclipse world, and by sheer numbers, Embedded is going to pay the price.

Legooolas said...

Whilst web-based IDEs look cool and get a lot of press now, they're not going to be much good for writing anything other than web apps.

And whilst everything seems to be going that way, certain segments such as embedded and real-time systems (and others that I cannot think of right now :) won't run web-apps, so there will always be a need to have client-side IDEs.

Ian Monroe said...

@legoolas
Wouldn't it be really handy for embedded? Let someone else figure out the crosscompiling.

Web-based editor is maybe cool for collaborative editing, but not really useful for anything with a 'compile' step. Now that Eclipse has apparently rigged up a web-based IDE, compiling my apps "in the cloud" sounds pretty appetizing.

Legooolas said...

@Ian Monroe

It's nice in that regard, but interfacing the website with an embedded system for debugging, downloading the code etc is a horrible thought :)

romanmir said...

I just watched a CNBC video http://www.cnbc.com/id/15840232?video=1039849853 if FF 3.0.6 and on my 5y.o. desktop at work it takes 100% of CPU and a crazy amount of RAM to run that.

Now, if I wanted to solve an age old problem of running an application on a mainframe client, I would not want to make the client a browser. Sure, it's great for HTML, but it's just terrible at about anything else.

ssh and xhost would do the trick for me if I really wanted to run that Eclipse app on the server for some reason and not have it installed on my client.

This is useless fluff.

Unknown said...

@Roman: Finally ! Someone who makes a lick of sense. (please, no redneck jokes, I'm neither Anglo nor sunburned around the neck ).

Everyone has this "in the cloud"-phoria like it's 2nd ( or possibly 3rd ) coming of &Deity, and while it's "cute", the vast majority of all that brain power has turned to mush, and instead of doing REALLY useful ( like, I dunno, make Eclipse make toast that isn't burnt around the edges ), it's turned to pursuing the most ridiculous of pursuits....pushing things back to the server.

Are you kidding me ? This is what the guys back in the 60's and 70's told us was a "thing of the past" !

Geezus, this is not what I bought my Core2Duo 2.6Ghz, 4Gb of ram laptop for, to draw arcanely described CSS to get those curvy swirls around the edges of tabs of view in Eclipse to draw properly in FF ? Please, someone tell me this is all part of that series Life On Mars and someone hasn't stuffed a "wayback machine" into some of these people's skulls and turned it on. I thought Mr. Ajaxian was a smart cookie, maybe cookie was all there was to it....CRUNCH.

Will Ryan said...

I created a web-based Java IDE in 2006/2007 as part of my university dissertation (example at www.willryan.co.uk/WWWorkspace ). It uses Eclipse as a backend and includes features such as syntax highlighting, full file system, compilation, safe execution of code and collaboration. I didn't market it like I should have, but i believe it is atleast as good as some of the web based IDE's that have recently cropped up e.g. Bespin. It's interesting that people are beginning to do this now and am interested to see what they come up with...

Boris Bokowski said...

Will: interesting screencast! I will have a look at your thesis.

rauschma said...

Bespin is cool and will only get better with browsers improving constantly. OSGi on the server makes a lot of sense, too. But it seems like your approach only works with pre-defined components. What if someone wants to do more in the browser? Then he would have to code JavaScript, right? It looks like it would make sense to add GWT to this mix, then. I've blogged about this: What should be the platform of your next application?

Kango_V said...

Where I'd like to see this go, is using GWT to generate Javascript that draws into a canvas. This would negate the need to HTML,DHTML or CSS completely.

A single language server and client side.

Now all we need is to create a full widget/framework in GWT. Each widget would use JSNI to do the drawing.

I could then get rid of GXT ;)

Geekoid said...

It is a great idea.

However, my clients, and I suspect hundreds of thousands of other businesses would never use such a thing...

Some of the projects we undertake are so tightly nailed down that to do so would land us in court, invalidate numerous mandatory security and PCI compliance regulations it simply isn't possible to use a platform such as this, no matter how good it is.

It doesn't stop it being awesome though :)

ѕ.α.η.т.σ.ѕ.н said...

I followed the steps given in http://wiki.eclipse.org/E4/Bespin, but when i click "Register" (Step 6 in Running the server), it's not doing anything. Am i doing something wrong? I tried to download different versions of bespin. But no success.

Can anyone help me?

Thanks in advance.

threepointsomething said...

Back in 2007 when we created Eclifox (http://buzypi.in/2007/10/11/eclifox-bringing-eclipse-to-the-browser/) we were faced with the same problem. We heard things like - this is a solution searching for a problem, why would anyone want to code in a browser etc.

Good to see that now such efforts are being standardized. I think Eclifox was ahead of its time.