The Power of Lightweight Threads on the JVM


Details
*PLEASE NOTE: To confirm your seat to this meetup event, please RSVP VIA EVENTBRITE (https://www.eventbrite.com/e/the-power-of-lightweight-threads-on-the-jvm-tickets-12386535461)
The 21st century have made any medium size web app or service applicable to receive millions users, if not more. This made you start off with a dozen servers as an appetizer. When you approach the size of Twitter or Facebook, maximizing the throughput from a single server becomes a very lucrative economic goal as to minimizing the number of servers thus downsizing your data-center cost.
The technology which enables a single server to receive up-to x10 more connections per time unit is called Lightweight threads. It's taking the asynchronous programming model we have seen in Node.js and Netty callback-hell into the next level by allowing you to write your code in a synchronous manner. One famous programming language have adopted this and named it Goroutine - it's called GO.
Programming in GO and Erlang can be cool and exotic, but what if you could leverage all the code and knowledge you have in Java and do the same as GO?
Talk Outline
- The power of lightweight threads: async scalability without the headaches (also: some cons)
- Why people avoid blocking (OS limitations) ?
- How people avoid blocking?
- Why they really shouldn't (because blocking is simple and could be made really cheap)?
- How lightweight threads can transform any complex callback-based async API into a simple blocking one, and do it for free?
- How lightweight threads and heavyweight (OS) threads can live side-by-side?
- A benchmark
- Uses of lightweight threads (one or two slides each):
- Fiber-per-request servlets and JAX-RS services, fiber-blocking HTTP client
- CSP, just like Go
- Reactive programming: imperative or functional
- Actors, just like Erlang3. Implementing lightweight threads on the JVM
- Implementing continuations
- The scheduler
Speaker Bio
Ron Pressler is the founder of Parallel Universe (http://www.paralleluniverse.co/), where he thinks hard about how to make it easy for developers to write software that works in harmony with modern hardware architecture; the secret is a combination of novel data structures and mechanical sympathy, wrapped in simple abstractions. He is a big fan of the JVM, and the author of "An Opinion Guide to Modern Java (http://blog.paralleluniverse.co/2014/05/01/modern-java/)". Prior to founding Parallel Universe, Ron developed and architected advanced senson-fusion, simulation, and realtime control defense applications.

The Power of Lightweight Threads on the JVM