Event Aggregation And Notification.
--------------------
Event ---> (HTTP) ---> | |
Event ---> (Queue) --> | RoccaForte |----> Aggregated notification
Event ---> (Other) --> | (Incoming) |
| |
--------------------
Events that are of the same type are aggregated by the time received, so that only one notification in, for example, every 5 minutes, no matter how many events of the same type are received during that time frame.
Notifications bundle multiple events, and carry only enough information for the clients to query back to RoccaForte what exactly the events were.
Destination is anywhere we can deliver our notifications to. The most basic type of the destination is an HTTP endpoint, but could be anything, really.
Handles incoming events. Aggregates events, and stores them
Given delivery rules, enqueues notification tasks.
Receives notification tasks from queue, and delivers notifications to destinations.
import(
"github.com/lestrrat/roccaforte/event"
"github.com/lestrrat/roccaforte/client/http"
)
func main() {
cl := http.New("http://roccaforte:8080/enqueue")
ev := event.New()
if err := cl.Enqueue(ev); err != nil {
...
}
}