From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp1-1.free.fr!not-for-mail Newsgroups: comp.lang.ada References: <5f9da5ac$0$4029$426a74cc@news.free.fr> From: DrPi <314@drpi.fr> Subject: Re: PubSub Date: Sun, 1 Nov 2020 11:36:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Message-ID: <5f9e8fb6$0$16171$426a74cc@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 01 Nov 2020 11:36:38 CET NNTP-Posting-Host: 82.65.30.55 X-Trace: 1604226998 news-1.free.fr 16171 82.65.30.55:53869 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:60531 List-Id: Le 31/10/2020 à 19:38, Dmitry A. Kazakov a écrit : > On 31/10/2020 18:58, DrPi wrote: > >> Another question indirectly concerning GUI programming : Does a Ada >> "PubSub" package exist ? > > Yes. We have a commercial middleware 100% in Ada. We use that thing in > automation and control systems. Naturally, it provides > publisher/subscriber services, distributed or not with controlled QoS. > That is so to say horizontal communication between applications or > tasks. It also has a vertical communication aspect abstracting > hardware/protocols from application. E.g. you can publish/subscribe to a > MQTT topic, or to an EtherCAT object, or to a CANOpen dictionary object > etc without even knowing if that really the thing, something else or > another application. >  Having said that, for horizontal communication inside single process > you do not need that in Ada. Many things done for other languages are > not needed in Ada. > > Ada protected objects and tasks provide much more efficient, safer > (typed) and easier to use way to communicate between tasks. > What I'm looking for is not inter-task communication. It is some sort of message dispatcher (which is not thread safe). It is like a GUI event manager but for custom events. A simple description here : https://wiki.wxpython.org/WxLibPubSub This is very useful when using a GUI since it allows to directly send messages to windows/dialogs/controls.