views:

90

answers:

2

Hi I want to design and develop a big enterprise application using just GWT in client side. I want to break this enterprise application into parts and I call each of them a module (or bundle or portlet or whatever!). These modules might have relation with each other and might call some services that exists in other modules (in both client and server side).

The problem is, These modules must be Designed , Developed, Compiled and Deployed Independently and Dynamically and they will be placed and shown together in one context on the client and the dependencies between modules should be manageable (in both client and server side).

What can I do? What kind of technologies I can use to build an enterprise application like this?

When you develop an application that is not divided into parts (In the way that i mentioned) you can easily deploy your application after building your project, but when you change just one form in your application you have to build the entire application again, and deploy the entire application.

In this application I cannot stop the server to deploy the application again, I want to change and deploy that part of application that is needed to be changed not the entire application!!!

Of course I have searched about the way that I can solve my problem!!! I have found that I can use OSGI on server side because it provides modularity at software construction level and helps me to manage life cycle of modules and many other benefits that you know! And I have found that I can use Gadgets on client side.

What do you think? Are they good choices?

If they are good choices, how can I start? I know that we have different kinds of implementations of OSGi, like Apache Felix, Eclipse Equinox and Knopflerfish. Which one is good for this choice?

How GWT and OSGi can be integrated? How can they interact with each other?

+1  A: 

Unfortunately what you want to do is not fully possible with GWT.

OSGi is a modularity solution for Java, or more accurately the JVM. A GWT client application does not run on the JVM, it runs on the browser in a JavaScript environment. Therefore OSGi cannot be used to create runtime-assembled modular GWT applications.

A GWT application can be modular at the source level, but the modules must be assembled into an application at build time. The resulting runtime is monolithic.

However, it's perfectly possible to use OSGi to host the GWT servlets, and you can use the full power of OSGi runtime modularity on the server side.

As an alternative you may want to look at Vaadin. This is a web framework that uses GWT to provide widgets, but the logic of the application runs on the server. As a result, it does support full runtime modularity through OSGi bundles. There is a cost with this approach though: your web application is quite chatty, with lots more communication going between the browser and the server than in GWT or in a traditional web application. It's possible that this approach will not scale to very large numbers of users.

As for whether to use Equinox, Felix or Knopflerfish... it really doesn't matter. Stick to the specification, and you can easily switch between implementations.

Neil Bartlett
Thanks for your response.
Heidarzadeh
I know that OSGi is just applicable in server side!I think my big problem will be in client side, having a container like a gadget container in client side will be so hard to me.Now all parts of this application are tied together especially in client side and I can not open this tie!! to compile and deploy different parts of this application separately !!!
Heidarzadeh
A: 

I think you are setting yourself for more headaches than it is worth.
I would go with deploying the whole thing at a pop. If not you will end up with mismatched pieces of the application that are out of sync with each other. GWT has both Client and Server components and they need to be deployed together. If you have a zero downtime policy then you probably have load balancing in place.
I would use the load balancing software to deploy the new version of the app. Turn off one side (by diverting all traffic to the other side) deploy to it, do a quick smoke test, switch all traffic to the new side and repeat with the old side.

Romain Hippeau
Thanks for your response.I think load balancing has it's own concerns and I might have other problems.In that way compile time, is again time consuming and I have to build the whole application again.There are a lot of customers and I have to copy the whole application for all of those customers and I will have bandwidth problems.When I compile the project it’s about 400MB and for a small problem I have to copy the whole files!!
Heidarzadeh
Of course I can avoid recopying the third party libraries That I have used on server side but again it’s time consuming.Remember, This is a big enterprise application with a lot of customers!!!But if I find a way to compile and deploy my application, partially. I mean separately for each module, That would be a good solution!!!
Heidarzadeh
You can always separate out your static contents and put it on a web server of its own. That does help with load time.
Romain Hippeau