|
Welcome to the February 2006 edition of Riverace's ACE News and
Tips newsletter. This issue contains information about an extension
to the ACE_Message_Queue::enqueue_head() and enqueue_tail() methods
contributed by Guy Peleg at Amdocs,
a note about the upcoming How to Use ACE Effectively class
(Sign up by Monday to ensure you get the 10% discount!!!),
and news about what else is coming up in the ACE 5.5 release,
scheduled for the first week in March.
| New Feature: ACE_Message_Queue and Enqueueing a Set of
Blocks |
 |
|
ACE_Message_Queue is a fundamental part of
many use-cases in ACE: message queueing, the
Half-Sync/Half-Async pattern, the Task framework, and the
Streams framework prominent among them. The
ACE_Task class includes a
ACE_Message_Queue in each instance. Chapter 6 in
C++NPv2
contains an in-depth discussion of the motivations for and
use of ACE_Message_Queue.
The canonical use case for enqueueing data is to build an
ACE_Message_Block, insert some data in it, and
enqueue it. (Don't forget to properly manage the
ACE_Message_Block read/write pointers. See the April
2005 newsletter for a refresher.) The
ACE_Message_Queue::enqueue_tail() method is
usually used, since blocks are generally enqueued at the queue
tail and dequeued at the head, though blocks can be enqueued
at the head as well, using the
ACE_Message_Queue::enqueue_head() method.
An ACE user, Guy Peleg, at Amdocs
encountered a situation where the message block producer could
produce groups of message blocks for enqueueing but needed to
wait for a trigger to actually enqueue them. Since the blocks
weren't a tightly related unit to be enqueued and dequeued
together, using the ACE_Message_Block
continuation pointer was not the correct way to handle this,
but Guy wanted to avoid acquiring and releasing the
ACE_Message_Queue internal lock multiple times in
close sequence to queue the blocks individually. The solution
he proposed was an extension of the
ACE_Message_Queue::enqueue_head() and
enqueue_tail() methods to enqueue a list of
blocks connected using their next pointers: the
same pointers used by the queue internally to link blocks.
Riverace worked with Guy to refine the solution and create
tests for it, and thanks to Guy's and Amdocs's generosity, all
ACE users will enjoy this new feature in ACE version 5.5 (for
an early look at it, it was included in the ACE 5.4.9 beta,
and you can get a look at the revised reference page here).
If you have new features for ACE, contact Steve Huston at
Riverace to see about getting them included in ACE!
|
| ACE.next: What's New? |
 |
|
The ACE development community is hard at work on the next
version of ACE. Here are some of the things you can look
forward to (items in bold are new or changed since last
month):
- Native library path-searching. Previous ACE versions's
implementation of ACE_DLL (used in loading dynamic services)
implemented a search of the configured path-search to try
and locate the desired library file (DLL) and then used the
full pathname to load the library. This skirted some
platforms's rules for path search and security settings.
This has been changed in the next ACE version to make use of
all of the native platform's path-search and security
facilities.
- Improved wide-character support. Wide- character support
has been included in ACE for many years on Windows (also
known as Unicode builds). However, wide-character support
for POSIX platforms has been sorely lacking. As ACE's reach
expands, this has become a more important issue. Riverace is
leading the completion of wide-character support in the next
version of ACE. This support is also available now in the
ACE 5.4b fix kit.
- GNU autotools support. Riverace is the lead developer in
charge of adding auto-configure support to ACE. For
native-build, non-Windows systems, autoconf will very likely
become the way to configure and build ACE. This will help
insure that ACE uses the latest features available on each
supported platform, and reduce the work required to build
ACE. No more picking the right config.h or
platform_macros.GNU file. Just do ./configure then make.
Ahhh...
- Support for g++ 4.0 and 3.4.
- Support for Red Hat Enterprise Linux 4 on both x86
and AMD64 processors.
- Support for Solaris 10.
- Support for Microsoft Visual Studio 2005 on desktop
(both 32- and 64-bit mode), Pocket PC 2003, and
Windows Mobile 5.0.
- Support for IBM AIX 5.3 on POWER with IBM's C++ V7.
- Support for HP-UX 11iv2 on both Itanium2 and PA-RISC.
- Newer C++ Features Being Used. As the range of
ACE-supported compilers matures and older compilers are
taken out of service, ACE can make more use of newer C++
features while still maintaining its stellar portability
record. For example, many methods that returned 1 or 0 as an
int now return bool. Small steps, yes, but significant ones.
You'll see more modern C++ usage as time goes on.
- The ACE and ACE_OS classes, previously containing a
number of static member functions, are now C++ namespaces.
Similar ACE-internal classes, such as ACE_Sock_Connect, are
no longer in use.
- Completed ACE_Dev_Poll_Reactor. Sharpcast
is sponsoring Riverace's work to complete this important
class, enabling use of the new epoll facility on newer Linux
kernels. Thanks to Sharpcast's forward-thinking investment
in this important class, the entire ACE user community will
benefit from the greatly increased scalability of the
Reactor framework on Linux.
The ACE development team is tightly focused on resolving
the last few issues in preparation for the release of ACE 5.5
by the first week of March. Keep an eye out for the
announcement!
|
| ACE 5.4e Fix Kit Released |
 |
|
The ACE 5.4e Fix Kit was recently released. The 5.4
fix kit ChangeLog contains entries for all changes made.
|
| Next "How to Use ACE Effectively" Class: March 6-8,
2006 |
 |
|
Many ACE users, both new and experienced, are
bewildered at the variety of classes available in ACE.
This often leads to confusion about the options
available for accomplishing a needed task in ACE, and a
failure to understand the ways that ACE's frameworks can
assist in structuring an application for maximum
flexibility, performance and reuse while minimizing code
and maintenance costs. How to Use ACE Effectively
is designed to teach users about ACE's features, of
course, but more importantly, it teaches about the reuse
techniques underlying ACE and how to apply ACE's pattern
implementations and frameworks for maximum benefit.
We've scheduled the next open enrollment How to
Use ACE Effectively class for March 6-8, 2006 in
Waltham, MA (in the Boston area). This is a 3-day class,
priced at US$1,500 including continental breakfast,
snacks and lunch each day. Each attendee receives a copy
of the class slides and a copy of "The ACE Programmer's
Guide" (since I'll be teaching the class, I'd also be
happy to sign anyone's book).
Save
$150.00! 10% discount for signup by February 17!
For more information and to
sign up, click here.
| |
|
|
Featured Book: C++ Network Programming, Volume 2
(C++NPv2) |
|
|
|
Now in its fourth printing, this widely acclaimed book
covers the major frameworks in ACE, how and why they're
designed as they are, and examples for how to use them. This
books also contains an in-depth coverage of reuse techniques
over what this newsletter discusses, and a domain analysis of
the factors often encountered when designing networked
applications. Every serious ACE user should have this book on
their desk at all times. Buy it now from amazon.com...
|
|