Java Magazine, May/June 2018

Total Page:16

File Type:pdf, Size:1020Kb

Java Magazine, May/June 2018 LOCK ELISION IN THE JVM 74 | JAVA 10 var KEYWORD 63 MAY/JUNE 2018 magazine By and for the Java community Design Patterns 15 27 38 50 COMMAND JPA AND PRODUCER-CONSUMER MAPPING DDD PATTERN HIBERNATE FOR HIGH-VOLUME TO JAVA EE IN DEPTH PATTERNS DATA IN JAVAFX ORACLE.COM/JAVAMAGAZINE Don’t let Java redeploys slow you down Would you rather be waiting... ...or coding Reload code changes instantly with JRebel TRY IT NOW! GET FREE TRIAL //table of contents / COVER FEATURES 27 38 50 DESIGN PATTERNS FOR PRODUCER-CONSUMER USING DOMAIN- JPA AND HIBERNATE IMPLEMENTATIONS IN DRIVEN DESIGN By Thorben Janssen JAVAFX WITH JAVA EE Best practices for an efcient By Sean M. Phillips By Sebastian Daschner and maintainable persistence Graphing high volumes of How to map DDD artifacts layer with JPA and Hibernate spiky data requires adaptations to Java EE code 15 to the traditional pattern. THE COMMAND PATTERN IN DEPTH By Ian F. Darwin Packaging commands as objects and sending them to a receiver enables a clean, loosely coupled design that’s easy to maintain. OTHER FEATURES DEPARTMENTS 63 87 05 10 var and Java 10’s Expanded Fix This From the Editor Events Type Inference By Simon Roberts and Mikalai Zaikin A completely new JVM codebase heralds Upcoming Java conferences and events By Raoul-Gabriel Urma and Our latest quiz with questions that a new generation of performance. 86 Richard Warburton test intermediate and advanced 07 User Groups Best practices for using local knowledge of the language Letters The Peru JUG variable type inference Java Web Start, containers, and 99 74 other reader concerns Contact Us Lock Elision in the JVM 09 Have a comment? Suggestion? Want to By Ben Evans and Chris Newland Java Books submit an article proposal? Here’s how. How the compiler’s escape analysis Review of Java by Comparison removes unnecessary locks COVER ART BY WES ROWELL 02 ORACLE.COM/JAVAMAGAZINE /////////////////////////////////////////////// MAY/JUNE 2018 EDITORIAL PUBLISHING Editor in Chief Group Publisher Andrew Binstock Karin Kinnear Managing Editor Audience Development Manager Claire Breen Jennifer Kurtz Interim Managing Editor Leslie Steere Certification ADVERTISING SALES Copy Editors Lea Anne Bantsari, Karen Perkins Sales Director Tom Cometa Contributing Editors Simon Roberts, Mikalai Zaikin Mailing-List Rentals Contact your sales representative. Technical Reviewer Stephen Chin MATTERS RESOURCES Oracle Products DESIGN +1.800.367.8674 (US/Canada) Senior Creative Director Francisco G Delgadillo Oracle Services +1.888.283.0591 (US) Design Director Richard Merchán Senior Designer Arianna Pucherelli Experienced a Greater Designer 1 Jaime Ferrand 72% Demand for Their Skills Senior Publication Designer Sheila Brennan Production Designer Kathy Cygnarowicz Said Certification was a 67% Key Factor in Recent Raise1 ARTICLE SUBMISSION If you are interested in submitting an article, please email the editors. Received Positive Impact 2 SUBSCRIPTION INFORMATION 64% on Professional Image Subscriptions are complimentary for qualified individuals who complete the subscription form. MAGAZINE CUSTOMER SERVICE [email protected] PRIVACY Oracle Publishing allows sharing of its mailing list with selected third parties. If you prefer that your mailing address or email address not be included in this program, contact Customer Service. Oracle University Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. No part of this publication may be reprinted or otherwise reproduced without permission from the editors. JAVA MAGAZINE IS PROVIDED ON AN “AS IS” BASIS. ORACLE EXPRESSLY DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ORACLE BE LIABLE FOR ANY Differentiate Yourself to Attract Employers DAMAGES OF ANY KIND ARISING FROM YOUR USE OF OR RELIANCE ON ANY INFORMATION PROVIDED HEREIN. Opinions expressed by authors, editors, and interviewees—even if they are Oracle employees—do not necessarily reflect the views of Oracle. The information is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied Source: 1—Certification Magazine, Annual Salary Survey, January 2018 | 2—Pearson VUE, Value of IT Certification Survey, 2017. upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. Oracle and Java are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Java Magazine is published bimonthly and made available at no cost to qualified subscribers by Oracle, 500 Oracle Parkway, MS OPL-3A, Redwood City, CA 94065-1600. 03 ORACLE.COM/JAVAMAGAZINE /////////////////////////////////////////////// MAY/JUNE 2018 //from the editor / Java in the Cloud The Vanguard of a New Generation of JVMs Oracle Cloud delivers Graal leads a new ecosystem of emerging JVM technologies that herald big benefts. high-performance and battle-tested platform and infrastructure services for the most demanding ntil the 2014 release of Java 8, a common guage (depending on whose statistics you’re look- Java apps. Ucomplaint you heard from outside the Java ing at), which shows how effective the new fea- community was that Java, the language, had tures have been in keeping the language relevant, stalled. The JVM, by comparison, was widely useful, and practical. Oracle Cloud. admired. But even though the JVM supported The many advances from the Java team Built for modern app dev. numerous languages (which we’ve covered indi- have made it easy to overlook other innovation Built for you. vidually in this magazine over the last four years), happening with the JVM. Notably, a small team Java was still its principal language and, well, within Oracle called Oracle Labs has spent the last that was getting long in the tooth. Many of us few years researching ways to improve the JVM’s knew this point of view was exaggerated. The Java performance and its ability to host other lan- team had widely and frequently communicated guages. In April, the group announced that a set the innovations it was working on and the wave of new technologies had reached version 1.0 and of innovations that would be coming after those. were now available for wider use. Among these Java 8 indeed disarmed critics who had claimed were GraalVM—a different take on the current Start here: that Java wasn’t keeping up with other languages. JVM—and the Truffle API, which facilitates port- developer.oracle.com And the changes in Java 9 and 10, as well as the ing languages to Graal. upcoming Java 11, are demonstrating the torrid GraalVM is designed with two goals in mind: pace at which new features will be delivered. Java performance and the ability to support many #developersrule remains either the #1 or #2 most widely used lan- languages. Let me start with the matter of lan- PHOTOGRAPH BY BOB ADLER/THE VERBATIM AGENCY 05 ORACLE.COM/JAVAMAGAZINE /////////////////////////////////////////////// MAY/JUNE 2018 //from the editor / guages. Out of the box, GraalVM JVM programs. They do this with tion is available for Java and the supports JavaScript, Python 3, R, ahead-of-time (AOT) compila- languages discussed earlier. and Ruby. In addition, it can run tion. AOT is a term that refers to GraalVM is an exciting proj- any code destined for the LLVM regular old compilation to native ect—not only because it contin- back end. Today, this includes C binaries (as C, C++, Go, and Rust ues to expand the possibilities and C++, among other languages. do). To run, the programs use of both Java and the JVM, but Looking just at the JavaScript some memory-management because it appears to have a support, you can swap out the V8 and thread-scheduling abilities genuine opportunity to deliver The Best virtual machine in Node.js and of the Substrate VM, which is a on the quest of many language replace it with GraalVM, and your JVM-like virtual machine that infrastructure developers: a vir- Resource programs will run unchanged. is itself compiled to native code. tual machine that runs all major However, thanks to GraalVM’s In this sense, the Substrate VM languages well. for Modern support for other languages, your can be viewed as simply a run- Because of its importance project can now run more than time library of functions needed in advancing the Java platform Cloud Dev JavaScript. For example, you can for execution. This native option and because it is inherently such define data structures in C or C++ removes the JVM’s long startup interesting technology, we’ll be The Oracle Developer and use them with JavaScript. time. In addition, the code is not covering GraalVM extensively in Gateway is the best place How cool is that? interpreted at any point, provid- future issues of the magazine. to jump-start your modern A framework called Truffle ing further performance benefit. But don’t wait for us: if you want cloud development skills is available to facilitate using Another path to reduced exe- to start working with the tech- with free trials, downloads, GraalVM for execution of other cution time is the use of more- nology now, go to the website, tutorials, documentation, languages. A tutorial, includ- aggressive optimizations. For download it, and try it out. and more. ing instructions for implement- example, GraalVM makes exten- ing a simplified language, is sive use of escape analysis—a Andrew Binstock, Editor in Chief Trials. Downloads. available here. type of analysis that recognizes [email protected] Tutorials. Start here: The second key aspect of certain data objects that can @platypusguy developer.oracle.com GraalVM is the performance be treated as if they were local improvement it delivers. Because variables, resulting in far fewer I have seen only a few bench- memory allocations.
Recommended publications
  • SJC – Small Java Compiler
    SJC – Small Java Compiler User Manual Stefan Frenz Translation: Jonathan Brase original version: 2011/06/08 latest document update: 2011/08/24 Compiler Version: 182 Java is a registered trademark of Oracle/Sun Table of Contents 1 Quick introduction.............................................................................................................................4 1.1 Windows...........................................................................................................................................4 1.2 Linux.................................................................................................................................................5 1.3 JVM Environment.............................................................................................................................5 1.4 QEmu................................................................................................................................................5 2 Hello World.......................................................................................................................................6 2.1 Source Code......................................................................................................................................6 2.2 Compilation and Emulation...............................................................................................................8 2.3 Details...............................................................................................................................................9
    [Show full text]
  • Download Issue
    Issue October 2019 | presented by www.jaxenter.com #70 The digital magazine for enterprise developers JavaThe JDK’s hidden 13 treasures i Jakarta EE 8 Let the games begin JDK 13 Why text blocks are worth the wait OpenJFX 13 JavaFX gets its own identity © Teguh Mujiono/Shutterstock.com, Pushkin/Shutterstock.com Illustrationen: Sun Microsystems Inc., S&S Media Editorial Let’s celebrate Java – three times! It’s that time again: A new Java version is here! Java 13 Last but not least: Jakarta EE, the follow-up project of was launched as planned, six months after the release Java EE, has announced its first release under the umbrella of of Java 12, and again it has some interesting features on the Eclipse Foundation. We got hold of the executive director board. In this issue of Jax Magazine, we’ve covered them of the Eclipse Foundation, Mike Milinkovich, and asked him for you in detail. about the current status of Jakarta EE. The good news doesn’t end there, as JavaFX 13 has also been released. The UI toolkit is no longer included in the JDK Happy reading, but has adjusted its new version releases to the new Java re- lease cadence. Find out what’s new here! Hartmut Schlosser Java 13 – a deep dive into the JDK’s 3 Kubernetes as a multi-cloud 17 new features operating system Falk Sippach Patrick Arnold Index Java 13 – why text blocks are worth the wait 6 Multi-tier deployment with Ansible 21 Tim Zöller Daniel Stender Jakarta EE 8 is sprinting towards an 9 Do we need a service mesh? 28 exciting future for enterprise Java Anton Weiss Thilo Frotscher
    [Show full text]
  • Hibernate ORM Query Simplication Using Hibernate
    2016 3rd National Foundation for Science and Technology Development Conference on Information and Computer Science Hibernate ORM Query Simplication Using Hibernate Criteria Extension (HCE) Kisman Sani M. Isa Master of Information Technology Master in Computer Science Bina Nusantara University Bina Nusantara University Jl. Kebon Jeruk Raya No. 27, Jakarta Barat, DKI Jl. Kebon Jeruk Raya No. 27, Jakarta Barat, DKI Jakarta, Indonesia 11530 Jakarta, Indonesia 11530 [email protected] [email protected] Abstract— Software development time is a critical issue interfaced by a query. The software engineer will make in software development process, hibernate has been the query specified to database used. Each database widely used to increase development speed. It is used in vendor has their Structured Query Language (SQL). As database manipulation layer. This research develops a the development of software technology and most of library to simplify hibernate criteria. The library that is programming languages are object oriented, some called as Hibernate Criteria Extension (HCE) provides API functions to simplify code and easily to be used. Query engineer or software institutions try to simplify the associations can be defined by using dot. The library will query process. They try to bind object in application to automatically detect the join association(s) based on database. This approach is called as Object Relational mapping in entity class. It can also be used in restriction Mapping (ORM). ORM is a translation mechanism from and order. HCE is a hibernate wrapper library. The object to relational data, vice versa. ORM has “dialect” configuration is based on hibernate configuration.
    [Show full text]
  • Java (Programming Langua a (Programming Language)
    Java (programming language) From Wikipedia, the free encyclopedialopedia "Java language" redirects here. For the natural language from the Indonesian island of Java, see Javanese language. Not to be confused with JavaScript. Java multi-paradigm: object-oriented, structured, imperative, Paradigm(s) functional, generic, reflective, concurrent James Gosling and Designed by Sun Microsystems Developer Oracle Corporation Appeared in 1995[1] Java Standard Edition 8 Update Stable release 5 (1.8.0_5) / April 15, 2014; 2 months ago Static, strong, safe, nominative, Typing discipline manifest Major OpenJDK, many others implementations Dialects Generic Java, Pizza Ada 83, C++, C#,[2] Eiffel,[3] Generic Java, Mesa,[4] Modula- Influenced by 3,[5] Oberon,[6] Objective-C,[7] UCSD Pascal,[8][9] Smalltalk Ada 2005, BeanShell, C#, Clojure, D, ECMAScript, Influenced Groovy, J#, JavaScript, Kotlin, PHP, Python, Scala, Seed7, Vala Implementation C and C++ language OS Cross-platform (multi-platform) GNU General Public License, License Java CommuniCommunity Process Filename .java , .class, .jar extension(s) Website For Java Developers Java Programming at Wikibooks Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few impimplementation dependencies as possible.ble. It is intended to let application developers "write once, run ananywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to rurun on another. Java applications ns are typically compiled to bytecode (class file) that can run on anany Java virtual machine (JVM)) regardless of computer architecture. Java is, as of 2014, one of tthe most popular programming ng languages in use, particularly for client-server web applications, witwith a reported 9 million developers.[10][11] Java was originallyy developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems'Micros Java platform.
    [Show full text]
  • Jersey 3.0.0-M1 User Guide Jersey 3.0.0-M1 User Guide Table of Contents
    Jersey 3.0.0-M1 User Guide Jersey 3.0.0-M1 User Guide Table of Contents Preface ........................................................................................................................... xvii 1. Getting Started ................................................................................................................ 1 1.1. Creating a New Project from Maven Archetype .......................................................... 1 1.2. Exploring the Newly Created Project ........................................................................ 1 1.3. Running the Project ............................................................................................... 3 1.4. Creating a JavaEE Web Application ......................................................................... 5 1.5. Creating a Web Application that can be deployed on Heroku ........................................ 6 1.5.1. Deploy it on Heroku ................................................................................... 8 1.6. Exploring Other Jersey Examples ........................................................................... 11 2. Modules and dependencies .............................................................................................. 12 2.1. Java SE Compatibility .......................................................................................... 12 2.2. Introduction to Jersey dependencies ........................................................................ 12 2.3. Common Jersey Use Cases ..................................................................................
    [Show full text]
  • Fira Code: Monospaced Font with Programming Ligatures
    Personal Open source Business Explore Pricing Blog Support This repository Sign in Sign up tonsky / FiraCode Watch 282 Star 9,014 Fork 255 Code Issues 74 Pull requests 1 Projects 0 Wiki Pulse Graphs Monospaced font with programming ligatures 145 commits 1 branch 15 releases 32 contributors OFL-1.1 master New pull request Find file Clone or download lf- committed with tonsky Add mintty to the ligatures-unsupported list (#284) Latest commit d7dbc2d 16 days ago distr Version 1.203 (added `__`, closes #120) a month ago showcases Version 1.203 (added `__`, closes #120) a month ago .gitignore - Removed `!!!` `???` `;;;` `&&&` `|||` `=~` (closes #167) `~~~` `%%%` 3 months ago FiraCode.glyphs Version 1.203 (added `__`, closes #120) a month ago LICENSE version 0.6 a year ago README.md Add mintty to the ligatures-unsupported list (#284) 16 days ago gen_calt.clj Removed `/**` `**/` and disabled ligatures for `/*/` `*/*` sequences … 2 months ago release.sh removed Retina weight from webfonts 3 months ago README.md Fira Code: monospaced font with programming ligatures Problem Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like -> , <= or := are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet. Solution Download v1.203 · How to install · News & updates Fira Code is an extension of the Fira Mono font containing a set of ligatures for common programming multi-character combinations.
    [Show full text]
  • Design Pattern
    Sitesbay.com A Perfect Place for All Tutorials Resources Java Projects | C | C++ | DS | Interview Questions | JavaScript Core Java | Servlet | JSP | JDBC | Struts | Hibernate | Spring | Java Projects | C | C++ | DS | Interview Questions | Html | CSS | Html5 | JavaScript | Ajax | Angularjs | Basic Programs | C Project | Java Project | Interview Tips | Forums | Java Discussions www.sitesbay.com DESIGN PATTERN By SEKHAR SIR [Thursday, May 29, 2014] Recursive Problem:- If some problem occurs again and again in a particular context then we call it as a Recursive Problem. For example, if an audio player having support with MP2 files gets problem for MP3 files and having support for MP3 gets problem MP4. So it is a recursive problem. In a software application, for example a recursive problem will be transferring the data across layers. Q. Why Design Patterns? Ans:- Design patterns are used for solving recursive problems in a software application design. A design pattern is a description for how to solve a recursive problem. Design patterns are not a technology or a tool or a language or a platform or a framework. Design patterns are effective proven solutions for recursive problems. Q. How many Design Patterns? Ans:- Actually, there is no fixed count of no of design patterns because design patterns is not a package and not in the form of classes. SUN Microsystems constituted a group with four professional with the name of Gang of Four (GOF) to find effective solutions for the recursive problems. According to GOF, they found 23 design patterns as effective solutions for re-occurring problems. GOF divided java design patterns into 4 categories (a) Creational Design Patterns:- (1) Singleton Pattern.
    [Show full text]
  • Web Age Webinar Series
    WEB AGE TECHNOLOGY WEBINAR SERIES iOS Development using Swift Webinar Series WELCOME! To ask a question during the presentation type it in the “Questions” section Slides will be available shortly after the presentation Audio Recording will be published shortly after the presentation Webinar Series JASON BELL Webinar Series JASON BELL Webinar Series UPCOMING CLASSES iOS 10 Development with Swift June 26-30 goo.gl/oT0Z9W Webinar Series AGENDA Mobile Landscape and Development Options iOS Development Why Swift? Swift 4 and Xcode 9 Q & A Webinar Series MOBILE LANDSCAPE Webinar Series MOBILE LANDSCAPE Webinar Series NATIVE ANDROID DEVELOPMENT Language Java Kotlin Development Tool Android Studio Webinar Series NATIVE IOS DEVELOPMENT Language Swift Objective-C Development Tool Xcode AppCode (JetBrains) Webinar Series CROSS-PLATFORM DEVELOPMENT Web application Hybrid HTML-based cross-platform frameworks Apache Cordova / Adobe PhoneGap Native cross-platform frameworks Xamarin (C#) React Native (JavaScript) Appcelerator Titanium (JavaScript) Qt (C++) Webinar Series CROSS-PLATFORM DEVELOPMENT (PROS) Ability to more easily reuse code for multiple platforms Leverage existing language/framework knowledge Webinar Series CROSS-PLATFORM DEVELOPMENT (CONS) GUI components may still need to be coded multiple times to obtain a platform-specific look and feel Different platform design guidelines May not have access to all native functionality New native features may not be available right away Performance and offline functionality Webinar Series LANGUAGES FOR
    [Show full text]
  • Apache Tomcat 9
    Apache Tomcat 9 Preview Mark Thomas, September 2015 © 2015 Pivotal Software, Inc. All rights reserved. 2 Introduction Apache Tomcat committer since December 2003 – [email protected] Tomcat 8 release manager Member of the Servlet, WebSocket and EL expert groups Consultant Software Engineer @ Pivotal Currently focused on Apache Tomcat 9 © 2015 Pivotal Software, Inc. All rights reserved. 3 Agenda Specification mandated new features Tomcat specific new features Tomcat features removed Internal changes © 2015 Pivotal Software, Inc. All rights reserved. 4 Tomcat versions Minimum 1st Stable Tomcat JavaEE Servlet JSP EL WebSocket JASPIC EOL Java SE Release 5.x 4 1.4 2.4 2.0 N/A N/A N/A 08 2004 09 2012 6.x 5 5 2.5 2.1 2.1 N/A N/A 02 2007 12 2016 7.x 6 6 3.0 2.2 2.2 1.1 N/A 01 2011 TBD 8.x 7 7 3.1 2.3 3.0 1.1 N/A 02 2014 TBD 9.x 8 8 4.0 2.4? 3.1? 2.0? 1.1? Q4 2016? TBD © 2015 Pivotal Software, Inc. All rights reserved. 5 Specification changes © 2015 Pivotal Software, Inc. All rights reserved. 6 Specifications JavaEE 8 Key elements – HTML 5.0 – HTTP/2 – Simplification – Better integration for managed beans – Better infrastructure for the cloud © 2015 Pivotal Software, Inc. All rights reserved. 7 Specifications Servlet 4.0 Work started, stalled and is now starting again – Driven by JavaOne HTTP/2 Ease of use improvements – HttpFilter, default methods Clarifications – Starting to make progress © 2015 Pivotal Software, Inc.
    [Show full text]
  • Java Version 40 Download Apache Tomcat ® Welcome to the Apache Tomcat ® 9.X Software Download Page
    java version 40 download Apache Tomcat ® Welcome to the Apache Tomcat ® 9.x software download page. This page provides download links for obtaining the latest version of Tomcat 9.0.x software, as well as links to the archives of older releases. Unsure which version you need? Specification versions implemented, minimum Java version required and lots more useful information may be found on the 'which version?' page. Quick Navigation. Release Integrity. You must verify the integrity of the downloaded files. We provide OpenPGP signatures for every release file. This signature should be matched against the KEYS file which contains the OpenPGP keys of Tomcat's Release Managers. We also provide SHA-512 checksums for every release file. After you download the file, you should calculate a checksum for your download, and make sure it is the same as ours. Mirrors. You are currently using https://mirror.softaculous.com/apache/ . If you encounter a problem with this mirror, please select another mirror. If all mirrors are failing, there are backup mirrors (at the end of the mirrors list) that should be available. Please see the README file for packaging information. It explains what every distribution contains. Apache Tomcat ® The Apache Tomcat ® software is an open source implementation of the Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations and Jakarta Authentication specifications. These specifications are part of the Jakarta EE platform. The Jakarta EE platform is the evolution of the Java EE platform. Tomcat 10 and later implement specifications developed as part of Jakarta EE. Tomcat 9 and earlier implement specifications developed as part of Java EE.
    [Show full text]
  • Cloud-TM Companion Document For
    Cloud-TM Specific Targeted Research Project (STReP) Contract no. 257784 Companion document for deliverable D2.2: Preliminary Prototype of the RDSTM and RSS Date of preparation: 10 June 2010 Start date of project: 1 June 2010 Duration: 36 Months Contributors Emmanuel Bernard, Red Hat Joao Cachopo, INESC-ID Mark Little, Red Hat Francesco Quaglia, CINI Paolo Romano, INESC-ID Vittorio A. Ziparo, ALGORITHMICA Manik Surtani, Red Hat Sanne Grinovero, Red Hat Fabio Cottefoglie, ALGORITHMICA —————————————————— (C) 2010 Cloud-TM Consortium. Some rights reserved. This work is licensed under the Attribution-NonCommercial-NoDerivs 3.0 Creative Commons License. See http://creativecommons.org/licenses/by-nc-nd/3.0/legalcode for details. Table of Contents 1 Introduction 4 1.1 Relationship with other deliverables . .4 2 Architectural Overview of the Cloud-TM Preliminary Prototype 6 2.1 TorqueBox . .6 2.2 Object Grid Mapper . .7 2.3 Reconfigurable Distributed STM and Storage System . .8 3 Setting up the prototype 10 3.1 Structure and Content of the Package . 10 3.2 Installing and running the prototype . 10 3.2.1 Hibernate OGM . 11 3.2.2 Fenix Framework . 12 4 Conclusions 13 3 1 Introduction This document accompanies Deliverable D2.2, Preliminary Prototype of the Cloud- TM platform. Its aim is to overview the current architecture of the prototype and to document how to set it up in order to develop applications running on top of it. As planned in the DoW this preliminary prototype does not include neither dy- namic reconfiguration mechanisms, nor the Autonomic Manager which are going to be developed later on during the project.
    [Show full text]
  • A Post-Apocalyptic Sun.Misc.Unsafe World
    A Post-Apocalyptic sun.misc.Unsafe World http://www.superbwallpapers.com/fantasy/post-apocalyptic-tower-bridge-london-26546/ Chris Engelbert Twitter: @noctarius2k Jatumba! 2014, 2015, 2016, … Disclaimer This talk is not going to be negative! Disclaimer But certain things are highly speculative and APIs or ideas might change by tomorrow! sun.misc.Scissors http://www.underwhelmedcomic.com/wp-content/uploads/2012/03/runningdude.jpg sun.misc.Unsafe - What you (don’t) know sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) • Used inside the JVM / JRE sun.misc.Unsafe - What you (don’t) know • Internal class (sun.misc Package) • Used inside the JVM / JRE // Unsafe mechanics private static final sun.misc.Unsafe U; private static final long QBASE; private static final long QLOCK; private static final int ABASE; private static final int ASHIFT; static { try { U = sun.misc.Unsafe.getUnsafe(); Class<?> k = WorkQueue.class; Class<?> ak = ForkJoinTask[].class; example: QBASE = U.objectFieldOffset (k.getDeclaredField("base")); java.util.concurrent.ForkJoinPool QLOCK = U.objectFieldOffset (k.getDeclaredField("qlock")); ABASE = U.arrayBaseOffset(ak); int scale = U.arrayIndexScale(ak); if ((scale & (scale - 1)) != 0) throw new Error("data type scale not a power of two"); ASHIFT = 31 - Integer.numberOfLeadingZeros(scale); } catch (Exception e) { throw new Error(e); } } } sun.misc.Unsafe
    [Show full text]