Java: High-Performance Apps with Java 9
eBook - ePub

Java: High-Performance Apps with Java 9

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Java: High-Performance Apps with Java 9

About this book

Optimize the powerful techniques of Java 9 to boost your application's performanceAbout This Book• Tackle all kinds of performance-related issues and streamline your development• Dive into the new features of Java 9• Implement highly efficient and reliable codes with the help of new APIs of Java• Embedded with assessments that will help you revise the concepts you have learned in this bookWho This Book Is ForThis book is targeted at developers who would like to build reliable and high-performance applications with Java.What You Will Learn• Familiarize with modular development and its impact on performance• Learn various string-related performance improvements, including compact string and modify string concatenation• Explore various underlying compiler improvements, such as tiered attribution and Ahead-of-Time (AOT) compilation• Learn security manager improvements• Understand enhancements in graphics rasterizers• Use of command-line tools to speed up application development• Learn how to implement multithreading and reactive programming• Build microservices in Java 9• Implement APIs to improve application codeIn DetailJava 9 which is one of the most popular application development languages. The latest released version Java 9 comes with a host of new features and new APIs with lots of ready to use components to build efficient and scalable applications. Streams, parallel and asynchronous processing, multithreading, JSON support, reactive programming, and microservices comprise the hallmark of modern programming and are now fully integrated into the JDK. This book focuses on providing quick, practical solutions to enhance your application's performance. You will explore the new features, APIs, and various tools added in Java 9 that help to speed up the development process. You will learn about jshell, Ahead-of-Time (AOT) compilation, and the basic threads related topics including sizing and synchronization. You will also explore various strategies for building microservices including container-less, self-contained, and in-container. This book is ideal for developers who would like to build reliable and high-performance applications with Java. This book is embedded with useful assessments that will help you revise the concepts you have learned in this book.Style and approachThis book is a fast-paced guide that provides practical solutions to enhance your application's performance.Note: This book is a blend of text and quizzes, all packaged up keeping your journey in mind. It includes content from the following Packt product: • Java 9 High Performance by Mayur Ramgir and Nick Samoylov

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Java: High-Performance Apps with Java 9


Java: High-Performance Apps with Java 9

Copyright Ā© 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: March 2018
Production reference: 1080318
Published by Packt Publishing Ltd.
Livery Place, 35 Livery Street
Birmingham B3 2PB, UK.
ISBN: 978-1-78913-051-5
www.packtpub.com

Credits

This book is a blend of text and quizzes, all packaged up keeping your journey in mind. It includes content from the following Packt product:
  • Java 9 High Performance by Mayur Ramgir and Nick Samoylov

Meet Your Experts

We have the best works of the following esteemed authors to ensure that your learning journey is smooth:
Mayur Ramgir has more than 16 years of experience in the software industry, working at various levels. He is a Sun certified Java programmer and Oracle certified SQL database expert. He completed an MS in computational science and engineering at Georgia Tech, USA (rank 7th in the world for computer science), and an M.Sc. in multimedia application and virtual environments at University of Sussex, UK. He has also attended various universities for other degrees and books, such as MIT for applied software security, and University of Oxford for system and software security. He is the CEO of a software company, Zonopact, Inc. headquartered in Boston, USA, which specializes in bringing innovative applications based on AI, robotics, big data, and more. He has single-handedly developed Zonopact's flagship product, Clintra (B2B-integrated AI-assisted business management software). He is also the inventor of two patent pending technologies, ZPOD (an automated cloud-based medical kiosk system) and ZPIC (an AI-enabled robotic in-car camera system).
Nick Samoylov is graduated as an engineer-physicist from Moscow Institute of Physics and Technologies and has even worked as a theoretical physicist. He has learned programming as a tool for testing his mathematical models using FORTRAN and C++. After the demise of the USSR, Nick created and successfully ran a software company, but was forced to close it under the pressure of governmental and criminal rackets. Nick adopted Java in 1997 and used it for his work as a software developer-contractor for a variety of companies, including BEA Systems, Warner Telecom, and Boeing. Nick's current projects are related to machine learning and developing a highly scalable system of microservices using non-blocking reactive technologies, including Vert.x, RxJava, and RESTful web services on Linux deployed in a cloud.

Preface

This book is about Java 9 which is one of the most popular application development languages. The latest released version Java 9 comes with a host of new features and new APIs with lots of ready to use components to build efficient and scalable applications. Streams, parallel and asynchronous processing, multithreading, JSON support, reactive programming, and microservices comprise the hallmark of modern programming and are now fully integrated into the JDK.
So, if you want to take you Java knowledge to another level and want to improve your application's performance, you are in the right path.

What's in It for Me?

Maps are vital for your journey, especially when you're holidaying in another continent. When it comes to learning, a roadmap helps you in giving a definitive path for progressing towards the goal. So, here you're presented with a roadmap before you begin your journey.
This book is meticulously designed and developed in order to empower you with all the right and relevant information on Java. We've created this Learning Path for you that consists of five lessons:
Lesson 1, Learning Java 9 Underlying Performance Improvements, covers the exciting features of Java 9 that will improve your application's performance. It focuses on modular development and its impact on an application's performance.
Lesson 2, Tools for Higher Productivity and Faster Application, describes two new tools added in Java 9--JShell and Ahead-of-Time (AOT) compiler--that boost your productivity and also improve the overall performance of your applications.
Lesson 3, Multithreading and Reactive Programming, shows how to monitor Java applications programmatically using command-line tools. You will also explore how to improve the application performance via multithreading and how to tune the JVM itself after learning about the bottlenecks through monitoring.
Lesson 4, Microservices, describes the solution many leaders of the industry have adopted while addressing flexible scaling under the load. It talks about adding more workers by splitting the application into several microservices, each deployed independently and each using multiple threads and reactive programming for better performance, response, scalability, and fault-tolerance.
Lesson 5, Making Use of New APIs to Improve Your Code, describes improvements in the programming tools, including stream filters, a stack-walking API, the new convenient static factory methods for creating immutable collections, a new powerful CompletableFuture class in support of asynchronous processing, and the JDK 9 stream API improvements.

What Will I Get from This Book?

  • Familiarize with modular development and its impact on performance
  • Learn various string-related performance improvements, including compact string and indify string concatenation
  • Explore various underlying compiler improvements, such as tiered attribution and Ahead-of-Time (AOT) compilation
  • Learn security manager improvements
  • Understand enhancements in graphics rasterizers
  • Use of command-line tools to speed up application development
  • Learn how to implement multithreading and reactive programming
  • Build microservices in Java 9
  • Implement APIs to improve application code

Prerequisites

This book is for Java developers who would like to build reliable and high-performance applications. Some of the prerequisites that is required before you begin this book are:
  • Prior Java programming knowledge is assumed

Chapter 1. Learning Java 9 Underlying Performance Improvements

Just when you think you have a handle on lambdas and all the performance-related features of Java 8, along comes Java 9. What follows are several of the capabilities that made it into Java 9 that you can use to help improve the performance of your applications. These go beyond byte-level changes like for string storage or garbage collection changes, which you have little control over. Also, ignore implementation changes like those for faster object locking, since you don't have to do anything differently and you automatically get these improvements. Instead, there are new library features and completely new command-line tools that will help you create apps quickly.
In this lesson, we will cover the following topics:
  • Modular development and its impact on performance
  • Various string-related performance improvements, including compact string and indify string concatenation
  • Advancement in concurrency
  • Various underlying compiler improvements, such as tiered attribution and Ahead-of-Time (AOT) compilation
  • Security manager improvements
  • Enhancements in graphics rasterizers

Introducing the New Features of Java 9

In this lesson, we will explore many under the cover improvements to performance that you automatically get by just running your application in the new environment. Internally, string changes also drastically reduce memory footprint requirements for times when you don't need full-scale Unicode support in your character strings. If most of your string...

Table of contents

  1. Java: High-Performance Apps with Java 9

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Java: High-Performance Apps with Java 9 by Mayur Ramgir, Nick Samoylov in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.