Hi,

I gave a presentation at EclipseCon about isolating applications in OSGi by
using something called Composite bundles
(http://www.eclipsecon.org/2010/sessions/?page=sessions&id=1224).
Composite bundles provide a virtual osgi framework for isolating a set of
bundles which comprise an application.  Composites create isolation by
using a virtual framework to install a set of bundles and controlling the
resources that can be shared between the different composites installed in
a single OSGi framework instance.  I did create a demo where I was able to
run both e4 demos (contacts and photo) within their own isolated
composites.  This allows you to provide any isolation you want or require
for your applications (including separate event busses if needed)  Note
that composite bundles is a specification in progress at OSGi and does not
exist in the latest released OSGi Specification v4.2.

The biggest issue I found is the events for SWT.  Right now most all SWT
based applications assume they are the only application running on the SWT
event dispatch loop.  There is also a huge issue with adding SWT listeners
but never ever removing them.  When you start thinking about 1000s of
instances of workbenches you will eventually want to stop some of them
without bringing down the whole system.  Unfortunately nobody removes their
SWT listeners so we end up with dead listeners in SWT for applications that
have stopped.  The only way I could make this work (with the help of
Bodgan) was to use a separate SWT display for each application and
destroying that Display when a particular application stopped.  This of
coarse does not work on the Mac since you can only have one display event
thread on Max OS X.

While composite bundles can be useful for isolating various components that
comprise an application I still am not convinced this is the best approach
for running multiple instances of eclipse applications (or workbenches).
Even though virtual frameworks provide isolation with quite a small level
of overhead you still have to install all the components (bundles) that
require isolation into their own composite framework.  This means if you
have multiple applications that share a large amount of components, but
most of the components require isolation (for example the extension
registry as well as most all of the e4 stack) need to be installed in each
composite where they are needed and cannot be shared.  This clearly does
not scale well for 1000s of instances.  Even if you enable shared classes
support in the VM to share the duplicate class definitions you will still
run into memory issues with all the extra data.

This all comes back to the usage of singletons.  We have tried to get rid
of a lot of singletons, but I think there is a long ways to go.  Without
singletons everything needs a context to understand what it is associated
with.  This includes all events as well.  I don't have a lightweight or
easy answer for achieving that context.

Tom




|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Tom Schindl <[email protected]>                                    
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |E4 Project developer mailing list <[email protected]>                       
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |04/08/2010 10:49 AM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[e4-dev] Doubts on the EventSystem, OSGi-Services,   ... and 
MultiUser/Instance                                                              
        |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|





Hi,

I'm not sure and haven't digged very deep into it but am I correct that
there's only 1 EventBus/System / OSGi-Instance?

So if this our SINGLE event system what happens if you bring up 2, 3,
... workbench-instances in one OSGi-Instance how can we distinguish
which workbench-instance an event is coming from. How do we ensure that
one workbench-instance doesn't see events from another one? How would
this scale if we have workbench 1000-Instances?

Is the same true for workbench-services we contribute as OSGI-Services?

Tom

--
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                                        geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1    A-6020 innsbruck      phone    ++43 512 935834
_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
e4-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/e4-dev

Reply via email to