Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #17884

Re: Tools/frameworks for Java multi-core programming?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Tools/frameworks for Java multi-core programming?
Date Tue, 14 Aug 2012 15:16:50 -0700 (PDT)
Organization http://groups.google.com
Lines 58
Message-ID <d395c754-ed9e-40fa-b889-3903ecce1d1c@googlegroups.com> (permalink)
References <62479d2e-e766-433e-9d80-1589ab38fbc1@googlegroups.com> <a8vkqsF35mU1@mid.individual.net>
NNTP-Posting-Host 69.28.149.29
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1344982717 26090 127.0.0.1 (14 Aug 2012 22:18:37 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Tue, 14 Aug 2012 22:18:37 +0000 (UTC)
In-Reply-To <a8vkqsF35mU1@mid.individual.net>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Received-Bytes 3643
Xref csiph.com comp.lang.java.programmer:17884

Show key headers only | View raw


Robert Klemme wrote:
> anthonycwmak wrote:
>> I am trying to find tools/frameworks that help with writing Java
>> program that can utilize multi-core CPU. So far I only found

Java programs can "utilize" multi-core CPUs out of the box. 
You need do nothing special.

>> jconcurr, JOMP, JAMP, Ateji, but they all either requires special
>> shell command to compile and run the programs, or, in Ateji's case
>> use a special file extension which is converted to java file. This
>> doesn't seem to be ideal if I require to build multi-core programs
>> that can be built on Maven or similar,
 
> Why is that an issue?  Typically you can include custom build procedures 
> in a build tool / framework.

>> and requires them to run on an
>> enterprise environment or application server.

> If you are on an JEE application server that will usually take care of 
> the concurrency.  You typically need to use those APIs the JEE spec or 
> AS at hand provides to not interfere with the framework in bad ways 
> (e.g. by breaking transactions).  That does not seem like a bad option 
> although AS come with their own learning curve.

>> Besides writing concurrent programs, by using Java Concurrency API
>> directly, to utilize the multi-core, are there other easier/simpler
>> way to create Java enterprise applications that utlize multi-core
>> CPUs? Preferably, just annotate my POJOs to make them multi-core
>> capable?

> "Making a POJO multi-core capable" is meaningless.  Using concurrency is 
> more like an architectural property of your application (even though you 
> need to take care to use POJOs properly - but it's not enough to make 
> POJOs thread safe).  At this point I am suspecting that someone told you 
> modern Java programs must use multiple cores and you want to get it done 
> easily.  Unfortunately that won't work: you need to understand the 
> particular issues associated with concurrency to properly craft such 
> applications - even if you use a framework that takes away a large part 
> of the work from you.

As Robert said, if you're writing enterprise apps using Java EE, then the 
threading is already done. You should pretty much never explicitly code 
a Java EE component to spawn a thread.

Java SE is another matter. You do have to use thread calls to spawn threads.
Once you have at least two threads in a program (and all Java programs do), 
then you are multi-core capable.

Java programs that use threads are already multi-core capable.

Boom, done.

What are you really after?

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Tools/frameworks for Java multi-core programming? anthonycwmak@gmail.com - 2012-08-13 22:48 -0700
  Re: Tools/frameworks for Java multi-core programming? mr.amitghuge1@gmail.com - 2012-08-14 11:22 -0700
    Re: Tools/frameworks for Java multi-core programming? Arne Vajhøj <arne@vajhoej.dk> - 2012-08-19 19:33 -0400
      Re: Tools/frameworks for Java multi-core programming? anthonycwmak@gmail.com - 2012-08-19 22:05 -0700
        Re: Tools/frameworks for Java multi-core programming? Lew <noone@lewscanon.com> - 2012-08-20 07:26 -0700
          Re: Tools/frameworks for Java multi-core programming? Martin Gregorie <martin@address-in-sig.invalid> - 2012-08-20 19:48 +0000
            Re: Tools/frameworks for Java multi-core programming? Martin Gregorie <martin@address-in-sig.invalid> - 2012-08-20 20:07 +0000
            Re: Tools/frameworks for Java multi-core programming? Lew <lewbloch@gmail.com> - 2012-08-20 14:01 -0700
              Re: Tools/frameworks for Java multi-core programming? Martin Gregorie <martin@address-in-sig.invalid> - 2012-08-20 21:51 +0000
  Re: Tools/frameworks for Java multi-core programming? Robert Klemme <shortcutter@googlemail.com> - 2012-08-14 20:47 +0200
    Re: Tools/frameworks for Java multi-core programming? Lew <lewbloch@gmail.com> - 2012-08-14 15:16 -0700
    Re: Tools/frameworks for Java multi-core programming? anthonycwmak@gmail.com - 2012-08-15 18:50 -0700
      Re: Tools/frameworks for Java multi-core programming? markspace <-@.> - 2012-08-15 21:05 -0700
        Re: Tools/frameworks for Java multi-core programming? anthonycwmak@gmail.com - 2012-08-16 00:10 -0700
          Re: Tools/frameworks for Java multi-core programming? Arne Vajhøj <arne@vajhoej.dk> - 2012-08-17 22:24 -0400
      Re: Tools/frameworks for Java multi-core programming? Arne Vajhøj <arne@vajhoej.dk> - 2012-08-19 19:38 -0400

csiph-web