From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.119.134 with SMTP id s128mr4005529ywc.25.1484899658590; Fri, 20 Jan 2017 00:07:38 -0800 (PST) X-Received: by 10.157.20.145 with SMTP id d17mr1376361ote.18.1484899658554; Fri, 20 Jan 2017 00:07:38 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!r185no748461ita.0!news-out.google.com!78ni12656itm.0!nntp.google.com!r185no748451ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 20 Jan 2017 00:07:38 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=160.46.252.16; posting-account=mOyWBQoAAAD7S-NBmMUOr9hRClcL0vqR NNTP-Posting-Host: 160.46.252.16 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <396469b6-6efe-49e7-914b-9226637e031e@googlegroups.com> Subject: tasking design considerations From: rrr.eee.27@gmail.com Injection-Date: Fri, 20 Jan 2017 08:07:38 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:33100 Date: 2017-01-20T00:07:38-08:00 List-Id: I am still trapped in old school linear thinking and I am facing a tasking = design problem. On channel A I receive messages in a irregular way. I then have to collect = all messages of a given time frame T, process the messages that lie within = the time frame and then send out the result to channel B. For the ease of reasoning you can assume typically around 0 .. 20 messages = (the maximum certainly << 1000 messages) per time frame T. The cycle time o= f T is fixed now to 1 minute, but might go down in the future to 1 second. = Channel B of course has exactly one message per T. The channels are TCP so= ckets. Reception of a single complete message in channel A activates callba= ck function in my program. I want now create a protected object stack. The callbacks from channel A fi= ll the stack on the top. A cyclic task with a cycle time T reads and remove= s all collected messages from the bottom of the stack. The task processes t= he messages and sends out the result. Does that sound like a reasonable and feasable design? I'm looking forward = to any feedback. best regards RE