Tuesday, January 6, 2015

A persistent KeyValue Server in 40 lines and a sad fact

0 comments
Advent time again .. picking up Peters well written overview on the uses of Unsafe, i'll have a short fly-by on how low level techniques in Java can save development effort by enabling a higher level of abstraction or allow for Java performance levels probably unknown to many.

My major point is to show that conversion of Objects to bytes and vice versa is an important fundamental, affecting virtually any modern java application.

Hardware enjoys to process streams of bytes, not object graphs connected by pointers as "All memory is tape" (M.Thompson if I remember correctly ..).

Many basic technologies are therefore hard to use with vanilla Java heap objects:

  • Memory Mapped Files - a great and simple technology to persist application data safe, fast & easy. 
  • Network communication is based on sending packets of bytes 
  • Interprocess communication (shared memory) 
  • Large main memory of today's servers (64GB to 256GB). (GC issues) CPU caches work best on data stored as a continuous stream of bytes in memory
read more here

Leave a Reply

 
All Tech News IN © 2011 DheTemplate.com & Main Blogger .