Weitere ähnliche Inhalte Ähnlich wie Concurrency and Distributed Systems Using JRuby (20) Mehr von Theo Hultberg (10) Kürzlich hochgeladen (20) Concurrency and Distributed Systems Using JRuby21. J.U.C.ATOMIC
optimistic locking primitives,
compare-and-swap,
thread safe non-blocking counters
22. MORE AWESOMES
ConcurrentHashMap, CountDownLatch,
ForkJoinPool, Google Guava, LMAX distruptor
29. DO ALL THE THINGS
Programming Concurrency on the JVM
30. AUGUST 2011
async systems with no back pressure
mechanism will die of memory starvation
32. INPUT
AGGREGATION TIMER
! STATE PERSISTENCE
OUTPUT
33. AUGUST 2011
actors are cool, but not really
worth it when all the arrows in your
flow chart point in the same direction
35. SEPTEMBER 2011
blocking all the way down,
back pressure all the way up
39. ColumnFamilyUpdater<String, String> updater = template.createUpdater("a key");
updater.setString("domain", "www.datastax.com");
updater.setLong("time", System.currentTimeMillis());
try {
template.update(updater);
} catch (HectorException e) {
// hurgh
}
CASSANDRA
very verbose drivers
40. new_data = {:domain => 'www.datastax.com', :time => Time.now.to_i}
column_family.update('a key', new_data)
EURYDICE
JRuby nails it
44. YOUR CODE
DON’T DO
THIS AT HOME KIDS!
the key to building concurrent and distributed
systems is to separate what you want to do from the
concurrent- and distributed-ness, and let someone
else take care of that
45. JRUBY IS A SLIPPERY
SLOPE TO JBOSS
let there be no doubt about it
47. KTHXBAI
@iconara
github.com/iconara
architecturalatrocities.com
burtcorp.com