2014/11/12

Devoxx 2014: Conference day 1 Notes (12/11/2014)

keynote

jboss

  • containers
  • microservices
  • “Camel”

oracle

  • 20 years java (1995)
  • java 8 Brian Goetz
    • lamba’s
    • stream() / parallelStream() (List / Hashset api)
    • default methods
  • next
    • —> jigsaw module system
      • small devices (compact profile)
      • security mechs
      • startup performance
      • blocked usage of sun*internal stuff
      • part of openjdk
    • Poject Valhalla
      • cache misses / align curren tmemory
      • sepcialized generics
      • value types
      • var handles
    • Project Panama
  • IoT Jasper Potters

Devoxx 2014: Pico Services with Java EE 7 on Java 8 and Docker

Adam Bien
base concepts:
  • JAX-RS
  • @Inject
  • Business component: Boundary Control Entity pattern
setup demo
  • netbeans
  • glassfish v4
  • simple pom.xml: javax / javaee-api 7.0
  • JAX-RS
  • @Stateless EJB (bean.xml in JEE6)
  • docker:
    • test environment
    • expose ports
    • jenkins in docker
    • “ambassador pattern” -> used for real data

60 useful Linux commands in 15 minutes

Pierre-Antoine Grégoire

Sparky guide to bug-free JavaScript

Mite Mitreski
  • debugger; statement: force debugger
  • console.table clean format in console
  • console.trace + Objects.observe who changed object?
  • async debug (full stactrace) async
  • DOM mutation Observer
  • log with google analytics gaq.push() :-/

Let’s Get Physical: I/O Programming with Java on the Raspberry Pi using Pi4J

Robert Savage
  • Pi4j:
    • open source / Low level IO
    • event based
    • java + JNI (C)
  • IO interfaces
    • digital interfaceGPIO/ PWM
    • data UART, serial, SPI, I²C
    • analog interfaces: extra hardware
  • models
    • a/b: 21 GPIO
    • b+ 28 GPIO
    • compute module: 46

Spotify - audio delivery at scale

Niklas Gustavsson
  • commoditiy servers
    • high availibility, robustnest
    • colocated
  • backend services
    • ‘atomic’
    • self-executing jar
    • wired toghether with propriatary protocol (zeromq-based)
  • clients: keep socket open
  • Service Discovery: DNS records
  • robustnest / scalability:
    • storage: Cassandra
  • teams
    • autonomuous org.
    • general principles / rules (programming language etc.)
  • content distribution
    • attempt to do local caching (depends on device)
    • “storage resolve” service -> file location
    • CDN’s
      • audio-files are not really ‘standard’ content for CDN’s
      • multiple providers
      • performance is correlated with amount of data served from CDN
  • measure!
    • latency
    • buffering
  • others:
    • no p2p
    • only desktop clients (battery / bandwidth constraints)
    • prefetching
    • head files: first few seconds (unencrypted on CDN)

Concurrency in Enterprise Java

Alexander Heusingfeld
Java SE 5 classic Thread -> java.util.concurrent
  • ExecutorServices
  • no trx’s
  • etc.
patterns of software stability
  • timeouts
  • bulkheads: separate app components
  • curcuit breaker: failfast on thread starvation
  • steady state: free unused resources
JSR 236: javax.enterprise.concurrent
  • containermanaged threads
  • ManagedThreadFactory
    • extends ThreadFactory from SE
    • ManageableThread
    • use ExecutorServices from SE
    • fork/join pool not supported
  • ManagedExecutorService
    • jndi lookup
    • lifecycle api’s disabled
    • List >executor.invokeAll()
  • ManagedScheduledExecutorService
    • schedule tasks with trigger (e.g. executor.scheduleAtFixedRate())
  • ContextService
  • ManagedTaskListener -> event management
    • ManagedExecutors class
runtime remarks:
  • wildfly (JBoss): special commanline options
  • some gotcha’s as this is new technology
    • check RejectionPolicy
    • Java 8 Streams API (parallelStream -> uses ForkJoinPool internally, not compatible with ManagedThreads)
  • running on < Java8: Guava — ListeningExecutorService -> Callbacks
  • Netflix Hystrix: stability patterns (e.g. Circuit-Breaker)
    • custom threadpool
    • hystrix.plugin.HystrixConcurrencyStrategy
Summary JSR 236:

Predictability and Performance

Richard Warburton
“be predictable”
Branch prediction:
  • cpu-cycles: fetch, decode, exec, writeback
  • branch -> stall -> predict
    • static: no dynamic data considered
      • forward: not taken
      • backware: taken
    • local / global
    • performance event counters:
      • specific registers -> can store prediction info
  • demo time perf java ...
Locality
  • arrays -> strides
  • good data layout principles
    • primitive collections: HPPC, FastUtil, GNU Trove)
    • arrays instead of linked lists
    • hashtable instead of tree
    • custom data-structures: judy arrays, kD-Trees, Z-Order Curves
  • java heap layout issues: no location guarantee (GC etc)
    • off heap structures (libraries)
Storage
  • seeking vs sequential reads
  • fragmentation: preallocate
  • sector misalignment: offset logical vs physical sector
  • iotop

The end of traditional enterprise IT

Ron Van Kemenade (CIO ING group)

No comments: