JavaOne – keynote

For more blog posts from JavaOne, see the table of contents


This blog post is like a sandwich. I arrived a few minutes late due to not allowing enough time for security. And leaving a little early so ready for my session. Sat at aisle in last row so easy to leave. Feels weird sitting all the way in the back. But cool because see whole audience.

Data from Intel

  • Data is to this century what oil was to the last
  • Autonomous car generates 14TB a day
  • Moving from compute centric to data centric world
  • Speed, operating at Scale and Smarts (AI and make better decisions)
  • Talked about chip improvements
  • Persistent memory – speed of SSD
  • Pilot library for persistent collections
  • Alibaba talked about how Singles Day had more traffic than Black Friday. Along with importance of hardware, persistent collections and representative workloads
  • Data Bench for testing
  • BigDL uses Hadoop for deep learning. Works with Java, Scala and Python
  • Talked about importance of scalar/vector processing for graphics. Intel posted a long URL on the screen for the Vector API Developer Program

Stats

  • #1 Programming language
  • 12 million developers
  • 38 bilion VMs
  • 21 billion cloud connected VMs

Mark Cavage

  • Themes: Open, Evolving, Nimble, Scalable
  • “When companies grow up, they use Java.” “People rewriting in Java”
  • Hard to remove things, but need to in order to stay relevant
  • Moving Java EE to Eclipse foundation should make more nimble. Moving everything spec, reference implementation, TCKs, etc
  • Brought up rep from Tomitribe (Tomcat), IBM and RedHat
  • Inherit a lot. EE4J is like enterprise Java for the next generation
  • IBM released their JDK to Eclipse Foundation as well – Open J9. Took a year to do that
  • @EclipseEE4J
  • Java SE 9 – modules mae it possible to evolve platform. ava 9 is the first step.
  • OpenJDK will be under GPL license
  • Oracle JDK will open source all features. Not specific commercial only one
  • Need to ship more often. Last release 3 years ago. [glad they said 3 rather than 2. planning for 2 doesnt make it so]

Redmonk

  • Companies choose Ruby until doesn’t scale Ex: Facebook is now a big Java/Hadoop shop
  • Developer ADD – want something new, shiny and fast
  • Redmonk developer rankings done quarterly looing at github and stackoverflow. JavaScript and Java always do best
  • It’s nice to have new things, but it is also nice to sleep at night
  • Spotify

    • Started with Python. Switched to Java/Scala for scale
    • Fail locally – if search fails, doesn’t affect streaming
    • Devs run and own their microservices

    >Kubernetes

    • Open source becoming more important as an alternative to vendor lockin
    • Containers decouple from environment and sometimes the OS
    • Starting to see middleware being split up by combining machines and functionality moving to libraries
    • Resource management, not just VMs

    FN Project
    Serverless project
    They staged the open sourcing on stage. Granted it was planned. But still a nice ceremony.

    Java chief architect
    Tech troubles and we learned he completely relies on a prompt screen. When prompting worked again, he started talking about the basics of classpath vs module path. These are really high level; he should have been able to speak to it. I left during his session to talk over and get ready for my lab

    JavaOne – Improve your Groovy Kung-Fu

    “Improve your Groovy Kung-Fu”

    Speaker: Dierk Koenig

    For more blog posts from JavaOne, see the table of contents


    Use cases

    • Spock for testing
    • System automation – Docker
    • Jenkins scripting console and pipelines

    Recommends Groovy ref card

    Groovy idioms

    “a” == “b” – check if two strings are equal

    a in col – check if element in a collection

    ${‘0’*10} – print 10 times

    use Collections, {
    time.shufle()
    }

    type .xyz vs .getXyz()

    use “it” (default) instead of creating a variable for grep

    catch(all) – vs catch(Exception e)

    gpars dataflows – specify what want to do in tasks, but not the order [I had trouble following this part]

    @Grab(“groupid:artifactid:version”) – get dependency from Maven Central. Can specify a resolver as first parameter if want to use an alternate one. Not worth it though because then as much work as setting up a project.

    Command line

    • groovy -e “print 1” – command line eval
    • groovyconsole – interactive UI

    My take: I like that he showed code that he wrote and pointed out idioms. Seeing well written code is helpful for seeing good practices. I also realized that I know more than I thought. Many of the items in this post I knew existed but aspire to use more. Or things I do and would like more of the team to do.

    JavaOne – Apache Maven and its Impact on Java 9

    “Apache Maven and its Impact on Java 9”

    Speaker: Robert Scholte

    For more blog posts from JavaOne, see the table of contents


    Up until Java 8, Maven goes fine on top of Java. In Java 9, there is overlap.

    Review of Maven

    • Dependency management
    • All about pom.xml
    • All about classpaths
    • Generate project information

    Module path mismatch

    • Classpath accepts – output dirs, jar files and zip files (Maven doesn’t support zip files)
    • Module path accepts output directories, module output directories and directories with jars [and jars; keep reading]
    • Options included pointing to diretory containing the jar (but contains other things to), symlins (windows unhappy), create lib directory and copy files (a lot of IO)
    • Java 9 team added specifying direct jar files per Maven’s request

    Module names

    • Like problem with group id/artifact id
    • Need to be unique
    • Learned over 30K artifact ids end with a number. This was a problem for automatic module names because many woul have same name creating collision. ex: commons-lang2 and commons-lang3
    • Also, many artifact ids are naming conflicts if ignore group id. Which is problematic for automatic module names when use two jars that collide
    • Made difference between library builders and app builders. Standard that library builders should never refer to automatic modules. If no exports, can assume it is an application. And apps have control of what gets used.
    • Maven gives warning if library refers to automatic module usage. (use Maven 3.+ so warning shows up in color

    Dependencies not yet modular

    • If you are dependent on open source library and it is dependent on one that isn’t modular (or the depenency changed the module name), the direct dependency can’t migrate to modules yet
    • Solution: use Automatic-Module-Name to manifest of libraries so not using algorithm. A good bridge

    Tips

    • Point of no return – each time you refer to a dependency that is a module, you can’t go back to a previous version that does not
    • Don’t have split packages if can (Maven itself has a split package issue for old compatibility classes)
    • Don’t have classs in the root package
    • Provide your future module name in the manifest
    • Use a unique module name
    • Don’t change folder structure to add module name
    • plexus-java can help plugins build path
    • Classpath isn’t going away. The older the project, the harder it will likely be to migrate to modules

    release tag
    In addition to source/target 1.9, you can specify <release> to indicate compatiblity
    Can use animal-sniffer to determine if code compiled on a newer version of Java in an older JDK mode will ctually run.

    Module file
    Maven doesn’t generate. Requires human input. Not all modules are dependencies. jdeps can do it because has access to binary files. But need before compile at build time so not compiling twice

    My take: Interesting problems and solutions. I feel like he takeaway is “don’t upgrade to Java 9 yet”. The font was small on the screen. Even when there aren’t a lot of words on the screen