pronghorn-pipes

Ring buffer based queuing utility for applications that require high performance and/or a small footprint. Well suited for embedded and stream based processing.

License

License

GroupId

GroupId

com.ociweb
ArtifactId

ArtifactId

pronghorn-pipes
Last Version

Last Version

1.0.34
Release Date

Release Date

Type

Type

jar
Description

Description

pronghorn-pipes
Ring buffer based queuing utility for applications that require high performance and/or a small footprint. Well suited for embedded and stream based processing.
Project URL

Project URL

https://github.com/oci-pronghorn/PronghornPipes
Source Code Management

Source Code Management

https://github.com/oci-pronghorn/PronghornPipes

Download pronghorn-pipes

How to add to project

<!-- https://jarcasting.com/artifacts/com.ociweb/pronghorn-pipes/ -->
<dependency>
    <groupId>com.ociweb</groupId>
    <artifactId>pronghorn-pipes</artifactId>
    <version>1.0.34</version>
</dependency>
// https://jarcasting.com/artifacts/com.ociweb/pronghorn-pipes/
implementation 'com.ociweb:pronghorn-pipes:1.0.34'
// https://jarcasting.com/artifacts/com.ociweb/pronghorn-pipes/
implementation ("com.ociweb:pronghorn-pipes:1.0.34")
'com.ociweb:pronghorn-pipes:jar:1.0.34'
<dependency org="com.ociweb" name="pronghorn-pipes" rev="1.0.34">
  <artifact name="pronghorn-pipes" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.ociweb', module='pronghorn-pipes', version='1.0.34')
)
libraryDependencies += "com.ociweb" % "pronghorn-pipes" % "1.0.34"
[com.ociweb/pronghorn-pipes "1.0.34"]

Dependencies

compile (1)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.25

runtime (1)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.25

test (1)

Group / Artifact Type Version
junit : junit Optional jar 4.12

Project Modules

There are no modules declared in this project.

PronghornPipes

Click for build status Powered by CloudBees

Ring buffer based queuing utility for applications that require high performance and/or a small footprint. Well suited for embedded and stream based processing.

Some of the key ideas embodied in the project are:

  • Messages are data not objects
  • Using memory sequentially is faster than random access
  • Exclusive use of primitives provides for a smaller memory footprint
  • Stream processing must be garbage free to eliminate stalls and support deterministic behavior
  • Single producer single consumer lock free queues provide for simple designs and good performance

#Purpose

The purpose of this project was to build a light weight data passing queue for large concurrent application development. The Pronghorn framework makes use of these queues for all message passing between actors.

Applications using Embedded and/or Compact Profiles will find this project most helpful. None of the collections APIs are used and all the processing is done with primitives. The only external dependencies are JUnit for testing and SLF4J for logging.

#Design

These queues are similar to the Disruptor and also fill the same purpose which is to pass data between threads.

Unlike other Java projects PronghornPipes defines messages as data and therefore are always serialized and do not have a (first class) object representation. Messages passed on the queue are defined in an XML file and are loaded into a schema object (FieldReferenceOffsetManager). This object can be used directly eliminating any need to use XML or parsing in a deliverable product.

All the APIs read and write the fields directly in place (eg on the queue). This eliminates pointer chasing overhead and encourages sequential usage and optimal cache line usage.

The RingBuffer class contains 2 private array buffers, one for fixed data and one for variable length data. This design enables direct access to any fields within the messages while supporting variable length field types.

#Ring Buffer Features

  • Garbage free, runtime data passing does not allocate or free any memory
  • Lock free, CAS used for setting position of head/tail on ring buffer
  • Non-blocking, try methods provided to enable continuous progress
  • Support for both simple messages and complex messages with nested sequences

#Multiple Usage APIs

Internally there is one layout format for the data however to support all the different uses cases there are 4 different API to access the rings.

  • Low level API for serialized data directly on the ring
  • High level API for field specific access
  • Streaming API using call-backs for each field for dynamic applications.
  • Event Consumer/PRoduceer API for Object mapping

For examples on how these APIs may be used see the projects:

#Usage

To use this in your maven project add the following dependency.

<dependency>
  <groupId>com.ociweb</groupId>
  <artifactId>PronghornPipes</artifactId>
  <version>0.0.1-SNAPSHOT</version>
</dependency> 

Also add this public repository to your pom or settings.

<repository>
  <releases>
    <enabled>false</enabled>
  </releases>
  <snapshots>
    <enabled>true</enabled>
  </snapshots>
  <id>repository-pronghorn.forge.cloudbees.com</id>
  <name>Active Repo for PronghornPipes</name>
  <url>http://repository-pronghorn.forge.cloudbees.com/snapshot/</url>
  <layout>default</layout>
</repository>

Looking for the release jar? This project is under active development.

Please consider getting involved and sponsoring the completion of PronghornPipes

Nathan Tippy, Principal Software Engineer OCI
Twitter: @NathanTippy

com.ociweb
Embedded actor framework for Java

Versions

Version
1.0.34
1.0.33
1.0.32
1.0.31
1.0.30
1.0.29
1.0.28
1.0.27
1.0.26
1.0.25
1.0.24
1.0.23
1.0.22
1.0.21
1.0.20
1.0.19
1.0.18
1.0.17
1.0.16
1.0.15
1.0.14
1.0.13
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1