GPars and JDK8

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

GPars and JDK8

Russel Winder-3
GPars still has much that is not in Java 8, and so has a strong role in
the post Java 7 world. However, there seems to be little point in
keeping all the extra166y underpinnings now that Java has rejected the
ParallelArray approach in favour of Streams: I think there are good
reasons for dropping ParallelArray and strongly support the move to
Streams.

I have made a start on a JDK8 variant of GPars in the jdk8 branch of my
fork of GPars. It is clear though that this version must coexist in the
universe with the jdk7 version (*), the issue is how. What I am thinking
of here is numbering. To date we have avoided having more than a single
version of GPars. I think this is no longer viable, we need a way of
having two versions of GPars in the Groovy distribution. I am guessing
that artefact qualifiers are the way to go here. Whichever route, we
need to amend the GPars build system. I can do this if we agree on a way
forward.

Of course this is only a short term thing, so we only need a short-term
solution: Groovy 3 can and should be JDK8 and above only, at which
point, GPars can return to a single artefact strategy.

Thanks.


(*) Currently GPars is JDK6 compatible, I believe we should drop this
and support only JDK7 but this decision requires some coordination with
Guillaume and the Groovy distribution folk. This is not a big issue,
unlike the JDK8 one.
--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: GPars and JDK8

chiquitinxx
Hello!

I want to learn a bit of Gpars / concurrency combined with Java 8. Like groovy is not supporting Java 8 syntax, I was thinking in remove groovy dependencies in gpars. Ill try first with dataflow, like a little gpars module in java. If any1 has some tips or lessons, please you are welcome :). Whats better branch to be cloned?

Thank you.

El 30/03/2014, a las 09:40, Russel Winder <[hidden email]> escribió:

> GPars still has much that is not in Java 8, and so has a strong role in
> the post Java 7 world. However, there seems to be little point in
> keeping all the extra166y underpinnings now that Java has rejected the
> ParallelArray approach in favour of Streams: I think there are good
> reasons for dropping ParallelArray and strongly support the move to
> Streams.
>
> I have made a start on a JDK8 variant of GPars in the jdk8 branch of my
> fork of GPars. It is clear though that this version must coexist in the
> universe with the jdk7 version (*), the issue is how. What I am thinking
> of here is numbering. To date we have avoided having more than a single
> version of GPars. I think this is no longer viable, we need a way of
> having two versions of GPars in the Groovy distribution. I am guessing
> that artefact qualifiers are the way to go here. Whichever route, we
> need to amend the GPars build system. I can do this if we agree on a way
> forward.
>
> Of course this is only a short term thing, so we only need a short-term
> solution: Groovy 3 can and should be JDK8 and above only, at which
> point, GPars can return to a single artefact strategy.
>
> Thanks.
>
>
> (*) Currently GPars is JDK6 compatible, I believe we should drop this
> and support only JDK7 but this decision requires some coordination with
> Guillaume and the Groovy distribution folk. This is not a big issue,
> unlike the JDK8 one.
> --
> Russel.
> =============================================================================
> Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: GPars and JDK8

Russel Winder-3
Jorge,

On Sun, 2014-03-30 at 14:47 +0200, Jorge Franco wrote:
> Hello!
>
> I want to learn a bit of Gpars / concurrency combined with Java 8.
> Like groovy is not supporting Java 8 syntax, I was thinking in remove
> groovy dependencies in gpars. Ill try first with dataflow, like a
> little gpars module in java. If any1 has some tips or lessons, please
> you are welcome :). Whats better branch to be cloned?
>
> Thank you.

I am not sure what the issue is regarding Java 8 lambda expression
syntax. If the source is Java then you have to be using Java 8 and
things are fine. If using Groovy then Groovy 2.2 and above have implicit
conversion of Closures, so Groovy Closures work fine with Java 8
Streams.

This raises the question of whether the GPars code needs to be all Java,
which if Java 8 and above would be less of a problem then if it had to
be Java 7, or whether Groovy compiled with @CompileStatic looses the
dependency on the groovy-all jar at runtime.

I had a quick attack on making my JDK8 branch work but I was taking the
wrong approach so backed out of it to make a new start. I suspect I may
need to relabel this version of GPars as 2.0-SNAPSHOT since it is such a
change over the current version that it seems wrong for it to be
1.2-SNAPSHOT.

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: GPars and JDK8

chiquitinxx
Hello!

Can be a pain remove Groovy from Gpars, but lambdas can be used in some points where callables are accepted as parameters. I tryed used Gpars with lambdas in java8 and success :)

But, I have created a github project to practice with dataflows and Java 8, without groovy, starting from scratch (https://github.com/chiquitinxx/java8dataflow). I miss a lot Groovy in general, Java is so verbose. But is better with lambdas. I have lot of questions about concurrency in general, and java in particular. Also need some reference about dataflows.

Do you have any links or books recommendations?

Thank you!


2014-04-05 17:24 GMT+02:00 Russel Winder <[hidden email]>:
Jorge,

On Sun, 2014-03-30 at 14:47 +0200, Jorge Franco wrote:
> Hello!
>
> I want to learn a bit of Gpars / concurrency combined with Java 8.
> Like groovy is not supporting Java 8 syntax, I was thinking in remove
> groovy dependencies in gpars. Ill try first with dataflow, like a
> little gpars module in java. If any1 has some tips or lessons, please
> you are welcome :). Whats better branch to be cloned?
>
> Thank you.

I am not sure what the issue is regarding Java 8 lambda expression
syntax. If the source is Java then you have to be using Java 8 and
things are fine. If using Groovy then Groovy 2.2 and above have implicit
conversion of Closures, so Groovy Closures work fine with Java 8
Streams.

This raises the question of whether the GPars code needs to be all Java,
which if Java 8 and above would be less of a problem then if it had to
be Java 7, or whether Groovy compiled with @CompileStatic looses the
dependency on the groovy-all jar at runtime.

I had a quick attack on making my JDK8 branch work but I was taking the
wrong approach so backed out of it to make a new start. I suspect I may
need to relabel this version of GPars as 2.0-SNAPSHOT since it is such a
change over the current version that it seems wrong for it to be
1.2-SNAPSHOT.

--
Russel.
=============================================================================
Dr Russel Winder      t: <a href="tel:%2B44%2020%207585%202200" value="+442075852200">+44 20 7585 2200   voip: [hidden email]
41 Buckmaster Road    m: <a href="tel:%2B44%207770%20465%20077" value="+447770465077">+44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: GPars and JDK8

Paolo Di Tommaso
Hello, 

I reminded that you were looking for a book about the dataflow programming model. 

I've just found this 



I'm not sure that it describes exactly the same model implemented in Gpars dataflow, but it looks a very interesting reference in any case. 


Cheers,
Paolo


On Tue, May 20, 2014 at 12:33 AM, Jorge Franco <[hidden email]> wrote:
Hello!

Can be a pain remove Groovy from Gpars, but lambdas can be used in some points where callables are accepted as parameters. I tryed used Gpars with lambdas in java8 and success :)

But, I have created a github project to practice with dataflows and Java 8, without groovy, starting from scratch (https://github.com/chiquitinxx/java8dataflow). I miss a lot Groovy in general, Java is so verbose. But is better with lambdas. I have lot of questions about concurrency in general, and java in particular. Also need some reference about dataflows.

Do you have any links or books recommendations?

Thank you!


2014-04-05 17:24 GMT+02:00 Russel Winder <[hidden email]>:

Jorge,

On Sun, 2014-03-30 at 14:47 +0200, Jorge Franco wrote:
> Hello!
>
> I want to learn a bit of Gpars / concurrency combined with Java 8.
> Like groovy is not supporting Java 8 syntax, I was thinking in remove
> groovy dependencies in gpars. Ill try first with dataflow, like a
> little gpars module in java. If any1 has some tips or lessons, please
> you are welcome :). Whats better branch to be cloned?
>
> Thank you.

I am not sure what the issue is regarding Java 8 lambda expression
syntax. If the source is Java then you have to be using Java 8 and
things are fine. If using Groovy then Groovy 2.2 and above have implicit
conversion of Closures, so Groovy Closures work fine with Java 8
Streams.

This raises the question of whether the GPars code needs to be all Java,
which if Java 8 and above would be less of a problem then if it had to
be Java 7, or whether Groovy compiled with @CompileStatic looses the
dependency on the groovy-all jar at runtime.

I had a quick attack on making my JDK8 branch work but I was taking the
wrong approach so backed out of it to make a new start. I suspect I may
need to relabel this version of GPars as 2.0-SNAPSHOT since it is such a
change over the current version that it seems wrong for it to be
1.2-SNAPSHOT.

--
Russel.
=============================================================================
Dr Russel Winder      t: <a href="tel:%2B44%2020%207585%202200" value="+442075852200" target="_blank">+44 20 7585 2200   voip: [hidden email]
41 Buckmaster Road    m: <a href="tel:%2B44%207770%20465%20077" value="+447770465077" target="_blank">+44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email