Skip to main content

A FireCloud database extension

Project description

Hound

A FireCloud database extension

Purpose

This repository contains the source code for the Hound database extension system. This system aims to provide a low-latency system for logging changes to a FireCloud workspace.

This allows for attribute provenance to be reconstructed by querying the database history, and for external tools to log changes as well.

Minimum Viable Product

  1. Hound should be able to retain a log of when an entity/workspace attribute was changed, and why
  2. Hound should be able to respond to provenance queries by checking above log entries
  3. Hound should support logging arbitrary data (such as "a lapdog submission was run", etc)
  4. Hound should be external to lapdog/dalmatain

Usage

  1. Users with hound-enabled software automatically generate logs as they continue to do their work
  2. Hound can recreate attribute value histories from logs to produce provenance

Format

Hound logs data in a bucket folder. Entries are organized based on the list below. snowflake refers to an auto-generated ID from Hound's snowflake implementation. Snowflakes are almost guaranteed to be unique (see below)

  • hound/: Root folder for hound data in bucket
    • (samples|pairs|participants|sets)/: Folder for entity-metadata change logs
      • (entity-id)/: Folder for entity data
        • (attribute)/: Folder for attribute data on each entity
          • (snowflake): Serial numbered files containing update objects
    • workspace/: Folder for workspace-level metadata
      • (attribute)/: Folder for attribute data on the workspace
        • (snowflake): Serial numbered files containing update objects
    • logs/: Folder for event-logs
      • (job|upload|meta|other)/: Folder for specific event entries
        • (snowflake): Files containing log entries

Snowflake spec

Encode 22-byte snowflake into 44 byte (hex encoded) object name

  • 64-bit (8 byte) unix timestamp (8 byte floating-point number)
  • 64-bit (8 byte) machine id (based on nodename) Only 6 bytes used
  • 16-bit (2 byte) random client id (generated during init of Snowflake object)
  • 16-bit (2 byte) sequence identifier (starts at 0 per client, increments from there)
  • 8-bit (1 byte) Zero field (reserved)
  • 8-bit (1 byte) checksum field (sum of remaining fields)

Uniqueness

Snowflakes are structured to almost guarantee uniqueness. If two clients from the same machine (or from machines with identical MAC addresses) create a snowflake at exactly the same time (within their system clocks' precisions) AND the clients have generated the same number of snowflakes so far (clients have the same sequence id), there is a 1/65536 chance that the snowflakes will collide (based on client id).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hound-0.1.5.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

hound-0.1.5-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file hound-0.1.5.tar.gz.

File metadata

  • Download URL: hound-0.1.5.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for hound-0.1.5.tar.gz
Algorithm Hash digest
SHA256 23b1c80fdfb60ecba3dde9b2be299d808e0c7120de4237e639ded7c052412e19
MD5 aeefe6e9cab4e7f9e3fba0ac82ed5c81
BLAKE2b-256 5211746b72b030d20ee59f359d98659a0e6fda27119991a77ea489726e05e0dc

See more details on using hashes here.

File details

Details for the file hound-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: hound-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for hound-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d1b12bcd410eed6ea97091eb4738ebf0242c2aaefbb8a777acca6f16bd810221
MD5 ac94f19434d54ed6a34a2524c70f2a4b
BLAKE2b-256 0c15b772dafe52f8de6fb5278989440d3d56ceadb5c044c17b78df5d4375c7b1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page