Wednesday, December 09, 2009

Cloud + OSGi + GWT + ECF Rest + Twitter API = Modular web services

Using several technologies, I've recently created a Twitter user status service...i.e. a web service that retrieves the latest user status for a given user.

Click here to use/try it

You will need a Twitter username and password to get that user's status.

Here's what was used

Web Server: EclipseRT, p2, Equinox servletbridge
Ajax Web UI: Google Web Toolkit (GWT)
REST API: ECF REST/remote services API, Twitter REST API/service
Cloud provider: Amazon Cloud/Web Services (AWS)

The use of OSGi modularity makes this not only possible, but lightweight...as this server/service consists only of the bundles necessary to actually provide this service...and each of those used are small.

14 Comments:

Blogger Matt Raible said...

Here's a version that does the same thing with OAuth (vs. HTTP Basic Authentication) and a ProxyServlet to get around SOP.

http://demo.raibledesigns.com/gwt-oauth/

7:58 AM, December 10, 2009  
Blogger Scott Lewis said...

Hi Matt,

Thanks...the OAuth via GWT looks very interesting.

Is yours an OSGi web server as well?

And what is the acronym SOP? I don't recognize it in this context. Thanks.

10:45 AM, December 10, 2009  
Blogger Scott Lewis said...

Hi Matt...I accidently hit the reject link and rejected this posting by Matt...my apologies to Matt as I had intended to accept it:

No, it's not an OSGi web server, just a WAR on Tomcat. OSGi seemed like overkill for this type of application. ;-)

SOP = Single Origin Policy.

http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_SOP

10:49 AM, December 10, 2009  
Blogger Scott Lewis said...

Hi Matt...in response to your statement:

"OSGi seemed like overkill for this type of application. ;-)"

After creating this service, I would strongly disagree that OSGi is overkill...as OSGi (and modularity more generally) allowed/allows the server/service to be lightweight/simple...with very small application-level code. For example, excluding the GWT UI, the *total* code size for the application is < 50k.

10:54 AM, December 10, 2009  
Blogger Chris Brind said...

You'd be amazed how people think OSGi (and 'modularity' in general) is overkill for such a small project. I have to content with this kind of thing in my organisation.

But I've just categorically proved after an intense 3 week project (read non-disposable prototype) using OSGi and Flex that OSGi (and modularity) from day 1 has not only given us a solid platform up on which to build, but actually made the whole development process a lot faster.

I'll be writing a report on this in my blog next week - our final delivery day is tomorrow and we're well on track. ;-)

http://www.perplentropy.com/

Cheers,
Chris

1:21 PM, December 10, 2009  
Blogger Scott Lewis said...

Hi Chris.

Great to hear you are having good success. Please do give a report on your blog about your experiences...positive and negative. Only by communicating will improvements result...

2:08 PM, December 10, 2009  
Blogger Scott Lewis said...

@Chris (and others). You might like Martin Lippert's most recent set of slides on osgi/architecture/modularity.

Martin Lippert's blog

2:17 PM, December 12, 2009  
Blogger dorla said...

Your blog is very informative and very helpful. Thanks for this.
Web development

3:58 AM, December 31, 2009  
Blogger Scott Lewis said...

@dorla

Thanks for the nice words. If you find what I'm doing interesting WRT your project and/or what your organization is doing, please do let me know and perhaps I can help create some value for you/yours as well. I can be reached at slewis at composent.com.

And Happy New Year.

11:14 AM, December 31, 2009  
Anonymous Anonymous said...

Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!

5:47 AM, January 05, 2010  
Blogger araon said...

Your blog is really cool! I will wait when you finish. Thank you for interesting articles.
more templates easy to download

11:34 PM, January 31, 2010  
Blogger Scott Lewis said...

I mistakenly rejected a valid comment by Nawa:

I can see sources somewhere?

Scott's answer is: currently no...the sources are not available publicly. That's primarily because I haven't had any resources to make them available (time and CVS server).

7:23 AM, February 18, 2010  
Blogger Hendy Irawan said...

Please publish sources on github.com :)

5:53 AM, December 22, 2010  
Blogger Scott Lewis said...

Hi Hendy.

Most of the pieces for this (OSGi/HttpService, GWT, ECF, etc.) are already available in open source...in locations:

i.e. http://www.eclipse.org
http://www.eclipse.org/ECF
http://github.com/ECF

If you wish to help me with this project, and expedite making things available in a more central form, please contact me at slewis at composent.com

7:36 AM, December 22, 2010  

Post a Comment

<< Home