Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

IPC for CumulusMX? - resolved release 3.7.0

A Forum to archive Cumulus MX development suggestions that have been rejected or solved by other means.
Post Reply
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

IPC for CumulusMX? - resolved release 3.7.0

Post by HansR »

Would it be possible to design a mechanism by which one could ask for the value of (a) tag(s) - or any information we could think of - i.s.o. making a file, running it at a certain frequency through Cumulus' process mechanism. The result would be the value(s) either async or sync, but with an 'immediate' timing meaning a value when needed. Of course not randomly external, but by the user running Cumulus and not through a command line interface. So I am thinking about IPC. I see use for it as it makes it possible to program alongside Cumulus without being dependent on it, apart for the fact that it is active.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: IPC for CumulusMX?

Post by freddie »

HansR wrote: Tue 14 Apr 2020 2:08 pm Would it be possible to design a mechanism by which one could ask for the value of (a) tag(s) - or any information we could think of - i.s.o. making a file, running it at a certain frequency through Cumulus' process mechanism. The result would be the value(s) either async or sync, but with an 'immediate' timing meaning a value when needed. Of course not randomly external, but by the user running Cumulus and not through a command line interface. So I am thinking about IPC. I see use for it as it makes it possible to program alongside Cumulus without being dependent on it, apart for the fact that it is active.
I think this is a great idea. If I was implementing it I would do it through the existing web service - create a "tag" endpoint that accepts a parameter (tag-name?) that will return the value for that tag at that instant. You could also have a "tags" endpoint that could return (a json representation of) all tag values.
Freddie
Image
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: IPC for CumulusMX?

Post by HansR »

freddie wrote: Tue 14 Apr 2020 2:19 pm I think this is a great idea. If I was implementing it I would do it through the existing web service - create a "tag" endpoint that accepts a parameter (tag-name?) that will return the value for that tag at that instant. You could also have a "tags" endpoint that could return (a json representation of) all tag values.
Thnx. Great to see a supporter and I agree that the technique through URL-parameter may work.

But I was really thinking of Inter Process Communications, meaning two processes on the same machine talk to each other (e.g. through a semaphore /message system), or if it's not on the same machine, through named pipes. Anything is possible of course, but my primary goal was to have a very small overhead true IPC. Standard libraries do exist.

And beside that: I would make a value on request, so not all tag values (which nobody needs at the same time) although that would be the ultimate limit I guess.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: IPC for CumulusMX?

Post by mcrossley »

This is something I have thought about before, and it's doable. I was thinking via the web API interface that the admin interface uses. you could pass in a template string with tags so you have control over the formatting, and get it back in a processed form. The string could be JSON or whatever you want. The market for it may be small though! :lol:

The MQTT interface currently offers distributed "broadcast" data to other applications, and could also be made a two way communication to have a request channel.

Any IPC would have to be network based I think, given the multi-platform nature of CMX. Which then kind of says why not use the web protocol so that the "other" application isn't tied to be being on the same machine at all.
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: IPC for CumulusMX?

Post by HansR »

mcrossley wrote: Tue 14 Apr 2020 3:15 pm This is something I have thought about before, and it's doable.
OK, that's great.
mcrossley wrote: Tue 14 Apr 2020 3:15 pm I was thinking via the web API interface that the admin interface uses. you could pass in a template string with tags so you have control over the formatting, and get it back in a processed form. The string could be JSON or whatever you want. The market for it may be small though! :lol:
It's up to you though as I may be the first customer, I would like to comment the design ;)
I am definitely not thinking of formatted data. We would be just exchanging values. Neither party has any idea what the other would do with it and I would hate to unravel format only to lose information. Raw is what I would want.
mcrossley wrote: Tue 14 Apr 2020 3:15 pm The MQTT interface currently offers distributed "broadcast" data to other applications, and could also be made a two way communication to have a request channel.
Could be a good candidate. Never looked at it.
mcrossley wrote: Tue 14 Apr 2020 3:15 pm Any IPC would have to be network based I think, given the multi-platform nature of CMX. Which then kind of says why not use the web protocol so that the "other" application isn't tied to be being on the same machine at all.
Not necessarily. If you use .NET based library for IPC you could stick to local inter process communication.

Why would you need to communicate over the line?

If you would do a client2cumulus communications to serve your realtime data, I think you would really have a performance trade off. In that case, updating realtime.txt with additions might be an alternative. We do not need realtime line between a web client and Cumulus. Might be technically nice, but it's Cumulus, not Voyager.

Might even become a security risk.

But OK, in priciple I understand it's positive reception :D :clap:
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: IPC for CumulusMX?

Post by mcrossley »

