jm + java8   5

What to Look for in Java 8 Code
Great advice from Trisha Gee on J8 features and how to code-review code which uses them
java8  java  code-review  coding 
9 weeks ago by jm
Caffeine cache adopts Window TinyLfu eviction policy
'Caffeine is a Java 8 rewrite of Guava's cache. In this version we focused on improving the hit rate by evaluating alternatives to the classic least-recenty-used (LRU) eviction policy. In collaboration with researchers at Israel's Technion, we developed a new algorithm that matches or exceeds the hit rate of the best alternatives (ARC, LIRS). A paper of our work is being prepared for publication.'

Specifically:
W-TinyLfu uses a small admission LRU that evicts to a large Segmented LRU if accepted by the TinyLfu admission policy. TinyLfu relies on a frequency sketch to probabilistically estimate the historic usage of an entry. The window allows the policy to have a high hit rate when entries exhibit a high temporal / low frequency access pattern which would otherwise be rejected. The configuration enables the cache to estimate the frequency and recency of an entry with low overhead. This implementation uses a 4-bit CountMinSketch, growing at 8 bytes per cache entry to be accurate. Unlike ARC and LIRS, this policy does not retain non-resident keys.
tinylfu  caches  caching  cache-eviction  java8  guava  caffeine  lru  count-min  sketching  algorithms 
november 2015 by jm
ben-manes/caffeine
'Caffeine is a Java 8 based concurrency library that provides specialized data structures, such as a high performance cache.'
cache  java8  java  guava  caching  concurrency  data-structures  coding 
march 2015 by jm
Spark - A small web framework for Java
A Sinatra-like minimal web framework built on Java 8 lambdas:

<code>public class HelloWorld {
public static void main(String[] args) {
get("/hello", (request, response) -> {
return "Hello World!";
});
}
}</code>
via:sampullara  web  java  sinatra  lambdas  closures  java8  spark 
may 2014 by jm
What's New in Java 8
good explanation of all the new features -- I'm really looking forward to fixing up all the crappy over-verbose interface-as-lambdas we have scattered throughout our code
java  java8  lambdas  fp  functional-programming  currying  joda-time 
march 2014 by jm

Copy this bookmark:



description:


tags: