Keynote talk given at JDay Lviv 2014 in Ukraine (http://www.jday.com.ua/). Video coming soon.
Abstract:
Some say that there's nothing new under the sun. However, looking back on five to six decades of computing, it's easy to see that things progress at their own leisurly pace. Structured programming, originating in the '60s, did not gain mainstream adoption until the '80s; object-oriented programming was hotly debated in the '70s and '80s but only gained widespread acceptance in the '90s. Every couple of decades sees an engineering leap that radically improves the software engineering discipline across the board. I believe we are now at such an inflection point, with functional programming concepts slowly sifting into the mainstream. After this talk, I hope you will too.
2. Through the Looking Glass
20 years ago…
• C/C++ rule the
market [1]
• First release of Java
[1] TIOBE Index (historical data)
3. … since then?*
• C and Java are neck-and-neck
• Virtual machines are everywhere
• Garbage collection is everywhere
• OOP is everywhere
* Not exhaustive
5. Garbage Collection
1960 Formalized[1]
1970s Research
1994 JVM
2014 Everywhere!
[1] Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I
13. The Market has Shifted
• SaaS is the norm
• Shorter time to
market
• Latency requirements
are stricter
• Availability is
business-critical
14. The Free Lunch is Over[1]
[1] The Free Lunch is Over, Herb Stutter (Dr. Dobb's Journal, 2005)
• CPUs aren’t getting
(much) faster
• Rather, they’re getting
parallel
• Concurrency is the
new kid on the block
15. Datasets are Getting Bigger
• Terabyte-scale data is
common
• Computation demand
– NoSQL
– Big Data
• Specialized hardware
(SAN) is a hindrance
22. Control flow describes the
how
List<Person> adults(List<Person> in) {
ArrayList<Person> out = new ArrayList<>();
for (Person p : in)
if (p.getAge() >= 18)
out.add(p);
return out;
}
23. Data flow describes the what
List<Person> adults(List<Person> in) {
return in.stream()
.filter(p -> p.age >= 18)
.collect(Collectors.toList());
}
24. “What” is Better
• Focuses on the
problem
• Reduces accidental
complexity
• Decouples intent from
execution
25. Today’s systems
are highly concurrent.
Tomorrow’s abstraction must…
encourage immutability.
26. The Case for Immutability
• Inherently thread-safe
• Referentially
transparent
• Easier to reason
about!
27. Today’s systems
are horizontally scalable.
Tomorrow’s abstraction must…
simplify workload distribution.
28. Distribution 101
1. Take a core
computation
2. Split it out
3. Run on many nodes
4. Profit
29. Why is this hard?
• Behavior-as-data
• Side effects
• High-performance
frameworks
Lambdas
Immutability
Akka, Hadoop,
Storm…
30. The future is
functional.
1. Data flow-oriented
2. Immutable
3. Easy to distribute