HansR wrote: Tue 14 Apr 2020 3:33 pm
mcrossley wrote: Tue 14 Apr 2020 3:15 pm I was thinking via the web API interface that the admin interface uses. you could pass in a template string with tags so you have control over the formatting, and get it back in a processed form. The string could be JSON or whatever you want. The market for it may be small though! :lol:
It's up to you though as I may be the first customer, I would like to comment the design ;)
I am definitely not thinking of formatted data. We would be just exchanging values. Neither party has any idea what the other would do with it and I would hate to unravel format only to lose information. Raw is what I would want.
But what is "raw" for dates and times say? We are back to why I provided the new time tag in an agnostic format.
Or do you see it as purely .Net to .Net? I think that would be limiting, especially for all the Linux folks out there.
HansR wrote: Tue 14 Apr 2020 3:33 pm
mcrossley wrote: Tue 14 Apr 2020 3:15 pm Any IPC would have to be network based I think, given the multi-platform nature of CMX. Which then kind of says why not use the web protocol so that the "other" application isn't tied to be being on the same machine at all.
Not necessarily. If you use .NET based library for IPC you could stick to local inter process communication.

Why would you need to communicate over the line?
Because people often put different software on separate servers for various reasons.
I guess things like Named Pipes can be accessed across the network.
HansR wrote: Tue 14 Apr 2020 3:33 pm If you would do a client2cumulus communications to serve your realtime data, I think you would really have a performance trade off. In that case, updating realtime.txt with additions might be an alternative. We do not need realtime line between a web client and Cumulus. Might be technically nice, but it's Cumulus, not Voyager.
There is nothing stopping anyone creating their own real-time file now.
HansR wrote: Tue 14 Apr 2020 3:33 pm Might even become a security risk.
Well CMX isn't very secure at all - the admin interface is open.

Much discussion to be had around this methinks! :)
freddie
Posts: 2434
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: IPC for CumulusMX?

Post by freddie »

HansR wrote: Tue 14 Apr 2020 3:33 pmWe do not need realtime line between a web client and Cumulus. Might be technically nice, but it's Cumulus, not Voyager.

Might even become a security risk.
It is useful in places. I already do this for my graphs page. The only security risk I can see is DOS, but that can be mitigated with cacheing and rate-limiting. My web site is quiet enough for me not to worry too much :D
Freddie
Image
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: IPC for CumulusMX?

Post by HansR »

mcrossley wrote: Tue 14 Apr 2020 5:15 pm Or do you see it as purely .Net to .Net? I think that would be limiting, especially for all the Linux folks out there.
Mono is the same, should work everywhere if you choose the right lib.
mcrossley wrote: Tue 14 Apr 2020 5:15 pm But what is "raw" for dates and times say?
Dates and times is not exactly the discussion here, neither are strings. Number values are.
mcrossley wrote: Tue 14 Apr 2020 5:15 pm Because people often put different software on separate servers for various reasons.
I guess things like Named Pipes can be accessed across the network.
I don't get your first argument, that is not about IPC, that is about wanting to be able to have Cumulus talk to the world. Could you give an argument for that? If you're going to do that, you are making a very distributed system. A bit of Pandora's box.
Indeed named pipes could do that. Might be what you want ;)
mcrossley wrote: Tue 14 Apr 2020 5:15 pm There is nothing stopping anyone creating their own real-time file now.
True.
mcrossley wrote: Tue 14 Apr 2020 5:15 pm Much discussion to be had around this methinks! :)
Well, Any choice will do as long as we are happy about it :)

Apparently you and freddie see other/more uses than I and see other and more techniques than I.
But a growth of interfaces to the outside world won't serve the understandability of Cumulus by the part of users less gifted in IT.
Neither will it ease support. But that may be an invalid argument.

Btw: how's V4 going (because this all has to be ported to there hasn't it, maybe wait until then)?
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: IPC for CumulusMX?

Post by HansR »

@mcrossley: There were some remarks on this topic later on in other threads.
Maybe it is useful to restart it. Apparently you are thinking along the line of a webtags interface over HTML as IPC.
If that is the only possibility to get things going, then OK. Could/would you put it on the ToDo-list?
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: IPC for CumulusMX?

Post by mcrossley »

Watch for something in the next release - I think it works pretty well. ;)
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: IPC for CumulusMX?

Post by HansR »

mcrossley wrote: Fri 10 Jul 2020 11:47 am Watch for something in the next release - I think it works pretty well. ;)
Ha... now I am curious :D
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: IPC for CumulusMX?

Post by mcrossley »

Well, not the next release, the one after (3.7.0), as I just had to make an urgent release to fix Davis station logger downloads. :groan:
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: IPC for CumulusMX?

Post by HansR »

I read all kind of problems with Davis stuff and Graphs etc... and I never have any problem... Don't understand. knock knock.
Anyway, I am a patient one. Looking forward.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12694
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: IPC for CumulusMX?

Post by mcrossley »

A webtag API was introduced in version 3.7.0 that satisfies this request I think.
Post Reply