World: r3wp
[Core] Discuss core issues
older newer | first last |
Graham 26-Mar-2010 [16123] | I can monitor some by tcp .. .but how can I use udp to monitor the others? |
Steeve 26-Mar-2010 [16124] | the others have some loop and wait process i guess, just insert a wait on an udp port as well |
Graham 26-Mar-2010 [16125] | So, if it is doing stuff .. it will miss the udp ping ? |
Steeve 26-Mar-2010 [16126x2] | no, if the monitor accept some lantency; For example if a process is not responding after few pings. |
But in the case of huge process, the client process should send himself a ping to the monitor to advert is doing stuffs (at some points of the code) | |
Graham 26-Mar-2010 [16128] | like a log file |
Steeve 26-Mar-2010 [16129] | eh ? |
Graham 26-Mar-2010 [16130x2] | if you write to a log file, then that's like a ping to a monitor |
But actually the monitor is a user app that they run from their desktop .. so it can't accept pings from the process. | |
Steeve 26-Mar-2010 [16132x2] | but a port dialing is more efficient and has less overhead |
why it can't ? | |
Graham 26-Mar-2010 [16134] | how does it know where the user app is? |
Steeve 26-Mar-2010 [16135x2] | Simple. Each time a targetted process start,k it send its id to the monitor. (hey ! Mr Monitor i'm here and my name is "toto") |
it's a standard client/server exchange, each client has to establish a connection with the server. | |
Graham 26-Mar-2010 [16137] | So, I need a central server as well... |
Steeve 26-Mar-2010 [16138] | It's the monito actually. You have one monitor (the server) for several processes (the clients) |
Graham 26-Mar-2010 [16139] | I guess it's easier to do it that way then have the user interrogate all the processes |
Steeve 26-Mar-2010 [16140] | the monitor open a tcp/udp port and wait for connections. |
BrianH 26-Mar-2010 [16141] | The monitor could be headless and run as a service, with a separate GUI process that runs in user space. |
Graham 26-Mar-2010 [16142] | To run a rebol app as a service it has to be guiless |
Steeve 26-Mar-2010 [16143x3] | it's not obligatory a service. When a client process start it try |
it tries to open a connection with the monitor, it he connection fail, he launch himself the monitor, wait few seconds and retry to connect. | |
it he = if the | |
BrianH 26-Mar-2010 [16146x2] | Right. A lot of software does the split process thing nowadays, sometimes with the GUI running in the tray (or whatever the OS version if that is). |
if -> of | |
Graham 26-Mar-2010 [16148] | So, how does that work? the core service launches a gui app that sits in the tray? |
Steeve 26-Mar-2010 [16149x2] | the monitor don't necesseary have the need of a gui |
the GUI could be another client process | |
Graham 26-Mar-2010 [16151] | No, the monitor doesn't need a gui |
BrianH 26-Mar-2010 [16152] | That usually works by having the core service run on its own, the the tray app starting at user login, or on demand. |
Graham 26-Mar-2010 [16153] | and the gui app communicates by tc to the service? |
BrianH 26-Mar-2010 [16154] | Yup, or whatever other interprocess communication model you prefer (DBUS?) |
Graham 26-Mar-2010 [16155x2] | so need some type of encrypted tcp communications ... |
Just asking as I need to scale my apps as I get more and more users | |
BrianH 26-Mar-2010 [16157] | Has anyone made a /View tray app that has no default window other than the tray app, and maybe a options dialog? |
Graham 26-Mar-2010 [16158] | Need to get rid of all the GUIs .. |
Steeve 26-Mar-2010 [16159] | why that ? the monitor run on the same computer than the serices no ? |
Graham 26-Mar-2010 [16160x2] | You can start a view app in the tray ... |
No, the monitor may not be running on the same computer | |
Steeve 26-Mar-2010 [16162] | you want monitor the services on a local network ? |
BrianH 26-Mar-2010 [16163] | It only needs to be encrypted if you are communicating between computers. It's much harder to break into localhost communication (afaik). |
Graham 26-Mar-2010 [16164] | Yes monitor services on a number of servers |
BrianH 26-Mar-2010 [16165] | Graham, it might be a good idea to have the monitor service on the same system as the processes it is monitoring, and then an overall monitoring interface that collects the info from the monitoring services on various computers. |
Graham 26-Mar-2010 [16166] | Well, I hope so .. .currently I only have one server running ... but got to make it scaleable! |
Steeve 26-Mar-2010 [16167] | hum ok, but if you want the monitor to be able to launch/kill proccesses, you'll need of a monitor on each server + a CENTRAL MONITOR to deals with all the monitors |
BrianH 26-Mar-2010 [16168] | Right, Steeve, that's what I was saying (not as well). |
Graham 26-Mar-2010 [16169x2] | So, the central monitor collates data from all the monitoring stations |
so when a serice starts up, it registers with the local monitor, and somehow the PID is collected in case the monitor needs to kill it? | |
BrianH 26-Mar-2010 [16171] | Yup. And if the monitoring stations have local storage for their data, the central monitor could poll them instead of the other way around. That way you can restart the central monitor. |
Graham 26-Mar-2010 [16172] | Ok, has anyone written such monitors in Rebol yet ? :) |
older newer | first last |