Transform a mysql into a CEP stream
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
README.md
build.sbt
fabfile.py
gush.config.yml.sample

README.md

Gush

[Build Status]https://travis-ci.org/simao/gush

Gush transforms your mysql database in a stream of data.

Gush connects to a mysql master and generates an streams of events. This stream can be split, merged and transform using the normal akka streams combinators. This way you can analyze your data as a real time event stream. You can then threat your mysql data as queriable real time stream.

Examples

Gush's allows you to write queries like:

    def newBookingCount(): Sink[BinlogEvent, Future[Done]] = {
      val f = InsertEventFlow("bookings")
      val sink = Sink.foreach[BinlogInsertEvent](e  logger.info(s"New ${e.tableName} received"))
          f.toMat(sink)(Keep.right)
    }
  def bookingsWindowAvgRev(): Sink[BinlogEvent, Future[Done]] = {
      WindowedInsertAvg("bookings", "revenue", 10 seconds)(avg  logger.info(s"Average of last hour for bookings.avg is $avg"))
  }

Running

Check the package io.simao.gush_example to see an example on how to use gush.

Unsupported features

  • No support for ON DUPLICATE KEY statements. No plans to support this. Patches welcome!

Contributing

Gush written in Scala and uses Akka Streams.

No pull request is too small, documentation improvements also very welcome!

Author