Skip to content
This repository has been archived by the owner on Feb 4, 2018. It is now read-only.

BinderD and auto-updating logs support #19

Merged
merged 8 commits into from
Sep 16, 2015
Merged

BinderD and auto-updating logs support #19

merged 8 commits into from
Sep 16, 2015

Conversation

andrewosh
Copy link
Member

This PR adds BinderD, a background process running on the API server that makes it easy to create/manage long-running processes for log support, cluster monitoring, inactive app deletion, etc. All BinderD modules (BinderDModule base class) can receive messages over 0MQ using the BinderClient class. A BinderClient is passed a module name as a parameter, and exposes a simple interface on top of 0MQ's send and recv messages.

Currently, the only BinderD modules available are the log_reader and the log_writer modules.

  • log_reader responds to log queries (type get), and supports the optional since parameter for fetching all logs matching a filter generated since the specified timestamps.
  • log_writer takes messages (type log), each containing required tags and levels, and:
    1. records those messages in the appropriate log file
    2. publishes those messages (using 0MQ's Pub/Sub features) with an app name (root if the name's excluded) as the topic.

Additionally, this PR includes a new WebSocket endpoint, which queries the log_reader module and subscribes to all messages from the log_writer's subscriber socket.

All print statements in Binder have been replaced by the appropriate log_* messages in log.py, which send messages to the log_writer module.

andrewosh added a commit that referenced this pull request Sep 16, 2015
BinderD and auto-updating logs support
@andrewosh andrewosh merged commit 9178424 into master Sep 16, 2015
@rgbkrk rgbkrk deleted the binderd branch October 18, 2015 08:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant