August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)
Status: Running
Current Developers: MH
Current "inflight" dev location:
/branches/private_MH_axon_outboxwakeups
Start Date: 20 October 2006
Expected End Date: 31 November 2006
End Date: ???
Date this page last updated: 23 February
2007
Estimated effort so far: 5 days
To get Axon to wake up producer components when a message they have
sent out is consumed. This used to be a feature of axon, but was removed
when Axon
box delivery optimisations were implemented. This is therefore
effectively a bugfix.
This allows producers to sleep if an inbox they are trying to send to
becomes full (because it is size limited) and then be woken when it
becomes non-full.
Needed by the Mobile
reframer.
Benefits:
This section is largely about WHO has influenced this task to do
WHAT, and where possible WHY. It is also about WHO to contact with
regard to this task to influence what's going on.
Task Sponsor: MH, MS
Task Owner: MH
Developers involved: MH (development), MS (merge)
Users: MH, MS
Interested third parties: MH, MS, SJ (bbc internal)
Requirements
Relevant Influencing factors:
Code:
CVS branch: private_MH_axon_threads
Mainline code: /Code/Python/Axon/Axon/
Mainline code: /Code/Python/Axon/Axon/Tests
none
This bug-fix brings Axon up to equivalent, but not semantically
identical, functionality to the original capabilities of Axon 1.0.
The original semantics worked for a model where both inbox
and outbox sizes could be limited, and a postman microprocess
would transfer data along linkages from outboxes to inboxes. In that
model:
However, the box delivery
optimisations removed the concept of messages being left in an
outbox and a postman to carry them. Instead they are immediately and
directly put into the final destination inbox.
The differences can therefore be summarised as:
In practical terms, this means that from the perspective of a
component developer, behaviour has changed in the following way:
It was not deemed practical to perfectly replicate the old behaviour
(without reverting to a postman style model) because of the lack of a
concept of messages waiting for dispatch in the outbox.
It could be argued that this strategy of waking all producers may cause a significant performance hit to some Axon based systems as all producers linked to a consumer will be woken every time the consumer collects from that inbox.
An alternative would be to only wake producers when the inbox
transitions from being full to becoming not-full. Alternatively,
producers could only be woken if they explicitly request it.
However these ideas constitue a more fundamental change in behaviour that component developers would have to take into account, rather than being a simple bug-fix.
-- Matt Hammond, 23 February 2007