Supported IO Modules

Supported IO Modules #

Proxima decouples storage configuration from storage drivers via ServiceLoader-discovered DataAccessorFactory plugins. To enable a storage backend, add its Maven/Gradle dependency to your application classpath and configure an attribute family with the matching URI scheme.

Overview Matrix #

BackendGradle/Maven ArtifactURI Scheme(s)Commit LogRandom AccessBatch ReadCached ViewWriter
Apache Kafkaproxima-direct-io-kafkakafka://Yes——YesOnline
Google Cloud Pub/Subproxima-direct-io-pubsubgps://, gps-bulk://Yes———Online / Bulk
Apache Cassandraproxima-direct-io-cassandracassandra://—YesYes (snapshot)—Online
Apache HBaseproxima-direct-io-hbasehbase://—YesYes (snapshot)—Online
Google Cloud Bigtableproxima-direct-io-bigtablebigtable://—YesYes (snapshot)—Online
Google Cloud Storageproxima-direct-io-gcloud-storagegs://——Yes (updates)—Bulk
Amazon S3 / MinIOproxima-direct-io-s3s3://——Yes (updates)—Bulk
Hadoop / HDFSproxima-direct-io-hadoop / proxima-direct-io-hdfshdfs://, hadoop:<uri>——Yes (updates)—Bulk
Elasticsearchproxima-direct-io-elasticsearchelastic://, elasticsearch://————Online (write-only)
JDBC (SQL)proxima-direct-io-jdbcjdbc://<jdbc-url>—YesYes—Online
HTTP / WebSocket / OpenTSDBproxima-direct-io-httphttp(s)://, ws(s)://, opentsdb://ws(s)———Online (http(s), opentsdb)
Stdout (Debug)proxima-direct-corestdout://————Online (write-only)
In-Memory (Testing)proxima-direct-core (tests classifier)inmem://, inmem-bulk://YesYesYesYesOnline / Bulk

Streaming Commit Logs #

Apache Kafka #

  • Module: cz.o2.proxima:proxima-direct-io-kafka
  • URI Format:
    • Single topic: kafka://<broker1:9092,broker2:9092>/<topic-name>
    • Regex subscription (must be read-only): kafka://<brokers>/?topicPattern=<regex>
  • Capabilities: commit-log, state-commit-log, cached-view (on log-compacted topics), OnlineAttributeWriter.

Key Configuration Options:

PropertyDefaultDescription
kafka.*—Passed directly to Kafka Producer/Consumer Properties (e.g., kafka.security.protocol, kafka.compression.type, kafka.acks).
partitionerKeyPartitionerClass implementing Partitioner.
serializer-classKafkaStreamElementSerializerCustom ElementSerializer for non-Proxima Kafka topics (built-ins include ValueAsBytesSerializer and ValueAsStringSerializer).
poll.interval100Consumer poll() interval in ms.
bytes-per-sec-maxLong.MAX_VALUEOptional consumer throughput throttle in bytes/sec.
commit.auto-interval-msLong.MAX_VALUEPeriodic auto-commit interval in ms.
assignment-timeout-ms10000Timeout waiting for consumer group partition assignment.
watermark.*—Custom watermark estimator and idle policy configuration.
event-commit-log {
  entity: event
  attributes: [ "*" ]
  storage: "kafka://kafka1:9092,kafka2:9092/proxima_events"
  type: primary
  access: commit-log
  kafka.security.protocol: "PLAINTEXT"
  kafka.acks: "all"
  poll.interval: 100
}

Google Cloud Pub/Sub #

  • Module: cz.o2.proxima:proxima-direct-io-pubsub (and native Beam connector cz.o2.proxima:proxima-beam-io-pubsub)
  • URI Format:
    • Standard online commit log: gps://<gcp-project-id>/<topic-name>
    • Bulk batched mode: gps-bulk://<gcp-project-id>/<topic-name>
  • Capabilities: commit-log, OnlineAttributeWriter (gps://), BulkAttributeWriter (gps-bulk://).
  • Limitations: Pub/Sub does not support seeking to arbitrary historical offsets or stopAtCurrent bounded consumption.

Key Configuration Options:

PropertyDefaultDescription
pubsub.subscription.auto-createtrueAutomatically create a Pub/Sub subscription for each observer name.
pubsub.subscription.ack-deadline600Subscription ack deadline in seconds.
pubsub.deadline-max-ms600000Maximum consumer ack extension deadline in ms.
event-pubsub-log {
  entity: event
  attributes: [ "*" ]
  storage: "gps://my-gcp-project/proxima-events"
  type: primary
  access: commit-log
  pubsub {
    subscription {
      auto-create = true
      ack-deadline = 600
    }
    deadline-max-ms = 60000
  }
}

Random-Access & Wide-Column Stores #

Apache Cassandra #

  • Module: cz.o2.proxima:proxima-direct-io-cassandra
  • URI Format: cassandra://<seed1:9042,seed2:9042>/<keyspace>.<table>?primary=<pkCol>[&secondary=<ckCol>&data=<valCol>&reversed=true]
  • Capabilities: random-access, batch-snapshot, list-primary-key, OnlineAttributeWriter.

Key Configuration Options:

PropertyDefaultDescription
cqlFactoryDefaultCqlFactoryCustom CqlFactory mapping StreamElements to CQL statements.
converterStringConverter.getDefault()StringConverter converting wildcard suffixes to/from native CQL clustering column types (e.g., DateToLongConverter).
consistency-levelQUORUMCassandra ConsistencyLevel for reads and writes.
datacenterdatacenter1Local datacenter name for the DataStax 4.x driver.
scanParallelismmax(2, cores)Parallel token-range splits for batch-snapshot scans (must be >= 2).
username / password—Optional Cassandra credentials.
user-random-access {
  entity: user
  attributes: [ "details", "preferences" ]
  storage: "cassandra://cassandra:9042/proxima.users?primary=user"
  type: replica
  access: [ random-access, batch-snapshot ]
  consistency-level: LOCAL_QUORUM
  datacenter: dc1
}

Apache HBase #

  • Module: cz.o2.proxima:proxima-direct-io-hbase
  • URI Format: hbase://<zookeeper-quorum>/<table>?family=<column-family>[&v=2]
  • Capabilities: random-access, batch-snapshot, list-primary-key, OnlineAttributeWriter.
  • Serialization Version (v):
    • v=1 (default): Stores raw attribute bytes directly in the HBase cell.
    • v=2: Wraps cell data in a Protobuf envelope preserving metadata such as sequentialId. v=2 is required when using ACID transactions on HBase.
user-event-history {
  entity: user
  attributes: [ "event.*" ]
  storage: "hbase://zk1:2181,zk2:2181/user_events?family=u&v=2"
  type: replica
  access: [ random-access, list-primary-key, batch-snapshot ]
}

Google Cloud Bigtable #

  • Module: cz.o2.proxima:proxima-direct-io-bigtable
  • URI Format: bigtable://<project-id>:<instance-id>/<table>?family=<column-family>[&v=2]
  • Capabilities: Uses HBase 2.x Bigtable client bindings; supports random-access, batch-snapshot, list-primary-key, OnlineAttributeWriter, and ?v=2 for ACID transactions.
user-bigtable {
  entity: user
  attributes: [ "*" ]
  storage: "bigtable://my-gcp-project:my-bt-instance/users?family=cf&v=2"
  type: replica
  access: [ random-access, batch-snapshot ]
}

JDBC (Relational Databases) #

  • Module: cz.o2.proxima:proxima-direct-io-jdbc
  • URI Format: jdbc://<standard-jdbc-url> (Proxima strips the leading jdbc:// prefix before handing the URL to HikariCP, e.g., jdbc://jdbc:postgresql://localhost:5432/mydb).
  • Capabilities: random-access, batch-snapshot, OnlineAttributeWriter.

Required & Optional Configuration:

PropertyRequiredDescription
sql.query-factoryYesImplementation of SqlStatementFactory (built-in: RowAsJsonLogReaderStatementFactory for reading rows as JSON).
sql.converterYesImplementation of Converter (built-in: RowAsJsonConverter).
sql.driver-class-nameOptionalJDBC driver class name.
sql.username / sql.passwordOptionalDatabase credentials.

Batch & Blob File Stores #

GCS, S3, and Hadoop/HDFS share the proxima-direct-io-bulkfs framework, which buffers incoming updates by event-time window and writes immutable files in configurable formats (binary, json, or parquet).

Bulk File Formats & Parquet #

Configure format (or hadoop.format for Hadoop/HDFS) to select how StreamElements are encoded in batch files:

Format ValueDescriptionExtra Module Required
binary (default)Proxima Protobuf-based binary blob format (BinaryBlobFormat). Supports gzip: true.Built into proxima-direct-io-bulkfs
jsonNewline-delimited JSON using each attribute’s asJsonValue / fromJsonValue. Supports gzip: true.Built into proxima-direct-io-bulkfs
parquetApache Parquet columnar files (ParquetFileFormat) storing key, uuid, attribute, attribute_prefix, timestamp, operation, plus typed value columns derived from SchemaDescriptors.cz.o2.proxima:proxima-direct-io-bulkfs-parquet
<Custom FQCN>Any custom class implementing cz.o2.proxima.direct.io.bulkfs.FileFormat.User module

Parquet-specific properties: parquet.compression, parquet.page.size (default 8 MiB), parquet.values.name.prefix (avoids column name collisions with Proxima metadata columns).

Google Cloud Storage (GCS) #

  • Module: cz.o2.proxima:proxima-direct-io-gcloud-storage
  • URI Format: gs://<bucket-name>/<prefix-path>
  • Capabilities: batch-updates, BulkAttributeWriter.

Key Configuration Options: format, gzip, log-roll-interval (default 3600000 ms), allowed-lateness-ms (default 300000 ms), partition.size (default 100 MiB), partition.max-blobs, partition.max-time-span-ms, storage-class (default STANDARD), tmp.dir, initial-retry-delay-ms, max-retry-delay-ms.

event-gcs-archive {
  entity: event
  attributes: [ "*" ]
  storage: "gs://my-datalake-bucket/proxima/events"
  type: replica
  access: batch-updates
  format: parquet
  log-roll-interval: 3600000
  allowed-lateness-ms: 300000
  storage-class: NEARLINE
}

Amazon S3 / MinIO #

  • Module: cz.o2.proxima:proxima-direct-io-s3
  • URI Format: s3://<bucket-name>/<prefix-path>
  • Capabilities: batch-updates, BulkAttributeWriter.
  • Key Configuration Options: All shared blob options above (format, gzip, log-roll-interval, allowed-lateness-ms, partition.*, tmp.dir), plus S3 client settings: access-key, secret-key, region, endpoint, signing-region, path-style-access (set true for MinIO), ssl-enabled, max-connections, connection-timeout-ms.
event-s3-archive {
  entity: event
  attributes: [ "*" ]
  storage: "s3://my-bucket/proxima/events"
  type: replica
  access: batch-updates
  format: binary
  gzip: true
  endpoint: "http://minio:9000"
  path-style-access: true
  signing-region: "us-east-1"
}

Apache Hadoop / HDFS #

  • Module: cz.o2.proxima:proxima-direct-io-hadoop (or cz.o2.proxima:proxima-direct-io-hdfs convenience wrapper)
  • URI Format:
    • HDFS: hdfs://<namenode-authority>/<path>
    • Any Hadoop FileSystem (including local disk): hadoop:<target-fs-uri> (for example, hadoop:file:///var/data/proxima/events)
  • Capabilities: batch-updates, BulkAttributeWriter.
  • Key Configuration Options: hadoop.log-roll-interval (default 1 hour), hadoop.format (binary, json, parquet), hadoop.gzip, hadoop.process-size.min (default 100 MiB), hadoop.allowed-lateness, hadoop.tmp.fs.

Export Sinks, HTTP & Debug Storages #

Elasticsearch #

  • Module: cz.o2.proxima:proxima-direct-io-elasticsearch
  • URI Format: elasticsearch://<host>:<port>/<index-name> or elastic://<host>:<port>/<index-name>
  • Capabilities: Write-only (write-only, OnlineAttributeWriter with internal bulk batching). Ideal as a replicated search index populated by ReplicationController.
  • Key Configuration Options (prefixed with elasticsearch.): scheme (http/https), batch-size (default 100), bulk-size-mb (default 10), flush-interval-ms, concurrent-batch-requests, document-formatter (DocumentFormatter class), connect-timeout-ms, socket-timeout-ms, keystore-path, keystore-password, keystore-type, truststore-path, truststore-password.

HTTP, WebSocket & OpenTSDB #

  • Module: cz.o2.proxima:proxima-direct-io-http
  • URI Schemes:
    • http:// / https:// — write-only HTTP push via HttpWriter (customize request formatting via ConnFactory).
    • ws:// / wss:// — read-only WebSocket streaming source via WebsocketReader (commit-log).
    • opentsdb:// — write-only OpenTSDB metrics sink via OpenTsdbWriter.

Testing & Debugging Storages #

  • inmem:// and inmem-bulk:// (included in cz.o2.proxima:proxima-direct-core test JAR, classifier tests): Full in-memory implementation of commit log, random access, cached view, and batch readers/writers. Supports num-partitions config. Essential for fast unit and end-to-end tests without external infrastructure!
  • stdout:// (built into cz.o2.proxima:proxima-direct-core): Write-only sink that prints incoming writes to standard output for local debugging.

Implementing a Custom IO Module #

To integrate a custom storage backend with DirectDataOperator:

  1. Implement DataAccessorFactory and annotate it with @AutoService(DataAccessorFactory.class) (or register it in META-INF/services/cz.o2.proxima.direct.core.DataAccessorFactory).
  2. Return Accept.ACCEPT in accepts(URI) for your custom URI scheme.
  3. Return a DataAccessor implementing whichever accessors your backend supports (getWriter, getCommitLogReader, getRandomAccessReader, getBatchLogReader, getCachedView).
@AutoService(DataAccessorFactory.class)
public class MyStorageFactory implements DataAccessorFactory {
  private static final long serialVersionUID = 1L;

  @Override
  public Accept accepts(URI uri) {
    return "mystore".equals(uri.getScheme()) ? Accept.ACCEPT : Accept.REJECT;
  }

  @Override
  public DataAccessor createAccessor(
      DirectDataOperator operator, AttributeFamilyDescriptor family) {
    return new MyDataAccessor(family.getEntity(), family.getStorageUri(), family.getCfg());
  }
}