dboard 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,57 @@
1
+ A dashboard framework.
2
+
3
+ It handles collecting data from user defined sources (simple ruby classes) and provides a simple API to poll for updates. See the [example app](https://github.com/joakimk/dboard_example) for information on how to use it.
4
+
5
+ It's stable and has been in use for quite a while.
6
+
7
+ Dboard is two parts:
8
+
9
+ * The collection process you run on your server. It polls sources for data and sends it to your dashboard web server.
10
+ * The API which combined with for example sinatra (and memcached) becomes a dashboard web server.
11
+
12
+ Things dboard do for you:
13
+
14
+ * Calls your classes for data as often as you have specified.
15
+ * Sends the data to the dashboard web app.
16
+ * Receives and stores the data in the dashboard web app.
17
+ * Provides an API to get data to display on the dashboard.
18
+ * Keeps the latest data in memcache so that all data is available when you visit the databoard, even data from slow or rarely updated sources (like external APIs).
19
+ * Provides a javascript client that knows how to talk to the API (for now it's only included in the [example app](https://github.com/joakimk/dboard_example))
20
+ * Only calls your javascript widgets when there is new data.
21
+
22
+ Data flow:
23
+
24
+ +-----------------+ +--------------------+
25
+ | | | |
26
+ | Collector | Pushes data | Dashboard web |
27
+ | +--------------+ server +----+
28
+ | | | | |
29
+ +-----------------+ +--------------------+ | Polls for updates
30
+ | | |
31
+ | | |
32
+ +--+--+ +--+--+ +--------------+-------------+
33
+ | | | | | |
34
+ | | | | | Dashboard page |
35
+ +-----+ +-----+ | |
36
+ Source A Source B | |
37
+ | See the example app. |
38
+ | |
39
+ | |
40
+ | |
41
+ | |
42
+ | |
43
+ | |
44
+ | |
45
+ | |
46
+ | |
47
+ +----------------------------+
48
+
49
+ The ASCII drawing above was created using [http://www.asciiflow.com/](http://www.asciiflow.com/).
50
+
51
+ Todo:
52
+
53
+ * Include the client side dashboard script (see the [example app](https://github.com/joakimk/dboard_example) for now).
54
+ * Provide additional tools for creating dashboards (layout css, graphical widgets, etc). Probably as another gem.
55
+ * Tools for deployment (if it can be made generic enough), otherwise a general guide.
56
+ * Make the example app a bit more realistic. Dev-mode tools (foreman, guard, auto-reload-sources), use the collector, layout, more sources, etc.
57
+ * If someone wants to add it: support for pushing data to the client using web sockets.
data/lib/publisher.rb CHANGED
@@ -3,7 +3,7 @@ require 'json'
3
3
  module Dboard
4
4
  class Publisher
5
5
  def self.publish(source, data)
6
- Api::Client.post("/sources/#{source}", :body => { :data => data.to_json })
6
+ Api::Client.post("/sources/#{source}", :body => { :data => data.to_json }, :timeout => 10000)
7
7
  rescue SocketError => ex
8
8
  puts "SocketError: #{ex.message}"
9
9
  end
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dboard
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -3,7 +3,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
3
3
  describe "Publisher", "publish" do
4
4
 
5
5
  it "should send data to the dashboard server" do
6
- Dboard::Api::Client.should_receive(:post).with("/sources/new_relic", :body => { :data => { :db => "80%" }.to_json })
6
+ Dboard::Api::Client.should_receive(:post).with("/sources/new_relic", :body => { :data => { :db => "80%" }.to_json }, :timeout => 10000)
7
7
  Dboard::Publisher.publish(:new_relic, { :db => "80%" })
8
8
  end
9
9
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dboard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Joakim Kolsj\xC3\xB6"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-25 00:00:00 +02:00
18
+ date: 2012-02-14 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -192,7 +192,7 @@ files:
192
192
  - Gemfile
193
193
  - Guardfile
194
194
  - LICENCE
195
- - README
195
+ - README.md
196
196
  - Rakefile
197
197
  - dboard.gemspec
198
198
  - lib/api.rb
data/README DELETED
File without changes