Java One 2014 - San Francisco

I attended Java One 2014 in San Francisco from September 28 - October 2. This conference is huge and is just a portion of the massive Oracle OpenWorld.

I did not attend any sessions on the first day due to some travel issues, but I still made the most of the four remaining days. These are the sessions I attended, a summary of the content, my impressions, slide decks, video and any other information I could find.

In researching this post I assumed I would be able to find video or recorded screencasts of almost every session. There were cameras in most rooms and lots of technicians who were obviously recording, but I can't find a thing. If you know where this content is hiding please drop me a line.

Edited October 31st: I received an email from Oracle with video and sound synced slide decks for a number of sessions. I will add video details as they become available.


Journey’s End: Collection and Reduction in the Stream API

Maurice Naftalin
video

This session's focus on collection and reduction greatly clarified the stream API for me. I had previously only read a few articles about the subject and live code examples were helpful.

Stream

  • Born as spliterator
  • Transformed
  • Collected

Stream can be written for sequential execution and be parallel ready if it becomes necessary

Terminal operation

  • search (match, find)
  • side effecting -> *care must be taken to insure still parallel ready
  • reduction - great for primitives & immutables, can be used w/ collections but its ugly

Reduction over an identity can remove need for Optional but does not work over collections

Collectors (hard way) - not necessary very often

  • Supplier
  • Accumulator
  • Combiner
  • Finisher

In most cases just use supplied collectors, tons of static factory methods in Collectors class
.collect(Collectors.*())

Collecting to Classification Maps

  • groupingBy
  • partitioningBy

Nashorn: Javascript for JVM

Jim Laskey
slide deck
video

Firstly, it is pronounced Nass - horn. The ease of including Javascript in Java and vice versa provided by Nashorn could make some bothersome boilerplate a thing of the past. An interactive javascript command line REPL included along with your JDK (or JRE) is also a useful feature.

import javax.script.*
ScriptEngineFactory…

Command line

jjs -scripting <- interactive
jjs -scripting blah.js <- run script
Can also use #! to run script

NetBeans integration: Breakpoints, debug, etc.


Clojure in the Cloud

Everett Toews
slide deck

This session was very much a tutorial and spent a lot of time explaining underlying technologies and how to use them with Clojure. In many ways, I considered it too basic.

lein try -> test a new dependency/project

(pprint *) pretty-print

lein repl :connect host:port <- connect to running lein instance for debug, etc

clj-http
Hosebird (hbc)
Apache jclouds
Clojure SDK (twitter-api, tentacles)


Thinking in Functional Style

Venkat Subramaniam
topics and code
video

Venkat presented the best sessions I attended at JavaOne. He has a witty, likable style, is well prepared, his examples are relevant, and he isn't afraid to type code live.

“mutable sharing is the devil’s work”

Assignment-less programming
Immutable state
Functions

  • first class
  • no side effects (pure)

memoization

www.agiledeveloper.com -> code, examples, etc

check out prime number example


Building Secure Applications w/ Java EE

Patrycja Wegrzynowicz
slide deck

Security is boring, it is especially hard early in the morning when your caffeine has not kicked in. This session was yet another example of this, but I came away with some new usable tools and some pointers I have already put to use.

OWASP
Zed Attack Proxy (ZAP)
Enterprise Security API (ESAPI)
WebGoat

Session Management: associate session w/IP, UserAgent, etc. if anything changes invalidate

Declarative authorization

  • web.xml
  • @RolesAllowed, @…

Consider moving from JSP to JSF 2.x+


Clojure, Made Simple

Rich Hickey

It came across in his presentation that Rich is passionate about software development. His description of burning out due to some repetitive tasks forced on you by OOP was all too familiar. I was especially interested in this session because I started learning Clojure on the plane on the way to JavaOne. Hearing why Clojure is the way it is from the creator's mouth was a great way to begin my education.

Datomic
Om - browser MVC

Clojure

  • data orientation
  • simplicity (in sense of opposite of complexity)

Data is raw, immutable information
Code is data
Majority of functions take/return data
symbols reference something else
keywords reference themselves

EDN - extensible data notation
Data structures are the code
Syntax is in the interpretation of data structures

Hiccup DSL -> Data as HTML

core.async -> simple channel model
emphasize flow over places

Polymorphism

  • Clojure protocols
  • polymorphism on first argument

Counterclockwise for Eclipse


Accelerated Java EE Open Source Development w/ Eclipse

Greg Stachnick
slide deck
video

I use Eclipse daily and I was introduced to multiple useful plugins and even found out a few useful details about plugins I already use.

Dali Java Persistence Tools

  • create a data model
  • configuration
  • JPQL querying

Eclipse Link - JPA & multiple to/from conversions

Java Server Faces

  • lib management
  • config (not necessary in JEE 6/7)
  • navigation
  • page components drag & drop

Allows Java <-> WSDL can start w/either

JAX-RS for RESTful


BDD in Action

John Smart
slide deck

I was introduced to BDD when I worked at Dollar Tree and I find it is an excellent way to get individuals at different levels on the same page. I have read a couple chapters of BDD in Action and will finish the book after this presentation.

BDD

  • collaboration
  • hunting out value
  • building the right software
  • automated acceptance criteria
  • API and code design
  • building the software right
  • living documentation

3 Amigos session: business analyst, developer, tester

  • Develop features from requirement descriptions
  • Create automated acceptance criteria with BDD scenario

Convert scenarios to code in tests

Collaboration before automation

JBehave, Cucumber, Thucydides(creates nice web output reports)

Use layers

  • Business rules
  • Business flow
  • Page/Component interactions
  • Page/Component details

JUnit, Spock, Lambda-Behave(Java 8)


50 JMS 2.0 Best Practices in 50 minutes

Nigel Deakin
slide deck
video

My only note from this session was "Get the slide deck". It is useful and you will learn something that you can use in your Java code.


Writing Highly Concurrent Polyglot Applications with Vert.x

Tim Fox

I have used Vert.x a bit in previous projects, but it was with older versions. I am impressed by the growth of the project and gained insight into the project's design decisions while watching Tim's presentation.

features described are from 3.0 -> Java 8 only

Event Bus

  • heart of the system
  • verticals talk over bus
  • point-to-point, pub/sub, request/response

Distributed Date

  • across cluster
  • map

Vertical

  • execution unit of Vert.x
  • written in any supported language
  • single threaded *one edge case
  • communicate via messages

Command Line: vertx run * <— run any vertical

Clustered Event Bus

  • can be cross JVM
  • microservices
  • apps loosely coupled can be distributed across network

Event bus can be extended to client side in Javascript

On command line add “-cluster” when running across verticals

maven shade —> generate fat jars
Can create fat jars & just deploy on command line

High Availability

  • automatic failover
  • network partition detection (quorum)

RxJava

  • mitigate call back hell
  • use codeine to generate Rx-ified version of Vert.x APIs

3.0: distributed, asynchronous map, lock, counter

A lot of core objects now create Metrics - expand on JMX, can also be on Event bus

Creating stack of recommended modules that will be announced soon


Reactive Programming for Java Devs

Venkat Subramaniam - www.agiledeveloper.com
topics and code
video

I was not going to attend this session until I went to another presentation by Venkat. I was not disappointed and learned enough about Reactive programming to gain a new appreciation for why it is the new hotness.

RxJava

Reactive App

  • event driven
  • scalable
  • resilient
  • responsive

Compositional & lazy evaluation

Reactive

  • Observable++, observer patter but better
  • dataflow
  • push instead of pull iteration
  • signal end
  • respectfully deal w/errors (1st class)
  • synchronous, asynchronous, lazy

Handling failure

  • options
  • onErrorResumeNext

skip and take to filter inputs

Asynchronous clients

  • subscribeOn
  • Schedulers (Schedulers.io <— will elegantly handle I/O wait)
  • Executors.new FixedThreadPool
  • Schedulers.from( ^ )

Slow clients

  • feed.subscribe…
  • subscriber.setProducer(request -> {})
  • request

Java Apps w/Docker on Raspberry Pi

Johan Janssen
slide deck
video

I didn't learn much new here, but it was an example of an interesting combination of three technologies that I have never tried before.


Map, Flatmap & Reduce are Your New Best Friends (same, but from oscon)

Chris Richardson
slide deck (from OSCON)

By this point in the conference I was feeling fairly comfortable with streams. Chris mixed in some examples from other JVM languages (Scala in particular) that kept the topic fresh and made a good final session of the conference.

Doyle  Young

Doyle Young

View Comments
Navigation