Giter VIP home page Giter VIP logo

rebouncer's Issues

Remove unnecessary NiceEvent wrapping

There is no need to wrap our original events into NiceEvents just to add fields that aren't really necessary.

Let's instead have two generic types: dirty event and nice event.

or Naughty and Nice.

this will obviate the need for user-defined functions to traffic in types that need not know anything about.

plug-in architecture

a plugin architecture would be smart. Inotify would then be a plug-in. I could try to think of other plug-ins for other use-cases

switch to inotify

the platform-independant events are too lossy. we need more detail. go all in on inotify

add gRPC interface

to make it more generic and composable across languages and systems, let's add gRPC.

Is so, we should think about conforming to the CloudEvent spec

improve docs

docs: improve

we need far better documentation, plus examples, plus the removal of exported members no longer needed

Remove Deadlock

there is a deadlock arising from bad design.

IncomingEvents should not be buffered. Rather, it should accept one event at a time, and process it fully before accepting another.

We also need a LifeCycleState property, or a mutex, or another channel to handle the hand-off between Reducer and Quantizer

add cancelability

we need to handle situations like the root directory being moved and other ways to cancel the incoming event stream, and to cascade that cancellation along the path.

other lifecycle hooks may be important. For example, special events like NiceEvent{Topic: "rebouncer/lifecycle/purge"} could trigger an Emit() or delete the batch without triggering a Emit().

we probably want the context package for this. It seems to make sense to me that an Event should have access to the context of it's parent.

simplify

fields such as bootID are not required now, let's remove everything non-essential

Docker in workflow

A Dockerfile and related docs should be set up. Docker can be used to:

  • run tests
  • make builds targeting different environments
  • run vuln checks
  • proof of concept for a live-reloaded that can work in docker world by issuing ad-hoc docker exec or docker cp commands in response to rebouncer events. it possibly could even be turned into to Docker Desktop extension

more standard event format

I thought of using the CloudEvent standard, but it's too big and complex. Instead, let's use this format: https://github.com/mustafaturan/bus#processing-events

type Event struct {
    ID         string      // identifier
    TxID       string      // transaction identifier
    Topic      string      // topic name
    Source     string      // source of the event
    OccurredAt time.Time   // creation time in nanoseconds
    Data       interface{} // actual event data
}

The TxID can be the cookie id.

quantizer

create a default Batcher function that simply creates buckets based on time (ex: 1 second).

  • call it Quantize or quantize
  • create an interface called Batcher that Quantize can implement
  • set the state for passing in funcs (like Batcher) during config phase

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.