Your SlideShare is downloading. ×
What python can learn from java
What python can learn from java
What python can learn from java
What python can learn from java
What python can learn from java
What python can learn from java
What python can learn from java
What python can learn from java
What python can learn from java
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

What python can learn from java

2,535

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,535
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. What Python can learn from Java jbellis@datastax.comSaturday, September 10, 2011
  • 2. Saturday, September 10, 2011
  • 3. (Not a web development perspective)Saturday, September 10, 2011
  • 4. 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
  • 5. Troubleshooting OOMSaturday, September 10, 2011
  • 6. 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
  • 7. Lesson 2: Concurrency ✤ For CPU-bound applications, copies are the enemy ✤ Corollary: you need to support threads + shared state ✤ Actor model ✤ Multi-process + sysvSaturday, September 10, 2011
  • 8. java.util.concurrent: ahead of its time ✤ ConcurrentSkipListMap ✤ CopyOnWriteArrayList ✤ NonblockingHashMap* ✤ Atomic[Int|Long|Reference|...] ✤ SynchronousQueue ✤ Java 7: TransferQueue ✤ ThreadPoolExecutor, ScheduledThreadPoolExecutor ✤ FutureTaskSaturday, September 10, 2011
  • 9. 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

×