comp.lang.ada
 help / color / mirror / Atom feed
* PubSub
@ 2020-10-31 17:58 DrPi
  2020-10-31 18:23 ` PubSub Jeffrey R. Carter
  2020-10-31 18:38 ` PubSub Dmitry A. Kazakov
  0 siblings, 2 replies; 7+ messages in thread
From: DrPi @ 2020-10-31 17:58 UTC (permalink / raw)



Hi,

Another question indirectly concerning GUI programming : Does a Ada 
"PubSub" package exist ?

Something like this : https://pypubsub.readthedocs.io/en/v4.0.3/

Search on Alire returned no result.
Global search on the internet is "polluted" by many ADA answers.

Nicolas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PubSub
  2020-10-31 17:58 PubSub DrPi
@ 2020-10-31 18:23 ` Jeffrey R. Carter
  2020-11-01  8:51   ` PubSub DrPi
  2020-10-31 18:38 ` PubSub Dmitry A. Kazakov
  1 sibling, 1 reply; 7+ messages in thread
From: Jeffrey R. Carter @ 2020-10-31 18:23 UTC (permalink / raw)


On 10/31/20 6:58 PM, DrPi wrote:
> 
> Global search on the internet is "polluted" by many ADA answers.

There's Google custom search for Ada programming topics at

https://thindil.github.io/adasearch/

and the Ada-specific search from the AdaIC at

https://www.adaic.org/ada-resources/ada-on-the-web/

-- 
Jeff Carter
"We'll make Rock Ridge think it's a chicken
that got caught in a tractor's nuts!"
Blazing Saddles
87

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PubSub
  2020-10-31 17:58 PubSub DrPi
  2020-10-31 18:23 ` PubSub Jeffrey R. Carter
@ 2020-10-31 18:38 ` Dmitry A. Kazakov
  2020-11-01 10:36   ` PubSub DrPi
  1 sibling, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2020-10-31 18:38 UTC (permalink / raw)


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.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PubSub
  2020-10-31 18:23 ` PubSub Jeffrey R. Carter
@ 2020-11-01  8:51   ` DrPi
  0 siblings, 0 replies; 7+ messages in thread
From: DrPi @ 2020-11-01  8:51 UTC (permalink / raw)


Le 31/10/2020 à 19:23, Jeffrey R. Carter a écrit :
> On 10/31/20 6:58 PM, DrPi wrote:
>>
>> Global search on the internet is "polluted" by many ADA answers.
> 
> There's Google custom search for Ada programming topics at
> 
> https://thindil.github.io/adasearch/
> 
> and the Ada-specific search from the AdaIC at
> 
> https://www.adaic.org/ada-resources/ada-on-the-web/
> 
Great.
Thanks for the links.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PubSub
  2020-10-31 18:38 ` PubSub Dmitry A. Kazakov
@ 2020-11-01 10:36   ` DrPi
  2020-11-01 11:18     ` PubSub Dmitry A. Kazakov
  0 siblings, 1 reply; 7+ messages in thread
From: DrPi @ 2020-11-01 10:36 UTC (permalink / raw)


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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PubSub
  2020-11-01 10:36   ` PubSub DrPi
@ 2020-11-01 11:18     ` Dmitry A. Kazakov
  2020-11-01 14:11       ` PubSub DrPi
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2020-11-01 11:18 UTC (permalink / raw)


On 01/11/2020 11:36, DrPi wrote:

> 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

You do not need that stuff. Even less if that is not task safe. On the 
context of the same task, it is just a call. You need no marshalled 
arguments because the call is synchronous and it must be synchronous 
because it is the same task. The very term "event" makes no sense if the 
task that emits it is the task that consumes it.

> This is very useful when using a GUI since it allows to directly send 
> messages to windows/dialogs/controls.

It is not useful, it is a mess, e.g. in GTK.

Anyway, the standard Ada library contains implementation of FIFO queues. 
If you want it 1-n rather that 1-1 use a blackboard instead of a FIFO.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PubSub
  2020-11-01 11:18     ` PubSub Dmitry A. Kazakov
@ 2020-11-01 14:11       ` DrPi
  0 siblings, 0 replies; 7+ messages in thread
From: DrPi @ 2020-11-01 14:11 UTC (permalink / raw)


Le 01/11/2020 à 12:18, Dmitry A. Kazakov a écrit :
> On 01/11/2020 11:36, DrPi wrote:
> 
>> 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
> 
> You do not need that stuff. Even less if that is not task safe. On the 
> context of the same task, it is just a call. You need no marshalled 
> arguments because the call is synchronous and it must be synchronous 
> because it is the same task. The very term "event" makes no sense if the 
> task that emits it is the task that consumes it.
> 
>> This is very useful when using a GUI since it allows to directly send 
>> messages to windows/dialogs/controls.
> 
> It is not useful, it is a mess, e.g. in GTK.
> 
> Anyway, the standard Ada library contains implementation of FIFO queues. 
> If you want it 1-n rather that 1-1 use a blackboard instead of a FIFO.
> 
Thanks Dmitry. I'll have a look at it.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-01 14:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 17:58 PubSub DrPi
2020-10-31 18:23 ` PubSub Jeffrey R. Carter
2020-11-01  8:51   ` PubSub DrPi
2020-10-31 18:38 ` PubSub Dmitry A. Kazakov
2020-11-01 10:36   ` PubSub DrPi
2020-11-01 11:18     ` PubSub Dmitry A. Kazakov
2020-11-01 14:11       ` PubSub DrPi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox