Java One Session Notes

I recently attend java one (2016). My notes from that.

  • Java Technology and Ecosystem: Everything You Wanted to Know
    • Openjdk and oracle jdk 0 should be be able to use interchangable.
    • Prefer binary message format over json\xml
  • Microservices
    • N\w latency is never zero.
    • Containerize  MS as much as possible.
    • http://jav.mn/dockerjee
    • Container – standardize interface between dev and ops.
    • https://github.com/eldermoraes/javaoneus2016
    • Jelastic Docker- can migrate the container with its internal state
    • History – Monolith – to maximize the hardware and software cost
    • Microservices Minus the Hype: How to Build and Why [CON6462] – PPT greatone.
    • Api first mindset.
    • Playdoh principle.
    • 12 factor manifesto.
  • Modularization (Java Jigsaw)
    • Java.base will be base
    • Only technology implemented in one module
    • Java –list-modules
    • Java –list-modules java.base
    • Jlink – links set of modules and creates runtime.
    • Dependency and readability graph.
    • Public != accessible
    • Classpath and module path can be combined.
  • The Developers Guide to Performance Tunning.
    • Data-lite performance testing anti-pattern.
    • Even with production volume data is not sufficient, one needs to simulate exact production input.
    • Find out the dominating consumer of CPU – Appl, JVM, Kernel, nothing dominating.
    • The Diabolical Developer’s Guide to Performance Tuning
  • Performance Tuning and How to Upscale to Analyze in a Cluster Deployment
    • Use IBM Health Center (completely open source)
    • Works with IBM, open jdk. With oracle JDK does not give profiling info.
    • JMX – one connection per client
    • MQTT – multiple connection per client
    • Symptoms- Lower throughput, higher than expected to CPU, Application unresponsive.
    • Bottlenecks – GC, I\O, CPU, Resource contention – Locking.
    • Post mortem Tools – GC logs, Appilcation logs, heap dump, thread dump.
    • Live monitoring
    • HealthCenter (IBM tool) avialable in IBM Marketplace. (native agent)
    • Cloudbased – ELK stack
    • https://github.com/RuntimeTools/
  • Supercharge Your Java Code to Get Optimal Database Performance
    • Performance = latency * throughput
    • Latency = time to process UoW
    • Thoughput = amount of UoW can be execute in parallel
    • Commit only when needed.
    • Batching of transaction. Row by Row = Slow by Slow
    • Put the logic where it makes sense
    • Does not rollback entire batch – Insert into test … log errors;
    • Pls use bind variable
    • https://github.com/gvenzl/Oracle-JavaOneSuperchargeCodeOptimalDBPerf
  • Threaddump
    • 8 way to take threadump – jstack, kill -3, Visualvm, JMC, Windows Ctl+break, ThreadMXBean, APMTools, jcmd
    • https://Blog.fasthread.io
    • Causes – Garbage collection or Infinite loop
    • 8 Type of OutofMemory error
    • Java Heap Space
    • Thread mill pattern – Creating new thread
    • Leprechaun pattern – Blocking the finalizer thread
    • RSI – Repetitive Stress Injury pattern – Creating unlimited thread
    • Traffic Jam pattern – Synchronized method.
  • Java 8
    • Faster than previous version – Fork\join, ParallelStream
    • Lambda – Fewer line of code.
    • New Solution, Datetime api.
    • Minimize error @optional
    • Automated testing important – to make sure nothing breaks
    • Performance test – impact refactoring on performance.
    • https://github.com/mongodb/morphia
    • http://bit.ly/refJ8
  • Hystrix
    • to track the nake call made without hystrix
    • Clean any unnecessary calls
    • Build dashboard around the agent log to track outgoing calls.
    • Everything outgoing is around with Hystrix.
    • Hystrix Audit agent –
    • Mindset change – code for resiliency
    • Unit test and integration with Wiremock
    • Hsytrix metric stream.
    • Turbine – aggregate all stream in one client.
    • Hystrix Dashboard – D3 dashboard.
    • Netflix Altas – Analyzing historic data.
    • Not appcicable to batch and streaming usecase.
    • https://github.com/billyy/Hystrix-Tutorial
  • Art of backward compatibility
    • Command line serialver argument.
    • Ignore unknown, define default value – careful about this.
    • Semantic Compatibility
    • Object serialization bypasses constructor.
    • Custom serialization \deserialization
    • Bridge method injection
  • HTTP2 api
    • Each request has its own stream.
    • Each stream has its own flow.
    • Can reset single stream wiithout impacting others.
    • Server push
    • Prioritize of request.
    • Header Compress (HPACK)
    • Binary exchange protocol
    • Completable Future Api
  • CDI
    • Java CDI has more to offer over above spring, juice, seam
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s