
High Performance with Java
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
Building high performance into your applications is key to creating an optimal user experience, although it is not the only consideration for the performant nature of your apps. High performance applications can lead to cost-effective resource utilization, especially when scalability and cloud computing are involved. They can also provide highly reliable systems that are easier to maintain. High Performance with Java begins by helping you explore the Java Virtual Machine (JVM) and understand how to push it to its limits to further optimize your programs. You'll take a hands-on approach to go through memory optimization strategies, input/output operations, concurrency, networking, as well as frameworks and libraries focused on performance. You'll also learn key strategies and best practices by using industry-relevant examples to architect scalable and resource-efficient applications. The concluding chapters provide valuable insights on optimizing your Java code when interacting with databases and show you how to leverage artificial intelligence (AI) for high performance Java applications. By the end of this book, you'll grasp the importance of developing high performance Java applications and gain practical experience in implementing key strategies to help ensure your Java applications perform optimally.
All prices
More details
Other editions
Additional editions

Content
- Cover
- Title page
- Copyright and credits
- Contributors
- Table of Contents
- Preface
- Part 1: Code Optimization
- Chapter 1: Peeking inside the Java Virtual Machine
- Technical requirements
- How the JVM works
- More options with javap
- Garbage collection
- The garbage collection process
- Garbage collection algorithms
- Garbage collection optimizations
- JIT compiler optimizations
- Interpretation
- AOT compilation
- JIT compilation
- Summary
- Chapter 2: Data Structures
- Technical requirements
- Improving performance with lists
- Why use lists?
- Common list implementations
- High performance with lists
- Improving performance with arrays
- Array characteristics
- Implementing arrays
- High performance with arrays
- Improving performance with trees
- Examples of a tree structure
- High-performance considerations
- Improving performance with stacks and queues
- Implementing stacks
- Improving the performance of stacks
- Implementing queues
- Improving the performance of queues
- Improving performance with advanced data structures
- Hash tables
- Graphs
- Trie
- Heap
- Quad trees
- Octrees
- Bitsets
- Ropes
- Summary
- Chapter 3: Optimizing Loops
- Technical requirements
- Types of loops
- A loop's impact on performance
- Loop optimization basics
- Loop unrolling
- Testing loops for performance
- Profiling tools and methodology
- Benchmarking and testing strategies
- Case studies and examples
- Nested loops
- Introduction to nested loops
- Loop fusion in nested loops
- Parallelizing nested loops
- Nested loop vectorization
- Summary
- Chapter 4: Java Object Pooling
- Technical requirements
- Jumping into the object pool
- Database example
- Implementing an object pool in Java
- Advantages and disadvantages of object pooling
- Advantages
- Disadvantages
- Performance testing
- Designing a performance test
- Implementing a performance test
- Analyzing the results
- Summary
- Chapter 5: Algorithm Efficiencies
- Technical requirements
- Algorithm selection
- Selection process
- Case study
- Evolving trends
- Low time complexity
- Strategies for reducing time complexity
- Common pitfalls
- Testing algorithms for efficiency
- Importance of testing
- Preparing for algorithm efficiency testing
- Conducting the tests
- Post-test actions
- Summary
- Part 2: Memory Optimization and I/O Operations
- Chapter 6: Strategic Object Creation and Immutability
- Technical requirements
- Minimizing object creation
- Java object life cycle
- Memory
- Object pooling
- Initialization approaches
- Overhead reduction
- Object immutability
- Immutability overview
- Best practices
- Performance advantages
- Custom classes
- String classes
- Garbage collection
- Garbage collection implications
- Object cloning
- Design patterns
- Singleton pattern
- Factory pattern
- Summary
- Chapter 7: String Objects
- Technical requirements
- Proper string pooling
- String interning
- Best practices
- Code examples
- String pooling for database queries
- Lazy initialization
- Code examples
- Best practices
- Additional string operation strategies
- Concatenation
- Regular expressions
- Large text files
- Summary
- Chapter 8: Memory Leaks
- Technical requirements
- Proper referencing
- An introduction to references
- Memory leak identification
- Memory leak avoidance strategies
- Listeners and loaders
- Event listeners
- Class loaders
- Caching and threads
- Caching strategies
- Thread management
- Java concurrency utilities
- Summary
- Part 3: Concurrency and Networking
- Chapter 9: Concurrency Strategies and Models
- Technical requirements
- Concurrency models
- Thread-based model
- The message passing model
- The Reactive model
- Multithreading
- Thread life cycles
- Multithreading best practices
- Synchronization
- Non-blocking algorithms
- Summary
- Chapter 10: Connection Pooling
- Technical requirements
- Connection pooling concepts
- Advantages of connection pooling
- Challenges of connection pooling
- Implementing connection pools
- Connection pool libraries
- Setting up a connection pool
- Integrating connection pools
- Monitoring connection pools
- Best practices with connection pools
- Connection pool sizing
- Handling connection leaks
- Connection pool security
- Advanced topics
- Summary
- Chapter 11: Hypertext Transfer Protocols
- Technical requirements
- Introduction to HTTP
- HTTP core components
- Java and HTTP
- Java web applications
- Java web application architecture
- Key technologies
- Steps for creating a simple Java web application
- Using HTTP in Java
- API integration
- Security considerations
- Performance optimization
- Summary
- Part 4: Frameworks, Libraries, and Profiling
- Chapter 12: Frameworks for Optimization
- Technical requirements
- Asynchronous input/output
- Advantages and best practices
- Implementing AIO
- Buffered input/output
- Advantages and best practices
- Implementing buffered input/output
- Batch operations
- Advantages and best practices
- Implementing batch operations
- Frameworks for microservices
- Advantages and best practices
- Implementing microservices frameworks
- Frameworks for cloud-native applications
- Advantages and best practices
- Implementing a cloud-native application
- Case studies and performance analysis
- Case studies
- Performance analysis
- Summary
- Chapter 13: Performance-Focused Libraries
- Technical requirements
- Java Microbenchmark Harness
- Key features
- Adding JMH libraries to your IDE
- Writing benchmarks
- Running benchmarks
- Analyzing results
- Use cases
- Netty
- Core features
- Performance considerations
- Implementation
- FasterXML Jackson
- Core features
- Performance considerations
- Implementation
- Other notable libraries
- Agrona
- Eclipse Collections
- Guava
- Summary
- Chapter 14: Profiling Tools
- An introduction to profiling tools
- The importance of profiling in performance tuning
- Types of profiling tools and their uses
- Profilers bundled in the JDK
- JVisualVM
- JMC
- IDE-embedded profilers
- The IntelliJ IDEA profiler
- Eclipse's Test and Performance Tools Platform
- NetBeans Profiler
- Additional profilers
- YourKit Java Profiler
- JProfiler
- VisualVM plugins and extensions
- A comparative analysis of profiling tools
- Performance overhead
- Accuracy
- Ease of use
- Integration
- Cost and licensing considerations
- The best use cases for each tool
- Scoring our profiling tools
- Practical profiling strategies
- Identifying performance bottlenecks
- Profiling in development versus production
- Continuous profiling
- Case studies
- Case study 1 - profiling a large enterprise application
- Case study 2 - performance tuning in a microservices architecture
- Case study 3 - profiling and optimizing a high-throughput system
- Future trends in Java profiling
- Advances in profiling tools
- Integration with AI and machine learning
- Emerging standards and best practices
- Summary
- Part 5: Advanced Topics
- Chapter 15: Optimizing Your Database and SQL Queries
- Database design
- Schema principles
- Indexing
- Partitioning and sharding
- Query optimizations
- Query execution
- Best practices
- Advanced SQL techniques
- Additional strategies
- Fine-tuning
- Database performance monitoring
- Database maintenance
- Case studies
- Case study 1
- Case study 2
- Case study 3
- Summary
- Chapter 16: Code Monitoring and Maintenance
- APM tools
- APM tool overview
- APM tool key features
- Popular APM tools
- APM tool best practices
- Code reviews
- Best practices
- Peer review processes
- Common pitfalls
- Logging
- Best practices
- Logging frameworks
- Analyzing log data
- Monitoring and alerting
- Monitoring system setup
- Alert configuration
- Alert and incident response
- Maintenance strategies
- Documentation and knowledge management
- Refactoring strategies
- Legacy code
- Summary
- Chapter 17: Unit and Performance Testing
- Technical requirements
- Unit testing
- Frameworks
- Writing unit tests
- Best practices
- Pitfalls
- TDD
- Performance testing
- Types and tools
- Overarching strategies
- Integrating unit and performance testing
- Summary
- Chapter 18: Leveraging Artificial Intelligence (AI) for High-Performance Java Applications
- Technical requirements
- Introduction to AI in Java
- AI's relevance to high-performance Java applications
- Current trends
- Future directions
- AI for performance optimization
- Code optimization and performance tuning
- Predicting performance bottlenecks
- Abbreviated case study
- AI-powered monitoring and maintenance
- Anomaly detection
- AI-based logging
- Maintenance strategies
- AI integration
- Best practices
- Ethical and practical considerations
- Summary
- Epilogue
- Index
- Other Books You May Enjoy
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.
File format: ePUB
Copy protection: without DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Use a reader that can handle the file format ePUB, such as Adobe Digital Editions or FBReader – both free (see eBook Help).
- Tablet/Smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePUB works well for novels and non-fiction books – i.e., 'flowing' text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook does not use copy protection or Digital Rights Management
For more information, see our eBook Help page.