Skip to main content

My Wednesday at JavaOne 2013

Posted by haroldcarr on September 26, 2013 at 4:16 PM PDT

2013-09-25

Last Modified : 2013 Sep 26 (Thu) 16:25:00 by carr.

Wednesday, Sep 25, 2013


8:30am - nuvos: the Universal SDK

  • Kevin McCarthy - President / CEO, IntraMeta

This presentation is useful as a list of things to think about when
writing a thick-client/thin-server app. But not a particularly
interesting talk in terms of technology. They say they have an SDK,
but the talk never really got to it, instead, just listing
requirements/capabilities.

http://www.nuvos.com/

case-study

  • thick client
  • real-time data push collaboration tool
    • each client runs apps
    • sync data between them
  • deloitte, chevron

requirements

  • real-time communication push
  • low bandwidth
  • works on bad networks (latency, loss, congestion)
  • offline with seamless data sync
  • leverage Java code/developers
  • desktop browers and tablet
  • enterprise acceptable
  • run in cloud on on-premise
  • no leader fails

architecture

  • code generator
    • javabean + serialization + storage
  • clist-side MVC framework + local data
  • server-side object store and journals
  • guaranteed delivery msg bus (comet)
  • GWT/DHTML UI

backend

code gen

  • similar to WSDL
  • entity model
    • javabean
  • message layer

server side

  • stores - save, delete,search
  • jouranls - strict numbering for order

message bus

  • msg Q
  • guaranteed delivery
  • server migration/failover
  • message handlers
  • rpc framework

frontend

gwt

  • created custom UI widgets
  • simpler CSS
  • lighter weight

features

  • works offline; bad networks
  • push data (no polling)
  • no plugins required (e.g., flash, silverlight, …)
  • much higher limits (# user, app, data,…)
  • headless java clients
    • full unit testing (JUnit, TesNG,) and CI (Hudson)
    • SMS gateway

browsers

  • inconsistencies: rendering, performance; features
  • performance: dom, hard to profile
  • security : XSS
  • legacy browsers won't die
  • runtime errors hard to to debug/reproduce

service integration

  • definition: APIs (models, exceptions, msgs) in Java via annotations (no XML)
  • package unit test iwth def
  • loopback impl

client

  • local or remote
  • local: native code integration point
  • remote: Java or proxy

service

  • implement API via servlet


10:00am - OAuth 2.0 : A Standard is Coming of Age

  • Uwe Friedrichsen - CTO, codecentric AG

OAuth 1.0

  • 4/2010 - IETF RC 5849
  • complex, limited scope, not extensible, not enterprise ready

players

  1. - you - user-agent
    • have password for your resources at #2
    • you do not want to give #3 full access to #2
  2. - app with protected resources (e.g., photo server)
  3. - client - (e.g., photo book server)
    • needs access to 2

OAuth 2.0

  • 10/2012 - IETF RFC 6749

players

  1. - you - user-agent
    • have password for your resources at #2
    • you do not want to give #3 full access to #2
  2. a. authorization server
    b. resource server
  3. - client
    • needs access to 2


11:30am - Java Flight Recorder Behind the Scenes

  • Staffan Larsen, Java SE Serviceability Architect, Oracle

overview

  • tracer and profiler
  • non-intrusive
  • built into JVM
  • modes
    • on-demand profiling
    • after-the-fact capture and analysis
      • circular buffers (or file)
  • 7u40

tracer and profiler

  • captures JVM and app data
    • GC, synchronization, compiler, CPU usage, Exceptions, I/O
  • sample-based profiler
    • low overhead; accurate data

non-intrusive

  • 2-3% overhead
  • can enable/disable
  • much info already available in JVM
    • just available now

built into JVM

  • 50% optimized C++ code
  • 50% Java

on-demand profiling

  • start from Java Mission COntrol : jmc
    • or CLI
  • higher overhead when on
  • GUI for analysis

after-the-fact

  • default mode
  • when SLA breach detected, dump current circular buffers
  • dump will have info leading up to breach

demo via jmc

  • name
  • duration
  • continuous | sampling | …

can connect over JMX

currently cannot compare recordings

demo via CLI

  • jcmd
    • lists Java processes
> jcmd
3919 /opt/local/share/sbt/sbt-launch.jar
4072 sun.tools.jcmd.JCmd
  • jcmd <name of process> JRF.start

config

  • -XX:+UnlockCommericalFeatures -XX:+FlightRecorder
    • free for development; cost $ for production
  • -XX:FlightRecoderOptions
    • max stack trace depth
    • save recording on exit
    • logging
    • repository path

recording sessions

  • 80 events with 3 settings
  • two preconfigured settings: default | profile

simultaneous recording sessions

  • each session has own settings
  • each session sees union of all events

implementation

JMX       API
|         |
v         v
+------------------------------+
|   JVM                        |
|                              |
|JFR thread buffers --> global-|----> disk
|     ^   ^   ^         buffer |
|     |   |   |                |
|compiler GC runtime           |
+------------------------------+

event

  • Size
  • EventId
  • EndTime
  • StartTime
  • ThreadID
  • StackTraceID
  • Payload

event types

  • instant
  • duration
  • requestable

event metadata

  • name, path, description
  • payload
    • name, type, duration, content type

content type

  • bytes, percentage, address, millis, nanos

XML event definitions (attributed oriented) processed into C++ classes

filter early

  • enable/disable events
  • thresholds
  • enable/disable stack trace
  • frequency

Related Topics >>