Setup recommendation for monitoring app

#1

We plan a little monitoring tool here, multiplatform, which runs as an service on those platforms.
These are mostly desktops, but also some servers. The client itself finds out all the stuff it can get and what it cant get and outputs it.

Additional to this client services, we are building a web app also already, to visualize the monitoring and also to setup some parameters and send it to the client services.

The client apps, who do the hardware gathering and some other stuff, are written in NodeJS.

The Web Application, with the Dashboard, the widgets and the logging, is written in Laravel (PHP).

As the clients are built to “run everywhere and always work” (NodeJS code is compiled to executables, so there are no external dependencies), this also includes networks and firewalls - so it had to be a communcation over 80 or 443 to the central linux server. So of course, Websockets came into our minds quite quickly, and Autobahn|JS and Crossbar is the way to go for sure! :slight_smile:

I would use:

Crossbar Router

Autobahn>JS (for the nodejs apps and for the browser)

Minion (https://github.com/Vinelab/minion) to connect to Crossbar

But I need some information:

First, the web application and the crossbar server should run on the same machine, on the same port (HTTPS 443) - I use Apache and I know there is “mod_proxy_wstunnel” - but I am not sure how to configure it. I tested it but didnt work.

(I cant use the other way around, the webserver part of crossbar.io because I need an Apache for my Laravel webapplication)

Also, which is the most performant way to provide connections there.

I have seen a big list of possible ways to connect, but dont know which is the most performant one.

Are there benchmarks for the different settings available?

How to use the realm correctly.

In our hardware gathering tool (the nodejs app) we differentiate between machines and company/domain.

I think if I should seperate the companies already with different realms, which have the same settings, but are seperate.

But against it, is, how to change setting there while having it run.

So maybe one realm and seperate it in my dashboard web app / server / configuration web application.

But how to handle authentification? I want to set it up in the web application, change the token for example or something like that.

Can I access the crossbar server setting and is there a possibility to hot reload the settings?

0 Likes

#2

About the point “Apache and Crossbar on the same port” - when to use the paths in the crossbar configuration and when to use reverse proxy via mod_proxy_wstunnel?

Really hope this mailing list is active because the chat isnt.

0 Likes

#3

Hi Markus,

I would use:
Crossbar Router
Autobahn>JS (for the nodejs apps and for the browser)
Minion (https://github.com/Vinelab/minion) to connect to Crossbar

I don't know about Minion - sure you are aware of Thruway?

https://github.com/voryx/Thruway

Voryx (the guys behind Thruway) have a long track record with Thruway
and have been with WAMP since the very beginning.

But I need some information:
First, the web application and the crossbar server should run on the same
machine, on the same port (HTTPS 443) - I use Apache and *I know there is
"mod_proxy_wstunnel" - but I am not sure how to configure it*. I tested it
but didnt work.
(I cant use the other way around, the webserver part of crossbar.io because
I need an Apache for my Laravel webapplication)

Crossbar.io is able to reverse proxy to a backend Web server:

https://crossbar.io/docs/Reverse-Proxy-Service/

in which case Crossbar.io runs "in front" (eg terminates the TLS), and
reverse proxies to backend Web servers.

And Apache/PHP should work with that (if not, let us know, that's a bug
then!).

(Sidenote: The upcoming version of Crossbar.io will additionally have a
reverse _WebSocket_ proxy.)

Do you want to reverse proxy the complete home path "/" to Apache, and
only need Crossbar.io for WAMP/WebSocket?

Also, which is the most performant way to provide connections there.
I have seen a big list of possible ways to connect, but dont know which is
the most performant one.

Performant for the router (Crossbar.io) or the client? And which clients?

Eg browsers can only talk WebSocket (over TCP/TLS), not RawSocket.

Then, WebSocket compression consumers CPU cycles (both on client and
server), which might make sense when the link is slowish.

*Are there benchmarks for the different settings available?*

no current ones at least

How to use the realm correctly.
In our hardware gathering tool (the nodejs app) we differentiate between
machines and company/domain.
I think if I should seperate the companies already with different realms,
which have the same settings, but are seperate.

yes, this sounds good

I would use a separate realm for each company (tenant), and use a URI
scheme like this:

com.vendor_x.app_y.machine.<machine_id>.on_sensor_1

But against it, is, how to change setting there while having it run.
So maybe one realm and seperate it in my dashboard web app / server /
configuration web application.

But how to handle authentification? I want to set it up in the web

You can run a dynamic authenticator WAMP component that runs on a
special "authenticator" realm (different from the tenant realms), and
still have that authenticator be used on all the tenant realms.

application, change the token for example or something like that.
*Can I access the crossbar server setting and is there a possibility to hot
reload the settings?*

Crossbar.io Fabric allows to modify any configuration part of
Crossbar.ioy dynamically and remotely.

That is, all the features that can be configured via a static node
configuration file can also be modified programmatically, and the API
for doing that ("management API") is of course also WAMP based.

Eg here are some examples of how that looks like:

https://github.com/crossbario/crossbar-fabric-public/tree/master/examples

Cheers,
/Tobias

0 Likes

#4

About the point "Apache and Crossbar on the same port" - when to use the
paths in the crossbar configuration and when to use reverse proxy via
mod_proxy_wstunnel?

I have no active knowledge about Apache, so I can't advise to
mod_proxy_wstunnel.

Crossbar.io has a reverse Web proxy built in

https://crossbar.io/docs/Reverse-Proxy-Service/

and the next release will also have a reverse WebSocket proxy:

https://github.com/crossbario/crossbar-examples/blob/master/wsrproxy/.crossbar/config.json#L56

This can be useful eg to run many NodeREDs behind Crossbar.io, or stuff
like this.

(Of course it works with WAMP/WebSocket too. It should work with any
compliant WebSocket server. maybe we need to add some HTTP header
forwarding magic -- but otherwise, the impl. is ready)

···

Am 29.11.2017 um 17:49 schrieb Markus Majer:

Really hope this mailing list is active because the chat isnt.

0 Likes

#5

First, thanks for the fast and useful answer :slight_smile:

Hi Markus,

I would use:
Crossbar Router

Autobahn>JS (for the nodejs apps and for the browser)

Minion (https://github.com/Vinelab/minion) to connect to Crossbar

I don’t know about Minion - sure you are aware of Thruway?

https://github.com/voryx/Thruway

Yes, and minion uses Thruway for the WAMP part.

But also integrates this into Laravel, and its Provide model.

It has a good focus on Autobahn and Crossbar.io

https://github.com/Vinelab/minion/wiki/Quick-Start-with-Crossbar.io

But I need some information:

First, the web application and the crossbar server should run on the same
machine, on the same port (HTTPS 443) - I use Apache and I know there is
“mod_proxy_wstunnel” - but I am not sure how to configure it
. I tested it
but didnt work.

(I cant use the other way around, the webserver part of crossbar.io because
I need an Apache for my Laravel webapplication)

Crossbar.io is able to reverse proxy to a backend Web server:

https://crossbar.io/docs/Reverse-Proxy-Service/

in which case Crossbar.io runs “in front” (eg terminates the TLS), and

reverse proxies to backend Web servers.

And Apache/PHP should work with that (if not, let us know, that’s a bug

then!).

Sounds promising.

If I really can redirect / (everything) except for the Websocket connections, it sounds good.

Are there any performance issues / slow downs because of proxying?

(Sidenote: The upcoming version of Crossbar.io will additionally have a

reverse WebSocket proxy.)

I think if that Transport above works good, I dont need it.

Do you want to reverse proxy the complete home path “/” to Apache, and

only need Crossbar.io for WAMP/WebSocket?

Yes thats what I would like to do, I thought that would be the unproblematic way in handling a full fleged web application running on the same system on the same domain and port. (443)

Also, which is the most performant way to provide connections there.

I have seen a big list of possible ways to connect, but dont know which is
the most performant one.

Performant for the router (Crossbar.io) or the client? And which clients?

Eg browsers can only talk WebSocket (over TCP/TLS), not RawSocket.

Then, WebSocket compression consumers CPU cycles (both on client and

server), which might make sense when the link is slowish.

My clients are NodeJS and the other one would be Thruway (with Minion on Laravel).

Also for the live data on the dashboards.
The continously arriving websocket data, all the machines / realms who this would subscribe to, while not actively watching it, will be stored in Redis and also checked for problems and there will be for some stuff a remote call, for others a mail or sms or something else.

Crossbar.IO feels so right, using it in a new monitoring solution from scratch, I think it just fits perfectly :slight_smile:

Are there benchmarks for the different settings available?

no current ones at least

How to use the realm correctly.

In our hardware gathering tool (the nodejs app) we differentiate between
machines and company/domain.

I think if I should seperate the companies already with different realms,
which have the same settings, but are seperate.

yes, this sounds good

I would use a separate realm for each company (tenant), and use a URI

scheme like this:

com.vendor_x.app_y.machine.<machine_id>.on_sensor_1

But against it, is, how to change setting there while having it run.

So maybe one realm and seperate it in my dashboard web app / server /
configuration web application.

But how to handle authentification? I want to set it up in the web

You can run a dynamic authenticator WAMP component that runs on a

special “authenticator” realm (different from the tenant realms), and

still have that authenticator be used on all the tenant realms.

I look into that.

application, change the token for example or something like that.

Can I access the crossbar server setting and is there a possibility to hot
reload the settings?

Crossbar.io Fabric allows to modify any configuration part of

Crossbar.ioy dynamically and remotely.

That is, all the features that can be configured via a static node

configuration file can also be modified programmatically, and the API

for doing that (“management API”) is of course also WAMP based.

Eg here are some examples of how that looks like:

https://github.com/crossbario/crossbar-fabric-public/tree/master/examples

Thats the “paid” crossbar.io right? Do you have some pricing information?

What about some hot reload if the config file is changed? is that possible?

···

Am Mittwoch, 29. November 2017 20:29:25 UTC+1 schrieb Tobias Oberstein:

Cheers,

/Tobias

0 Likes

#6

I did a configuration, and now it says:

Cannot listen on transport endpoint: [Failure instance: Traceback: <class ‘socket.error’>: [Errno 98] Address already in use

So back at my original problem, I want my Apache Server be available as usual, but also get my Websockets on the same port on the same subdomain

···

Am Mittwoch, 29. November 2017 20:34:39 UTC+1 schrieb Tobias Oberstein:

Am 29.11.2017 um 17:49 schrieb Markus Majer:

About the point “Apache and Crossbar on the same port” - when to use the
paths in the crossbar configuration and when to use reverse proxy via
mod_proxy_wstunnel?

I have no active knowledge about Apache, so I can’t advise to

mod_proxy_wstunnel.

Crossbar.io has a reverse Web proxy built in

https://crossbar.io/docs/Reverse-Proxy-Service/

and the next release will also have a reverse WebSocket proxy:

https://github.com/crossbario/crossbar-examples/blob/master/wsrproxy/.crossbar/config.json#L56

0 Likes