Message Queue
(RabbitMQ)
Joule Processor
(Golang)
Socket Server
(Crossbar)
In-memory
Database
(Couchbase)
STA
(PHP, MySQL)
(live demo)
(React)
Monitored Services
(Node)
var ServiceInterface = {
initialize: function(config) {
// Should start monitoring the service,
// opening persistent connections if necessary
},
update: function(callback) {
// Should communicate with the service and update the state
},
get: function() {
// Should return the current state of the service
}
};ServiceManager.registerServices([
'couchbase',
'mongo',
'mysql',
'psn',
'rabbitmq',
'crossbar'
]);
app.get('/status', function(request, response) {
response.json(ServiceManager.getStatus());
});{
"crossbar": {
"checked": true,
"online": true,
"connections": 9001,
"process": { ... }
},
"rabbitmq": {
"checked": true,
"online": true,
"queue": { ... }
},
"psn": {
"checked": true,
"online": true,
"instances": [
{
"name": "JP-1",
"healthMonitor": { ... }
},
{ ... }
]
}
}var Home = React.createClass({
// ...
render: function() {
return (
<div className="dashboard">
<div className="details">
<PSNDetails status={this.state.services.psn} />
<SocketServerDetails status={this.state.services.crossbar} />
<RabbitMQDetails status={this.state.services.rabbitmq} />
</div>
<div className="services">
<div className="panel">
<h2>Services</h2>
<ServiceWidget title="MySQL" service={this.state.services.mysql} />
<ServiceWidget title="Mongo" service={this.state.services.mongo} />
<ServiceWidget title="RabbitMQ" service={this.state.services.rabbitmq} />
<ServiceWidget title="Couchbase" service={this.state.services.couchbase} />
<ServiceWidget title="Crossbar" service={this.state.services.crossbar} />
<ServiceWidget title="PSN" service={this.state.services.psn} />
</div>
<RefreshPanel clickHandler={this._triggerRefresh} />
</div>
</div>
);
}
});andrew.jensen@insidesales.com