New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

saseo

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saseo

  • 0.8.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Saseo - 사서

RabbitMQ based PaperTrail replacement

Build Status Dependency Status Code Climate Test Coverage Gem Version License

Overview

Saseo has two primary responsibilities:

  1. Publishing all changes from a database
  2. Persisting the changes to a separate data store

Publishing

Saseo uses triggers to temporarily store changes to a local staging table. Saseo provides a stateless executable, saseo_publisher, that reads the records from that table, publishes them to a RabbitMQ Headers Exchange, then deletes them from the local staging table.

Because the messages are published in this way, the data is available to ANY AND ALL clients that can connect to RabbitMQ.

Published Message Format
AttributeDetailsHeader*Payload**
table_namename of the table the record is fromX
actionINSERT, UPDATE, or DELETEX
whodunnitthe user or other entity responsible for the changeX
item_idvalue, if any, of the id field from the recordX
item_uuidvalue, if any, of the id field from the recordX
transaction_idtransaction_id from the source DBX
localeI18n.locale of the publisherX
databasesource database name for the recordX
schemasource schema name for the recordX
iduuid of the saseo versionX
old_dataJSON representation of the record before the changeX
new_dataJSON representation of the record after the changeX
action_timestamptimestamp from the transactionX

* Header: attribute that can be subscribed to
** Payload: attribute that can NOT be subscribed to, only accessible once the message is received

Persistence

Saseo provides a stateless executable, saseo_consumer, that subscribes to RabbitMQ to pick up the canges published by saseo_publisher and persists them to a database specified by config. Saseo currently creates one table for every tracked table.

Saseo table structure
ColumnTypeModifiers
iduuidnot null default uuid_generate_v4()
transaction_idbigintnot null
item_idbigint
item_uuiduuid
actioncharacter varyingnot null
action_timestamptimestamp with time zonenot null
whodunnitcharacter varyingnot null
changesetjsonbnot null
new_datajsonb

Sample Setup

Installation

Add this line to your application's Gemfile:

gem 'saseo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install saseo

Usage

TODO: Write usage instructions here

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/avantcredit/saseo.

FAQs

Package last updated on 11 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc