DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Ultra low latency Event Store

Peter Lawrey user avatar by
Peter Lawrey
·
Feb. 08, 12 · Interview
Like (0)
Save
Tweet
Share
8.14K Views

Join the DZone community and get the full member experience.

Join For Free

There are two basic libraries for managing data in Java, JDBC (for connecting to database) and JMS (for messaging). For some use cases you ideally want both, and you want it to be very fast.

History

This is a redevelopment of a previous project HugeCollections The project is still on hold because its too complex IMHO for what it does. This library is lower level and much simpler to understand. It may become the basis for the higher level HugeCollections library.

The Java Chronicle Library

This library attempts to provide ultra low latency, high throughput, persisted, messaging and event driven in memory database with random access to previous messages) The typical latency is as low as 16 nanoseconds (between processes), supporting throughputs of 5-20 million messages per second.

Technical Features

  • It uses almost no heap with trivial GC impact regardless of size, 
  • It can be much larger than your physical memory size (only limited by the size of your disk). and can be shared *between processes* with better than 1/10th latency of using Sockets over loop back. 
  • You can attach any number of readers, including tools to see the exact state of the data externally. e.g. I use; od -t cx1 {file} to see the current state. 

It can change the way you design your system because it allows you to have independent processes which can be running or not at the same time (as no messages are lost) This is useful for restarting services and testing your services from canned data. e.g. like sub-microsecond durable messaging. 

Modes of use

The library can be used in two modes. You can use it as an event driven persisted journal but polling when new excepts are added, or as a re-writable random access store but accessing it randomly and changing what you want. If you want both, you need two chronicles, one to be updated with the latest values and one to notify events.
The main limitations are that it only designed for one writer, and "extracts" or records cannot be made larger once they are written.

Download or Browse the Java Chronicle Library

 

From http://vanillajava.blogspot.com/2012/02/ultra-low-latency-event-store.html

Event Event store

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • gRPC on the Client Side
  • 11 Observability Tools You Should Know
  • Building a Real-Time App With Spring Boot, Cassandra, Pulsar, React, and Hilla
  • Steel Threads Are a Technique That Will Make You a Better Engineer

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: