Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] a completable future for OSGi remote services

Hi Markus and Wim,

On 3/24/2014 11:52 PM, Markus Alexander Kuppe wrote:
> <stuff deleted>
>
> Hi,
>
> the usage of CompletableFutures for ECF's async proxies is indeed tempting.
> To ease the migration though, is there maybe a standalone lib of CF
> (obviously without labmdas) for < Java8 (similar to concurrent backports
> when Java5 came out)? With it, we don't necessarily have to drag in a
> Java8 dependency at our API level.

I don't personally know of a standalone CF library for < j8.  It may just
be a matter of time before it appears.  OTOH, the changes to bytecode in
j8 might make such a thing difficult.  I haven't looked closely enough to
tell yet.

> OTOH we could also provide two
> versions of our remote service distribution provider (one for Java8 and
> another for < Java8).

I think for the time being this is what we will have to do...and it's what
I've done for the generic provider (to start) with new bundle project:

http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8

If you examine the above...the only code that references CF/j8 code is in
an override of AbstractRemoteService.callFuture(IRemoteCall,Class).   As
you can see  the CF/j8 changes are very isolated (which is good), but
AbstractRemoteService is in api bundle o.e.e.remoteservice (it's used by
all the distribution providers).

Another way to go would be to have two versions of
o.e.e.remoteservice...i.e. < j8 and j8+.   Then all providers would be
automatically j8 enabled.   I haven't thought through the releng and
distribution implications though.

In his note Wim said:

> If we are targeting embedded devices then I can understand some
restriction to the runtime platform, otherwise let's just move on.

I would say with OSGi remote services (and supporting protocols like MQTT,
which we now do) that we do indeed want to continue to support embedded
devices.

> If people want to run old java versions then we have perfectly fine
compatible ECF releases that match these VM's.
>
> +1 for moving to Java8.

Although I would love to move to java8 right away, I don't think we can do
this.   The community adoption of java8...although I believe will happen
relatively quickly...has just begun...and I don't think it would be right
to require j8 as a minimum right away.   But with rapid, widespread
adoption this could change...

Scott





Back to the top