Java Journal & Pyresso: A Python-Based Framework for Debugging Java
What python can learn from java
-
Upload
jbellis -
Category
Technology
-
view
2.887 -
download
1
description
Transcript of What python can learn from java
What Python can learn from [email protected]
Saturday, September 10, 2011
Saturday, September 10, 2011
(Not a web development perspective)
Saturday, September 10, 2011
Lesson one: GC
✤ Hotspot GC✤ Pluggable✤ Well-documented (http://java.sun.com/j2se/reference/
whitepapers/memorymanagement_whitepaper.pdf)✤ Tuneable (http://www.slideshare.net/ludomp/gc-tuning-in-the-
hotspot-java-vm-a-fisl-10-presentation)
Saturday, September 10, 2011
Troubleshooting OOM
Saturday, September 10, 2011
Troubleshooting fragmentation
http://www.cloudera.com/blog/2011/02/avoiding-full-gcs-in-hbase-with-memstore-local-allocation-buffers-part-2/
Saturday, September 10, 2011
Lesson 2: Concurrency
✤ For CPU-bound applications, copies are the enemy✤ Corollary: you need to support threads + shared state
✤ Actor model✤ Multi-process + sysv
Saturday, September 10, 2011
java.util.concurrent: ahead of its time
✤ ConcurrentSkipListMap✤ CopyOnWriteArrayList✤ NonblockingHashMap*✤ Atomic[Int|Long|Reference|...]✤ SynchronousQueue ✤ Java 7: TransferQueue✤ ThreadPoolExecutor, ScheduledThreadPoolExecutor
✤ FutureTask
Saturday, September 10, 2011
Shared state = good, Mutable state = bad
✤ guava: Immutable collections✤ http://code.google.com/p/guava-libraries/
✤ Persistent collections✤ http://code.google.com/p/pcollections/✤ (More accurately, “What Python can learn from Haskell”)
Saturday, September 10, 2011