Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Re: Using JEM to draw cartoon images of widgets (Rich Kulp)

Rich,

Why does ComponentManager need the IExpression interface?
Currently my ProxyAdapter interface with the IBeanProxy and IMethodProxy to
generate/change the live visual.
I thought I will need the component manager only to fetch the cartoon
images?

I looked into the ComponentManager.java code, but I could not decipher it
fully. A few words from you on this will help immensely.

Thanks
Namrata

----- Original Message -----
From: <ve-dev-request@xxxxxxxxxxx>
To: <ve-dev@xxxxxxxxxxx>
Sent: Wednesday, July 06, 2005 8:00 AM
Subject: ve-dev Digest, Vol 5, Issue 4


> Send ve-dev mailing list submissions to
> ve-dev@xxxxxxxxxxx
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://dev.eclipse.org/mailman/listinfo/ve-dev
> or, via email, send a message with subject or body 'help' to
> ve-dev-request@xxxxxxxxxxx
>
> You can reach the person managing the list at
> ve-dev-owner@xxxxxxxxxxx
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ve-dev digest..."
>
>
> Today's Topics:
>
>    1. Re: Using JEM to draw cartoon images of widgets (Rich Kulp)
>       (Namrata)
>    2. Re: Re: Using JEM to draw cartoon images of widgets (Rich
>       Kulp) (Rich Kulp)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 6 Jul 2005 18:08:01 -0800
> From: "Namrata" <namrata@xxxxxxxxxxxxxx>
> Subject: [ve-dev] Re: Using JEM to draw cartoon images of widgets
> (Rich Kulp)
> To: <ve-dev@xxxxxxxxxxx>
> Message-ID: <000e01c58298$c6720c10$030fa8c0@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Rich,
>
> Just to refresh your memory on what we have been discussing.
>
> I have a static model (XML) that I'm representing as EMF model objects.
> I want to use the VE components to create an editor for my model. This
> editor will be a Swing form editor.
>
> I have made some progress in designing and implementing the solution.
> I have my EMF models, and the proxyAdapters.
> I have the IDERegistry working. I can create the live visuals in response
to
> model changes.
>
> Now I want to capture the cartoon image figure to show it in the editor.
>
> Where do I start? I'm looking at ComponentManager class and am a bit
> confused about its functionality.
>
> Why does ComponentManager use IExpressions. In my application so far, the
> ProxyAdapters can directly
> update the live visual using IMethodProxy invokes? Do these changes have
to
> go through the ComponentManager?
>
> Thanks
> Namrata
>
> > --------------------
> >
> > > Date: Thu, 23 Jun 2005 12:41:58 -0400
> > > From: Rich Kulp <richkulp@xxxxxxxxxx>
> > > Hi,
> > >
> > > You shouldn't be looking at anything starting with REM. This is an
> > > internal implementation of the IProxy interfaces for remote vm. You
> > should
> > > be accessing the proxies through the IProxy interfaces.  As I recall
you
> > > have a well-defined set of visuals and you don't need a java project
and
> > > extension capability, so you can run using the IDE implementation of
the
> > > IProxys. This will be much faster foy you because the visuals will not
> > > require a remote vm to be started and you won't be forced to be in a
> > java
> > > project (remote vm proxies require a java project, the IDE
> > implementation
> > > does not). Look at IDERegistration.createProxyFactory methods.
> > > IDERegistration is not internal. But the rest of the IDE... stuff is.
We
> > > haven't gotton around to making it API yet.
> > >
> > >
> > > REMExpression is an implementation of the IExpression interface. What
we
> > > used to do was use straight IMEthodPRoxy invokes. This is like calling
a
> > > method. The problem is that each invoke requires a round-trip to the
> > > remote vm. When we built up GUI's this round-tripping added up and
> > slowed
> > > things down. The expression were used to pipe the invokes to the
remote
> > > vm. What happens is that we don't wait for us response, we just
keeping
> > > pushing commands to the remote vm. Then at the very end we do an
invoke,
> > > and this then waits for all of the previous commands to be invoked and
> > > returns results.
> > >
> > > It turns out though that expressions on IDE proxies is actually slower
> > > than using the IMethodProxy invokes. That is because when using IDE
> > > proxies, it turns around and calls things directly. This is very fast
> > and
> > > doesn't have the latency problem that the sockets have that are used
> > with
> > > the remote vm. So if you are IDE it doesn't require expressions for
> > > performance.
> > >
> > > However, ComponentManager isn't currently written to work without
> > > expressions. I see now that it might be a good idea to add calls that
> > > don't require expressions. That would make it faster for you using IDE
> > and
> > > no expressions.
> > >
> > > Now, the way we connect the EMF model to the live beans is through an
> > EMF
> > > adapter. This adapter (called BeanProxyAdapter (or BeanProxyAdapter2
> > > depending on what driver you have, we just recently renamed
> > > BeanProxyAdapter2 back to BeanProxyAdapter) controls the live bean. It
> > > hears of changes to the EMF and propagates them to the live beans.
> > >
> > > You can use something similiar but I don't think it needs to be as
> > complex
> > > because you have a controlled environment. You don't have to handle a
> > wide
> > > and undetermined range of beans. Your adapter can simply create the
> > > visual, connect it to the ComponentManager, listen for changes, and
> > update
> > > the visual. The visual should be accessed through the IDE proxies
> > because
> > > that is what the ComponentManager expects.
> > >
> > > We also have something called a ModelChangeController. We pipe our
> > command
> > > stack through this so that only one thread is making changes at time.
> > Plus
> > > it has a very important added function. You can queue up runnables
> > during
> > > the execution of the commands that will then be executed at the end of
> > the
> > > transaction (the command stack execution). This is important because
> > > things like grabbing images is expensive, so you don't want to do it
> > over
> > > and over during the execution of the command because of changes
> > happening.
> > > So the image grabbing is queued up to the end of the transaction and
> > only
> > > occurs once.
> > >
> > > Rich
> > >
> > >
> >
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 6 Jul 2005 09:59:30 -0400
> From: Rich Kulp <richkulp@xxxxxxxxxx>
> Subject: Re: [ve-dev] Re: Using JEM to draw cartoon images of widgets
> (Rich Kulp)
> To: Discussions people developing code for the Visual Editor project
> <ve-dev@xxxxxxxxxxx>
> Message-ID:
> <OF196ACF7E.F19F50F7-ON85257036.004BE0F7-85257036.004CDC8B@xxxxxxxxxx>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> This was an oversight on our part. We just did a major conversion to using
> IExpressions for just about everything for performance reasons. We used to
> do everything through IMethodProxy's, but on a remote vm with a
> complicated java class the performance was not good. This was because each
> call to do an invoke on an IMethodProxy was round-trip. Talking through
> sockets to a remote vm using many small transactions has a lot of latency
> delay which adds up. So we changed to use IExpressions. These just keeping
> pushing the commands to the remote vm without stopping and waiting for a
> response until the entire transaction of all components and setting them
> up has been completed. At that time we wait for the expressions to be
> evaluated and completed. This helps tremendously when using remote vm's.
> However, IExpressions when using IDERegistry, has a significant
> performance overhead. This is because since everything is local, there is
> relatively no latency for the IMethodProxy invokes compared to the setup
> and processing costs of the IExpression itself.
>
> Now we had put this in recently and forgot that ComponentManager could be
> used outside of remote vm's, such as you are doing. So for now you need to
> wrapper the calls within a IExpression. We do intend to change
> ComponentManager to also allow direct non-expression access but I doubt we
> will get to it for VE1.1 because 1.1 is going into final test stage in
> about a week.
>
> Sorry for the inconvenience on this. You should open a defect on Bugzilla
> against VE subcomponent JFC/Swing and make me (richkulp@xxxxxxxxxx) the
> person to be assigned to asking that the ComponentManager be changed to
> work without IExpressions too. That way you will be notified when we do
> actually fix it.
>
> Thanks,
> Rich
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
http://eclipse.org/pipermail/ve-dev/attachments/20050706/47cf4fcd/attachment
.html
>
> ------------------------------
>
> _______________________________________________
> ve-dev mailing list
> ve-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ve-dev
>
>
> End of ve-dev Digest, Vol 5, Issue 4
> ************************************



Back to the top