Skip to content

adlenafane/Pulsar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pulsar

alt tag

The Pulsar project aim to visually render the mood, trend activity of an Application over time. Demo at http://corsair.space (Mood of itself :))

Prerequisite:

Installation Backend

Get the repo build, it's ready :)

go get github.com/samuelramond/Pulsar
go build github.com/samuelramond/Pulsar
./Pulsar

Installation Frontend

Example nginx conf file to serve frontend :)

server {
	listen 80 default;
	listen [::]:80 default;

	root /var/www/pulsar/src/github.com/samuelramond/Pulsar/frontend;

	index index.html index.htm;

	server_name _;

	location / {
		try_files $uri $uri/ =404;
	}
}

You can now connect to your front at http://your-server to change galaxy you can use http://your-server?token=<APPLICATION_TOKEN>

Configuration File:

  • Todo load the whole config :)

Usage Backend:

APPLICATION_TOKEN: Autogenerated token for your application so your activity is visible in the right place

CLIENT_ID: Unique identifier for your client (nb: you can send a hash of your id as long as it is unique per client)

GROUP_ID: *Optionnal, group your client belongs to. This is only to visually draw Nebula of users

  • Emit pulse:
curl '127.0.0.1:4000/pulse?token=<APPLICATION_TOKEN>&client_id=<CLIENT_ID>&group_id=<GROUP_ID>'
  • Get Statistics
curl '127.0.0.1:4000/stats/loads?token=<APPLICATION_TOKEN>'

curl '127.0.0.1:4000/stats?token=<APPLICATION_TOKEN>&groupBy=<AGGREGATE_TIME>&past=<START_TIME>'

AGGREGATE_TIME: On which range aggregation shall be displayed (ex: 20min / 1h) START_TIME: range will be taken on now() - START_TIME (ex: 1d, 12h)

Nb: Be carefull when choosing your representation you may experience trouble if querying too many data (ex: past=10d & groupBy=1s --> 10243600 point in your graph)

  • Receive pulse notification (websocket)
var sock = new WebSocket("ws://127.0.0.1:4000/sock");
sock.send('{"action":"joingalaxy","data":"33999f3f30f9"}');

On first connection you must send the Galaxy you want to join using your APPLICATION_TOKEN.

Philosophy:

GalaxyCluster {
	[]Galaxy {
		[]Nebula {
			[]Pulsar
		}
	}
}

Pulsar: Single Client

Nebula: Client Organization/Group

Galaxy: Application

Images:

Hud time serie info selector: alt tag

View of a galaxy (RED dot is you) alt tag

Author:

Samuel RAMOND
@erazor42

About

Mood of your platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published