Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Network Channel queue management



This article explains how to specify how a network Channel which receives content from the network or send content content to the network will manage the emission or reception of this content in the framework.

Note that this is both for buffers received from the network and buffers emitted to the network.

Problem overview

By default the buffer content of the Channel is decoded and immediately posted to the relevant service which is invoked. However this default behavior can lead to problems if the buffer content for the same service is received many times with a short delay from the network. In that case the buffer content for the service may have been modififed before it could be used by the receiver modules in the framework, which could lead to incorrect processed content.
networkqueue
The same kind of problem can happen for encoded buffer content to a Channel.

Queue management

Queue management from the Network

The queueServiceOutputs property allows to specify that the content of the buffers must be enqueued in a FIFO queue which will be processed one buffer at a time. The queueServiceOutputsSize property specifies the size of the queue.
networkqueue2
For example:
      <channel name="event" type="input" port="8080">
         <outputServiceQueue queueType="queue" queueSize="10" />
         <service name="published" />
      </channel>

Queue management to the Network

The queueServiceInputs property allows to specify that the content of the buffers must be enqueued in a FIFO queue which will be processed one buffer at a time. The queueServiceInputsSize property specifies the size of the queue.

For example:
      <channel name="event" type="output" port="8080">
         <inputServiceQueue queueType="queue" queueSize="10" />
         <service name="published" />
      </channel>

Invocation type

The invokeCopy property specifies if services coming from the network should be cloned before they are called.

Use cases

In the general case, you don't need to do anything specific about the queue management. If you receive a lot of buffers from the network at a rapid pace, you may see several services with the wrong values because they will be updated by the module before they could be sent. For example:
networkqueue2
In that case, you will need to specify both the queueServiceOutputs and the invokeCopy attributes to be sure that:
  • You don't miss any buffer coming from the network
  • You keep the content of the services even if you have a lot of buffers for the same service in a short time
For example:
      <channel name="event" type="output" port="8080">
         <outputServiceQueue queueType="queue" queueSize="10" invokeCopy="true" />
         <service name="published" />
      </channel>
If you send a lot of buffers to the network at a rapid pace, you may need to specify both the queueServiceInputs property. For example:
      <channel name="event" type="output" port="8080">
         <inputServiceQueue queueType="queue" queueSize="10" invokeCopy="true" />
         <service name="published" />
      </channel>

See also


Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence