Skip to content

Vanilla-Java/Blog

Repository files navigation

Vanilla Java Blog Examples

GitHub repository for the examples discussed on the Vanilla Java blog, covering various topics in high-performance Java programming.

About

This repository hosts a collection of example projects discussed in articles on the Vanilla Java blog, authored by Peter Lawrey. Each example is designed to illustrate concepts in Java programming, ranging from low-latency persistence and high-throughput application design to Java’s core language features and best practices.

Peter Lawrey, known for his expertise in Java and JVM optimization, has developed these examples to help Java developers deepen their understanding of both foundational and advanced programming techniques. This repository organizes the examples into separate modules for easy exploration.

Structure

The project follows a multi-module structure where each module represents a unique topic or example:

  • core-concepts – Demonstrates core Java concepts such as data types, collections, concurrency, and more.

  • performance-optimizations – Contains examples on memory management, CPU efficiency, and Java profiling tools.

  • low-latency – Focuses on techniques for achieving low-latency and high-throughput performance in Java applications.

  • java-misconceptions – Covers common misconceptions and pitfalls in Java, explained in-depth with examples.

  • advanced-topics – Includes examples on topics such as off-heap memory management, thread pinning, and direct memory access.

  • case-studies – Real-world applications and case studies discussed on the blog.

Each module contains a README.adoc file with detailed explanations for each example.

Getting Started

Prerequisites

  • Java 8 or later

  • Apache Maven 3.6+

Cloning the Repository

$ git clone https://github.com/Vanilla-Java/Blog.git
$ cd Blog

Building the Project

This project uses Maven for building. Run the following command from the root directory to build all modules:

$ mvn clean install

Running Examples

Each module can be executed individually. For example, to run an example from the core-concepts module:

$ cd core-concepts
$ mvn exec:java -Dexec.mainClass="blog.vanillajava.examples.MainExample"

Replace MainExample with the specific example class you wish to execute.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.

  2. Create a new branch for your feature or bug fix.

  3. Commit your changes with descriptive commit messages.

  4. Submit a pull request.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

References

For more information on these examples, visit the Vanilla Java blog at https://blog.vanillajava.blog/.

Contact

For questions or support, reach out to the repository maintainer via GitHub issues.

Thank you for visiting the Vanilla Java blog examples repository! We hope you find these examples helpful in your Java programming journey.

About

Sample code used in the Vanilla Java blog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published