Solutions for Java developers
03/26/09
By Alex Miller
In my previous article I introduced the advantages of the actor
concurrency model over the shared-stated model used by popular
imperative languages like Java. To help you understand actor
concurrency, I explained how it's implemented in Erlang, a
functional language that has been around for a couple of
decades. Erlang's implementation is elegant, but it's a
nonstarter if you're committed to developing applications in a
language that runs on the JVM. So, in this article I'll look at
Erlang-inspired actor implementations in three JVM languages:
Scala, Groovy, and Java.
Libraries that implement actor concurrency on the JVM include
Scala's standard lib; Groovy's GParallelizer; and Java's Kilim,
ActorFoundry, Actors Guild, and Jetlang. I'll use the schoolyard
game Rock-Paper-Scissors as a reference application and
implement it in each library to demonstrate the features and
differences. Each implementation uses two Player actors and a
Coordinator actor. The Coordinator requests each player to play,
and each Player replies with Rock, Paper, or Scissors. The
Coordinator accepts the responses, announces the winner, and
starts over. You can see the message flow illustrated in Figure
1 ...
Read more: Undertstanding actor concurrency, Part 2: Actors on
the JVM http://www.networkworld.com/nljavaworldsente188943
1. Java concurrency with thread gates
http://www.networkworld.com/nljavaworldsente185460
2. MapReduce programming with Apache Hadoop
http://www.javaworld.com/javaworld/jw-09-2008/jw-09-hadoop.html
3. Ted Neward on why Java developers need Scala (JW podcast)
http://www.javaworld.com/podcasts/jtech/2008/061008jtech.html
Most commented: Do you need a college degree to get a
programming job? http://www.javaworld.com/community/node/2651
There's nothing wrong with a software developer getting a
college degree in CompSci, especially when it accompanies an
opportunity to learn useful skills. My problem is with hiring
managers who think the degree is an absolute necessity ...
http://www.javaworld.com/community/node/2651
1. IBM: Better or worse for Java licensing?
http://www.javaworld.com/community/node/2671
2. Java annotations: Use 'em or hate 'em?
http://www.javaworld.com/community/node/2613
3. Developers: The downside of being 'the best'
http://www.javaworld.com/community/node/2652
By all indications IBM is in serious talks to buy Sun
Microsystems this week, an acquisition that would have long-term
impact on Java technology, products, and licensing. Learn more
about the potential impact of this once-in-a-lifetime (and some
say long overdue) deal:
1. IBM and Sun: Future of GlassFish, NetBeans, and JavaFX
http://www.javaworld.com/community/node/2635
2. Google's Dibona says IBM could be good for Java
http://www.networkworld.com/nljavaworldsente188429
3. How IBM + Sun merger would impact IT
http://www.networkworld.com/nljavaworldsente188430
Find more on this topic in JW News & Views
http://www.javaworld.com/news-reviews/
Also see: CEO Payday: What tech chiefs made in 2008 -- Jonathan
Schwartz http://www.networkworld.com/nljavaworldsente188431 You've hit the tip of the iceberg: Read more in JW Blogs
http://www.javaworld.com/community/
_______________________________________________________________
This newsletter is sponsored by Research In Motion
BlackBerry App World Wants Your Apps
Research In Motion (RIM) is accepting applications for
BlackBerry App World(TM). Registration is simple, approvals are
fast, and you'll receive support from RIM every step of the way.
And with 21 million business and personal users (and counting),
BlackBerry App World offers you a world of opportunities.
http://adserver.fattail.com/redir/redirect.asp?CID=293168
_______________________________________________________________
Webcast: Data center server selection. Forrester Research's Brad
Day helps IT professionals refine their server selection criteria
in this informative Webcast, "Beyond Systems Performance." Ensure
you will make the right decision for your next-generation data
center. Get Day's tips on creating a cost-efficient environment
that delivers the performance and long-term resiliency you require.
Watch this Webcast now.http://www.nww.com/rpgx.jsp?c=XU1PTAZ4149
_______________________________________________________________
This Newsletter Subscription Compliments of: Linuxworld.com http://www.linuxworld.com
ALSO FEATURED ON JAVAWORLD
Open source Java projects: Jakarta Cactus
http://www.networkworld.com/nljavaworldsente188428
Unit-testing server-side code is famously challenging, but
Jakarta Cactus does make it easier. Learn how Cactus extends
JUnit with an in-container strategy that lets you execute test
cases for servlets, EJBs, and other server-side code. You'll
also learn how to automate your Cactus-based tests.
Writing good unit tests, Part 1: Follow your GUTs
http://www.networkworld.com/nljavaworldsente187286
What do you know about the quality of your unit tests? Probably
not as much as you know about your production code. Klaus Berg
explains why craft matters just as much for test code as for
production code, then provides a comprehensive listing of agile
tools and best practices for improving the quality of your unit
tests.
ActionScript for Java developers, Part 2
http://www.networkworld.com/nljavaworldsente186633
Like other dynamic languages, ActionScript has capabilities and
usage patterns that could take a Java developer by surprise. In
this second half of his guide to the differences between Java
and ActionScript 3, Chet Haase discusses properties, dynamic
behavior, and functions.
_______________________________________________________________
This newsletter is sponsored by Research In Motion
BlackBerry App World Wants Your Apps
Research In Motion (RIM) is accepting applications for
BlackBerry App World(TM). Registration is simple, approvals are
fast, and you'll receive support from RIM every step of the way.
And with 21 million business and personal users (and counting),
BlackBerry App World offers you a world of opportunities.
http://adserver.fattail.com/redir/redirect.asp?CID=293168
_______________________________________________________________
UPCOMING ON JAVAWORLD
-Introduction to Lamport's OTP algorithm
-Writing cloud-ready, multicore-friendly code, Part 2
-Jump into JavaFX, Part 4: Advanced APIs
-REST for Java developers, Part 4
-Introduction to Spring MVC
Podcasts:
-Alex Miller: Talkin' about Terracotta
-Make way for Jetty: Coming of age at 12
JavaWorld's Daily Brew - Starting conversations in the Java
developer community
http://www.javaworld.com/community
_______________________________________________________________
BONUS FEATURE
What you need to see all 7 layers
Get all the tools you need to see all 7 layers of your network. Fluke's OptiView Analyzer combines protocol analysis, active discovery, and device and traffic analysis in a mobile solution, giving you the information you need to control your network and minimize disruption. http://www.nww.com/rpgx.jsp?c=XU1FTA7015Z4155
Click here for your free trial.
_______________________________________________________________
May we send you a free print subscription to Network World?
You've got the technology snapshot of your choice delivered at
your fingertips each day. Now, extend your knowledge by
receiving 50 FREE issues to our print publication. Apply today
at http://www.subscribenw.com/nl2
International subscribers click here:
http://nww1.com/go/circ_promo.html
_______________________________________________________________
SUBSCRIPTION SERVICES
To make newsletter subscription changes or cancellation, please
go to:
http://www.subscribenw.com/nl/login.jsp
To change your e-mail address, go to:
http://www.subscribenw.com/nl/eclogin.jsp
Subscription questions? Contact Customer Service by replying to
this message.
This message was sent to: athenssuthakar.javaupdates@blogger.com
Please use this address when modifying your subscription.
_______________________________________________________________
For advertising information, write Susan Cardoza, Associate
Publisher Online, at: mailto:sponsorships@nwfusion.com
_______________________________________________________________
JavaWorld is a trademark or registered trademark of Sun
Microsystems, Inc. in the United States and other countries, and
is used under license by International Data Group, Inc. All
other product names and trademarks used are the trademarks of
their respective owners.
Copyright 2009 JavaWorld.
http://www.javaworld.com