Page 1 of 1

Event/Message queues

Posted: Tue Dec 10, 2002 5:26 am
by DarylD
Does anybody have any good resources on implementation of event/message queues. I have various OS design books which explain the concepts, but I am interested in actual implementation details.

I am leaning towards having separate worker threads handling the event queue but I still need to have some means of queueing events.

I really want to get this designed right early otherwise I am bound to have scalability problems later.

Thanks.

Re:Event/Message queues

Posted: Tue Dec 10, 2002 6:27 pm
by jrfritz
Linux source code? Windows CE Source code? ( wow...MS put up source code for it's os! )

Re:Event/Message queues

Posted: Tue Dec 10, 2002 7:15 pm
by Mr_Spam
yes, but i dont understand any of MS's source :-/ oh well

Re:Event/Message queues

Posted: Tue Dec 10, 2002 8:50 pm
by jrfritz
Really? I just knew MS would code strange! Since I can't download the code ( too big )...could I see something to prove it's weird? (sorry if this is off topic...)

Re:Event/Message queues

Posted: Tue Dec 10, 2002 10:08 pm
by Mr_Spam
I dont know if its peticularly odd, but for me its hard to fallow compared to other ameture Operating Systems. (i like looking over the source of minux because its very strate forward and easy to understand)

Re:Event/Message queues

Posted: Wed Dec 11, 2002 3:24 am
by DarylD
Well, I have started my event system, I have decided to use an event consumer/producer system which will be a part of any future message passing system I build when I start my gui (some time in the next millenium probably!)

So for example, the keyboard creates an object in my system proclaiming itself to be a producer with the name "Keyboard", then my console app would proclaim itself to be a consumer of events, then it issues a call to "AttachProducerToConsumer" and the event manager will forward events accordingly.

Seems a simple enough way of achieving what I want and should also be flexible enough for all manner of devices in the future.

When I come to do my gui, that will pretty much attach all producers to itself and then forward events accordingly, i.e keyboard events to the current control with focus. I might even merge this event system into a more powerful message passing system for the gui.