100% found this document useful (1 vote)
7 views

The ACE programmer s guide practical design patterns for network and systems programming 5. print Edition Johnson pdf download

The document provides information about the ACE Programmer's Guide, which focuses on practical design patterns for network and systems programming. It includes details about the authors, publication information, and various chapters covering topics such as ACE basics, logging, runtime information, and interprocess communication. Additionally, it offers links to download the book and other related resources.

Uploaded by

ntopemasaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
7 views

The ACE programmer s guide practical design patterns for network and systems programming 5. print Edition Johnson pdf download

The document provides information about the ACE Programmer's Guide, which focuses on practical design patterns for network and systems programming. It includes details about the authors, publication information, and various chapters covering topics such as ACE basics, logging, runtime information, and interprocess communication. Additionally, it offers links to download the book and other related resources.

Uploaded by

ntopemasaa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

The ACE programmer s guide practical design

patterns for network and systems programming 5.


print Edition Johnson pdf download

https://ebookfinal.com/download/the-ace-programmer-s-guide-
practical-design-patterns-for-network-and-systems-
programming-5-print-edition-johnson/

Explore and download more ebooks or textbooks


at ebookfinal.com
We believe these products will be a great fit for you. Click
the link to download now, or visit ebookfinal
to discover even more!

Functional Programming in C Classic Programming Techniques


for Modern Projects Wrox Programmer to Programmer 1st
Edition Oliver Sturm
https://ebookfinal.com/download/functional-programming-in-c-classic-
programming-techniques-for-modern-projects-wrox-programmer-to-
programmer-1st-edition-oliver-sturm/

Systems programmer s guide to z OS System Logger 1st ed


Edition Ibm Redbooks

https://ebookfinal.com/download/systems-programmer-s-guide-to-z-os-
system-logger-1st-ed-edition-ibm-redbooks/

Websphere Studio Application Developer Version 5


Programming Guide Programming Guide 1st Edition Ibm
Redbooks
https://ebookfinal.com/download/websphere-studio-application-
developer-version-5-programming-guide-programming-guide-1st-edition-
ibm-redbooks/

Therapist s Guide to Clinical Intervention Second Edition


The 1 2 3 s of Treatment Planning Practical Resources for
the Mental Health Professional Sharon L. Johnson
https://ebookfinal.com/download/therapist-s-guide-to-clinical-
intervention-second-edition-the-1-2-3-s-of-treatment-planning-
practical-resources-for-the-mental-health-professional-sharon-l-
johnson/
The Theft of History 5. print Edition Jack Goody

https://ebookfinal.com/download/the-theft-of-history-5-print-edition-
jack-goody/

Successful Marketing Communications A Practical Guide to


Planning and Implementation CIM Advanced Certificate
Workbook 1st Edition Cathy Ace
https://ebookfinal.com/download/successful-marketing-communications-a-
practical-guide-to-planning-and-implementation-cim-advanced-
certificate-workbook-1st-edition-cathy-ace/

Professional Python Frameworks Web 2 0 Programming with


Django and Turbogears Programmer to Programmer 1st Edition
Moore
https://ebookfinal.com/download/professional-python-frameworks-
web-2-0-programming-with-django-and-turbogears-programmer-to-
programmer-1st-edition-moore/

Practical Electrical Network Automation and Communication


Systems 1st Edition Cobus Strauss Cpeng Bsc (Eleceng)
Bcomm
https://ebookfinal.com/download/practical-electrical-network-
automation-and-communication-systems-1st-edition-cobus-strauss-cpeng-
bsc-eleceng-bcomm/

MongoDB Applied Design Patterns Practical Use Cases with


the Leading NoSQL Database 1st Edition Rick Copeland

https://ebookfinal.com/download/mongodb-applied-design-patterns-
practical-use-cases-with-the-leading-nosql-database-1st-edition-rick-
copeland/
The ACE programmer s guide practical design patterns
for network and systems programming 5. print Edition
Johnson Digital Instant Download
Author(s): Johnson, James CE;Syyid, Umar;Huston, Stephen D
ISBN(s): 9780201699715, 0201699710
Edition: 5. print
File Details: PDF, 3.47 MB
Year: 2009
Language: english
The ACE Programmer’s Guide
This page intentionally left blank
The ACE Programmer’s Guide

Practical Design Patterns for Network and


Systems Programming

Stephen D. Huston
James CE Johnson
Umar Syyid

Boston • San Francisco • New York • Toronto • Montreal


London • Munich • Paris • Madrid
Capetown • Sydney • Tokyo • Singapore • Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those
designations appear in this book, and Addison-Wesley was aware of a trademark claim, the designations have been printed with
initial capital letters or all capitals.

The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind
and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in
connection with or arising out of the use of the information or programs contained herein.
Figures 7.1, 7.2, 7.3, and 8.1 originally published in Schmidt/Huston, C++ Network Programming, Volume 2: Systematic Reuse
with ACE and Frameworks, Copyright © 2003 by Pearson Education, Inc. Reprinted with permission of Pearson Education, Inc.
The publisher offers discounts on this book when ordered in quantity for bulk purchases and special sales. For more information,
please contact:
U.S. Corporate and Government Sales
(800) 382-3419
[email protected]
For sales outside of the U.S., please contact:
International Sales
[email protected]
Visit Addison-Wesley on the Web: www.awprofessional.com
Library of Congress Cataloging-in-Publication Data
Huston, Stephen D.
The ACE programmer’s guide : practical design patterns for network and systems
programming / Stephen D. Huston, James CE Johnson and Umar Syyid.
p. cm.
ISBN 0-201-69971-0 (pbk. : alk. paper)
1. Computer software—Development. 2. Object-oriented programming (Computer science)
3. Software patterns. I. Johnson, James C. E. II. Syyid, Umar. III. Title.
QA76.76.D47H89 2003
005.1’17—dc21 2003014046

Copyright © 2004 by Pearson Education, Inc.


All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by
any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in
the United States of America.
For information on obtaining permission for use of material from this work, please submit a written request to:
Pearson Education, Inc,
Rights and Contracts Department
75 Arlington Street, Suite 300
Boston, MA 02116
Fax: (617) 848-7047
ISBN13: 978-0-201-69975-5
ISBN 0-201-69971-0
Text printed in the United States at Offset Paperback Manufacturers in Laflin, Pennsylvania.
6th Printing March 2010
Contents

Illustrations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Part I: ACE Basics 1
1. Introduction to ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 A History of ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 ACE’s Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 ACE’s Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.4 Patterns, Class Libraries, and Frameworks. . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Porting Your Code to Multiple Operating Systems . . . . . . . . . . . . . . . . 8
1.6 Smoothing the Differences among C++ Compilers . . . . . . . . . . . . . . . 11
1.7 Using Both Narrow and Wide Characters . . . . . . . . . . . . . . . . . . . . . . 19
1.8 Where to Find More Information and Support. . . . . . . . . . . . . . . . . . . 21
1.9 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2. How to Build and Use ACE in Your Programs . . . . . . . . . . . . . . . 25
2.1 A Note about ACE Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2 Guide to the ACE Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

v
vi Contents

2.3 How to Build ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27


2.4 How to Include ACE in Your Applications . . . . . . . . . . . . . . . . . . . . . 30
2.5 How to Build Your Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.6 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3. Using the ACE Logging Facility . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.1 Basic Logging and Tracing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.2 Enabling and Disabling Logging Severities . . . . . . . . . . . . . . . . . . . . . 43
3.3 Customizing the ACE Logging Macros . . . . . . . . . . . . . . . . . . . . . . . . 47
3.4 Redirecting Logging Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.5 Using Callbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.6 The Logging Client and Server Daemons . . . . . . . . . . . . . . . . . . . . . . 64
3.7 The LogManager Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.8 Runtime Configuration with the ACE Logging Strategy . . . . . . . . . . . 73
3.9 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4. Collecting Runtime Information . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.1 Command Line Arguments and ACE_Get_Opt . . . . . . . . . . . . . . . . . . 78
4.2 Accessing Configuration Information . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.3 Building Argument Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
4.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5. ACE Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.1 Container Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.2 Sequence Containers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.3 Associative Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
5.4 Allocators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
5.5 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

Part II: Interprocess Communication 121


6. Basic TCP/IP Socket Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.1 A Simple Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
6.2 Adding Robustness to a Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
6.3 Building a Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
6.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
7. Handling Events and Multiple I/O Streams . . . . . . . . . . . . . . . . . 141
7.1 Overview of the Reactor Framework . . . . . . . . . . . . . . . . . . . . . . . . . 142
7.2 Handling Multiple I/O Sources. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Contents vii

7.3 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155


7.4 Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
7.5 Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
7.6 Using the Acceptor-Connector Framework . . . . . . . . . . . . . . . . . . . . 168
7.7 Reactor Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
7.8 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
8. Asynchronous I/O and the ACE Proactor Framework . . . . . . . . . 187
8.1 Why Use Asynchronous I/O? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
8.2 How to Send and Receive Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
8.3 Establishing Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
8.4 The ACE_Proactor Completion Demultiplexer . . . . . . . . . . . . . . . . . 201
8.5 Using Timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
8.6 Other I/O Factory Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
8.7 Combining the Reactor and Proactor Frameworks. . . . . . . . . . . . . . . 203
8.8 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
9. Other IPC Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
9.1 Interhost IPC with UDP/IP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
9.2 Intrahost Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
9.3 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

Part III: Process and Thread Management 217


10. Process Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
10.1 Spawning a New Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
10.2 Using the ACE_Process_Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
10.3 Synchronization Using ACE_Process_Mutex . . . . . . . . . . . . . . . . . . 231
10.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
11. Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
11.1 Using Wrappers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
11.2 Event Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
11.3 Guarding Critical Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
11.4 Signal Management with the Reactor. . . . . . . . . . . . . . . . . . . . . . . . . 247
11.5 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
12. Basic Multithreaded Programming . . . . . . . . . . . . . . . . . . . . . . 249
12.1 Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
12.2 Basic Thread Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
viii Contents

12.3 Intertask Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257


12.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
13. Thread Management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
13.1 Types of Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
13.2 Priorities and Scheduling Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
13.3 Thread Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
13.4 Thread Management Using ACE_Thread_Manager . . . . . . . . . . . . . 276
13.5 Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
13.6 Thread Start-Up Hooks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
13.7 Cancellation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
13.8 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
14. Thread Safety and Synchronization . . . . . . . . . . . . . . . . . . . . . . 289
14.1 Protection Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
14.2 Thread Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
14.3 Thread-Specific Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
14.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
15. Active Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
15.1 The Pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
15.2 Using the Pattern. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
15.3 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
16. Thread Pools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
16.1 Understanding Thread Pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
16.2 Half-Sync/Half-Async Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
16.3 Leader/Followers Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
16.4 Thread Pools and the Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
16.5 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

Part IV: Advanced ACE 347


17. Shared Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
17.1 ACE_Malloc and ACE_Allocator . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
17.2 Persistence with ACE_Malloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
17.3 Position-Independent Allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
17.4 ACE_Malloc for Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
17.5 Wrappers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
17.6 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Contents ix

18. ACE Streams Framework. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377


18.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
18.2 Using a One-Way Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
18.3 A Bidirectional Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
18.4 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
19. ACE Service Configurator Framework . . . . . . . . . . . . . . . . . . . 419
19.1 Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
19.2 Configuring Static Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
19.3 Setting Up Dynamic Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
19.4 Setting Up Streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
19.5 Reconfiguring Services During Execution . . . . . . . . . . . . . . . . . . . . . 431
19.6 Using XML to Configure Services and Streams . . . . . . . . . . . . . . . . 433
19.7 Configuring Services without svc.conf. . . . . . . . . . . . . . . . . . . . . . . . 434
19.8 Singletons and Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
19.9 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
20. Timers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
20.1 Timer Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
20.2 Timer Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
20.3 Prebuilt Dispatchers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
20.4 Managing Event Handlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
20.5 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
21. ACE Naming Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
21.1 The ACE_Naming_Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457
21.2 A Single-Process Naming Context: PROC_LOCAL . . . . . . . . . . . . . 459
21.3 Sharing a Naming Context on One Node: NODE_LOCAL. . . . . . . . 468
21.4 Sharing a Naming Context across the Network: NET_LOCAL . . . . 476
21.5 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481
This page intentionally left blank
Illustrations

7.1 Acceptor-Connector framework classes . . . . . . . . . . . . . . . . . . . . . . . 169


7.2 Steps in ACE_Acceptor connection acceptance. . . . . . . . . . . . . . . 172
7.3 Reactive shutdown of an ACE_Svc_Handler . . . . . . . . . . . . . . . . 176
8.1 Classes in the Proactor framework . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
8.2 Sequence diagram for asynchronous data echo example . . . . . . . . . . 196
12.1 Using a queue for communication . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
13.1 Kernel- and User-Level Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
15.1 Asynchronous log() method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
15.2 Active Object pattern participants . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
15.3 Active Object collaborations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
15.4 Active Object pattern applied to example. . . . . . . . . . . . . . . . . . . . . . 319
18.1 Diagram of an ACE_Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
18.2 Logical structure of the command stream . . . . . . . . . . . . . . . . . . . . . 397
20.1 Timer queue class hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
20.2 Timer dispatcher example class diagram . . . . . . . . . . . . . . . . . . . . . . 441
20.3 Timer dispatcher example sequence diagram . . . . . . . . . . . . . . . . . . . 442
20.4 Timer queue template classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451
20.5 Upcall handler sequence diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

xi
This page intentionally left blank
Tables

1.1 Data Types Defined by ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15


1.2 ACE Memory Allocation Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.3 Macros Related to Character Width . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.1 Configuration Files for Popular ACE Platforms . . . . . . . . . . . . . . . . . 29
2.2 GNU make Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.3 ACE Library File Names for Visual C++. . . . . . . . . . . . . . . . . . . . . . . 35
3.1 ACE_Log_Msg Logging Severity Levels . . . . . . . . . . . . . . . . . . . . . . 39
3.2 ACE Logging Format Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.3 ACE Logging Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.4 Commonly Used ACE_Log_Msg Methods. . . . . . . . . . . . . . . . . . . . . 48
3.5 Valid ACE_Log_Msg Flags Values . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.6 Mapping ACE Logging Severity to Windows Event Log Severity . . . 58
3.7 ACE_Log_Record Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.8 ACE Logging Strategy Configuration Options . . . . . . . . . . . . . . . . . . 75
5.1 Allocators Available in ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
7.1 Meaning of Event Handler Callback Return Values . . . . . . . . . . . . . 149
12.1 ACE Guard Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
12.2 Various Queue Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266

xiii
xiv Tables

13.1 Thread Creation Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268


13.2 Thread Priority Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
14.1 Protection Primitives in ACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
14.2 ACE Synchronization Primitives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
17.1 Memory Pool Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
17.2 Memory Pool Macro Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
17.3 ACE_MMAP_Memory_Pool_Options Attributes . . . . . . . . . . . . 360
19.1 Service Configurator Command Line Options. . . . . . . . . . . . . . . . . . 427
20.1 Timer Storage Structures and Relative Performance . . . . . . . . . . . . . 439
21.1 Name Options Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458
Foreword

I started programming computers in the mid-1980s. Then, like today, computing


and communication systems were heterogeneous; that is, there were many
different programming languages, operating systems, and networking protocols.
Moreover, due to the accidental complexities of programming with low-level and
nonportable application programming interfaces (APIs), the types of networked
applications available to software developers and end users were relatively primi-
tive, consisting largely of e-mail, remote login, and file transfer. As a result, many
applications were either centralized on mainframes and minicomputers or local-
ized on a single stand-alone PC or workstation.
There have been significant advances in information technology (IT) for
computing and communication during the intervening two decades. Languages,
programming environments, operating systems, networking protocols, and
middleware are more mature and standardized. For example, C++ has become an
ISO/ANSI standard and is being used in a broad range of application domains.
Likewise, the UNIX, Windows, and TCP/IP standards have also become ubiqui-
tous. Even distributed computing middleware standards, such as CORBA, .NET,
and J2EE, are becoming widely embraced by the IT industry and end users.
Even with all these advances, however, there is still a layer of the networked
software design space—host infrastructure middleware for performance-driven,
multiplatform, networked and/or concurrent software systems—that is not well
served by standard solutions at other levels of abstraction. Host infrastructure
middleware encapsulates native operating system (OS) concurrency and interpro-
xv
xvi Foreword

cess communication (IPC) mechanisms to alleviate many tedious, error-prone,


and nonportable activities associated with developing networked applications via
native OS APIs, such as Sockets or POSIX threads (Pthreads). Performance-
driven systems also have stringent quality of service (QoS) requirements.
Providing host infrastructure middleware for today’s popular computing envi-
ronments is particularly important for (1) high-performance computing systems,
such as those that support scientific visualization, distributed database servers, and
online financial trading systems; (2) distributed real-time and embedded systems
that monitor and control real-world artifacts, such as avionics mission- and flight-
control software, supervisory control and data acquisition systems, and automo-
tive braking systems; and (3) multiplatform applications that must run portably
across local- and wide-area networks. These types of systems are increasingly
subject to the following trends:
• The need to access native OS mechanisms to meet QoS requirements. For
example, multimedia applications that require long-duration, bidirectional
bytestream communication services are poorly suited to the synchronous
request/response model provided by conventional distribution middleware.
Likewise, many distribution middleware implementations incur significant
overhead and lack sufficient hooks to manipulate other QoS-related proper-
ties, such as latency, throughput, and jitter.
• Severe cost and time-to-market pressures. Global competition and market
deregulation are shrinking budgets for the in-house development and quality
assurance (QA) of software, particularly for the OS and middleware infra-
structure. Moreover, performance-driven users are often unable or less willing
to pay for specialized proprietary infrastructure software.
• The demand for user-specific customization. Because performance-intensive
software often pushes the limits of technology, it must be optimized for partic-
ular runtime contexts and application requirements. General-purpose, one-
size-fits-all software solutions often have unacceptable performance.
As these trends continue to accelerate, they present many challenges to developers
of tomorrow’s networked software systems. In particular, to succeed in today’s
competitive, fast-paced computing industry, successful middleware and applica-
tion software must exhibit the following eight characteristics:
1. Affordability, to ensure that the total ownership costs of software acquisition
and evolution aren’t prohibitively high
2. Extensibility, to support successions of quick updates and additions to address
new requirements and take advantage of emerging markets
Foreword xvii

3. Flexibility, to support a growing range of data types, traffic flows, and end-to-
end QoS requirements
4. Portability, to reduce the effort required to support applications on heteroge-
neous OS platforms and compilers
5. Predictability and efficiency, to provide low latency to delay-sensitive real-
time applications, high performance to bandwidth-intensive applications, and
usability over low-bandwidth networks, such as wireless links
6. Reliability, to ensure that applications are robust and tolerant of faults
7. Scalability, to enable applications to handle many users simultaneously
8. Trustworthiness, to ensure integrity, confidentiality, and availability in inter-
networked systems
I’ve encountered all these challenges while working on scores of research and
production performance-driven software systems during the past two decades. In
1992, I began creating a software toolkit called the ADAPTIVE Communication
Environment (ACE) to address concurrent network programming challenges.
ACE is portable object-oriented host infrastructure middleware written in C++.
ACE was designed to solve a very pragmatic problem—to save time imple-
menting my doctoral dissertation project on parallel protocol processing engines
in both SunOS 4.x and SunOS 5.x operating systems. Having worked on free soft-
ware projects for many years, I recognized immediately that making ACE avail-
able in open-source form would help to galvanize a community whereby other
developers and users could assist with the QA, documentation, and support activi-
ties needed to transform ACE into a high-quality production software toolkit.
Over the next decade, a core group of around 30 developers and I teamed up
with more than 1,700 contributors from around the world to evolve ACE so it
encapsulates and augments a wide range of native OS capabilities that are essen-
tial to support performance-driven software systems. The core frameworks and
wrapper facades in ACE provide an integrated collection of reusable object-
oriented classes that simplify and automate connection establishment, event
demultiplexing, secure and efficient interprocess communication, (de)marshaling,
dynamic configuration of application components, concurrency, and synchroniza-
tion. Most important, the ACE frameworks can be customized readily to support a
wide range of runtime contexts and application requirements.
Today‚ ACE runs on dozens of hardware and OS platforms, including most
versions of Windows and UNIX, as well as many real-time and embedded oper-
ating systems. Due to its maturity, efficiency, and scope, ACE is being used by
thousands of development teams, ranging from large Fortune 500 companies to
xviii Foreword

small start-ups to advanced research projects at universities and industry labs. Its
open-source development model and highly knowledgeable user community is
similar in spirit, enthusiasm, and productivity to that driving the Linux operating
system, the Apache web server, and the GNU compiler collection.
For many years, however, the only way to learn ACE was to read the source
code and example applications, technical papers that described its patterns and the
design of its frameworks, and online tutorials. Although a surprisingly large
number of ACE users managed to master ACE via this process, the learning curve
was time consuming and error prone. In 2002 and 2003, I teamed up with Steve
Huston to write a pair of books on C++ Network Programming (C++NP), which
cover the motivation, design, implementation, and use of the most popular
wrapper facade classes and frameworks in ACE.
The ACE Programmer’s Guide takes a different tack from the C++NP books,
explaining quickly and directly how to make the best use of ACE. In addition to its
nuts-and-bolts approach to explaining key ACE capabilities, this book addresses
important topics not covered in the C++NP books, including how to build ACE
and your programs that use ACE, ACE’s OS and compiler portability features, the
ACE logging facility, command line options processing, container classes, signal
handling, and shared memory. The book also covers certain material in greater
depth than the C++NP books, including concurrency models, bidirectional
streams, and asynchronous I/O. Throughout this book, many examples using ACE
show how key patterns and design principles can be applied to develop object-
oriented networked software successfully. By learning the material in this book‚
you’ll be better able to design and implement performance-driven networked soft-
ware that can’t be bought off-the-shelf, thereby staying ahead of your competition.
We are fortunate that Steve, James, and Umar have found time in their hectic
schedules to write this book. If you’re designing software and systems that must
be portable, flexible, extensible, predictable, reliable, and affordable, this book
and the ACE toolkit will enable you to be more effective in all these areas. Even
after spending more than a decade developing ACE and using it to build
networked software applications, I find that I’ve learned a great deal from this
book‚ and I’m confident that you will too.

—Douglas C. Schmidt
Professor of Electrical Engineering and Computer Science at
Vanderbilt University and Inventor of ACE
Nashville, Tennessee
Preface

ACE (the ADAPTIVE Communication Environment) is a powerful C++ toolkit


that helps you develop portable, high-performance applications, especially
networked and/or multithreaded applications, more easily and more quickly with
more flexibility and fewer errors. And, because of ACE’s design and frameworks,
you can do all this with much less code than with other development approaches.
We’ve been using ACE for years and have found it exceedingly helpful and well
worth any price. What’s better is that it’s available for free! The historical price
many developers have paid to use ACE is a steep learning curve. It’s a big toolkit
with a large set of capabilities. Until recently, the best documentation has been the
source code, which is, of course, freely available, and a set of academic papers
born of the research that produced ACE, approachable only by advanced profes-
sionals and upper-level students. This barrier to learning has kept ACE’s power
and easy-to-use elegance one of the best-kept secrets in software development.
That’s why we’re very excited to write this book! It flattens out ACE’s learning
curve, bringing ACE’s power, elegance, and capabilities to all.
This book teaches you about ACE: a bit of its history and approach to develop-
ment, how it’s organized, how to begin using it, and also how to use some of its
more advanced capabilities. We teach you how to do things the ACE way in this
book, but we could not possibly fit in a complete reference. Use this book to get
started with ACE and to begin using it in your work. If you’ve been using ACE for
a while, there are probably descriptions of some capabilities you haven’t seen
before, so the book is useful for experienced ACE users as well.
xix
Discovering Diverse Content Through
Random Scribd Documents
nothing, his works an offence, amid the enormous loneliness of the
fells.
Gundred, however, found herself warmly approving of Ivescar. True,
the country just round was “dreadfully black and barren, very ugly
and uncultivated”; but the house was roomy, airy, warm,
comfortable, quite suitable and pleasant in every way. It would hold
plenty of people, and had been built with an eye to the convenience
of house-parties. Carpets and curtains and cushions were all opulent
and softly luxurious. They compared well, to her taste, with the bare
floors, the flags, the worn matting of Brakelond. She resolved on a
few improvements, but, on the whole, was very well satisfied. A
building produced by one mind may, perhaps, have a less
complicated personality, a simpler sense of unity, than one built up
by the varying tastes of twenty succeeding generations. Ivescar was
plain and direct in scheme. There was a good collection of pictures,
bought, all together, by James Darnley from the previous owner, who
had accumulated them because he imagined it a suitable thing to
do; otherwise Ivescar was tormented by no ambitions whatever,
artistic or dramatic. It only aimed, with a good-humoured whole-
heartedness, at being altogether comfortable. Gundred entered into
its spirit, and in an environment so congenial her abandonment of all
attempt to share in conversation with Kingston and Isabel became at
once more complete and less noticeable. She passed into entire
absorption in the details of daily life, lost any wish to be in touch
with intellectual life, took the colour of her surroundings so perfectly
that neither she herself nor the others realized how completely she
had withdrawn from their company.
As for Isabel, the exasperating vividness of the woman leapt into
more violent relief than ever against the smug complacency of
Ivescar. At Brakelond Isabel had been a part of the place; her
individuality had toned in with all the other individualities that had
gone to make up Brakelond. As one organ note is inconspicuous
among a crowd of other organ notes, so Isabel’s nature had there
been merged in a crowd of other similar natures. Here, however, at
Ivescar the organ note of her personality sounded harsh and
tremendous, almost terrifying, amid the clacking babble of
mediocrity for ever kept up by the house. Only trifling, futile people
had had part in the building and the life of Ivescar; their influence
had left the place a pleasant little chorus of tinkling inanities; and,
by contrast, the fierce song of Isabel’s nature rose dominant,
tyrannous, obliterating all the lesser voices around.
Kingston by degrees began to notice the disappearance of his wife
and the supremacy of her cousin in his mind. Occasionally he
showed a dim foreknowledge of the inevitable by brief spasms of
anger against Isabel, by fruitless attempts to carry Gundred with
them in their flights. But by now Gundred’s mental immobility had
begun to be an annoyance to him, and he was always glad to
relinquish his efforts and fall back into the familiar swing of dialogue
with Isabel. The faint air of greatness which for a time had been
reflected on Gundred from the walls of Brakelond had now faded
utterly. She was swallowed up in household details, could be seen
meditating on ‘menus’ while the most fantastic notions were flying
swiftly between her husband and her cousin. Her life was now
consumed in coping with the cook; she was completely happy in her
task, and it was with growing readiness and growing wrath that
Kingston let her drop from his mental intimacy. She filled up time by
talks with her mother-in-law, who had a dower house down the
valley. The somewhat woolly mind of Lady Adela was very congenial
to Gundred, and her small, clear-cut nature found it both
harmonious and restful—like her own, though so utterly unlike. The
two women took refuge in each other; and Gundred, taken up by
the house and Lady Adela, would not have had the leisure, even had
she had the acumen, to remark how completely she was passing out
of her husband’s life.
‘Is the house insured?’ asked Isabel one morning. Kingston and she
were sitting together under the long wall of the picture-gallery.
‘I don’t know,’ he answered; ‘I always forget things like that. My
dear,’ he cried, calling to his mother, who had walked up across the
fields with her knitting, and now had established herself in one of
the cushioned window-seats close to Gundred, who was
methodically checking a Stores List—‘my dear, is the house insured?’
Lady Adela answered in the affirmative, and Gundred made haste to
clutch her share in a conversation that she could understand, by
swiftly affirming that, if not, it ought to be at once.
‘Otherwise one feels it such a responsibility to live in a house—yes?’
she added.
‘I don’t like betting and gambling,’ replied Isabel, assuming a manner
of exaggerated rectitude.
‘My dear!’ protested Lady Adela, looking mildly up at her over her
spectacles. If Lady Adela could dislike anyone, she disliked her
daughter-in-law’s new cousin. Deep in her heart she condemned
Isabel as strong-minded. Tiresome and strong-minded.
‘It’s a gamble with Fate, you know,’ explained Isabel; ‘all insurance
is, of course—having a bet on with the Almighty that He won’t burn
down your house or throw your train off the rails.’
‘My dear!’ protested Lady Adela again.
‘You have such strange fancies, Isabel,’ said Gundred coldly. ‘You
always think of things that no one else would think of.’
Clearly, as delivered in Gundred’s neat, precise tones, this was the
final expression of righteous disapproval.
‘My feet must be extraordinarily small,’ said Isabel to Kingston. ‘I
seem to be always putting them into it. They go into the most
incredibly tiny loopholes. I don’t believe I could walk across the lid of
a pepper-pot without putting my foot into it somehow.’ She stuck out
both her feet in front of her, and gazed at them dispassionately.
The action may have been an instinctive appeal for admiration. The
feet, though large, were beautifully shaped, with a suggestion of
strength and swiftness in their lines. But Kingston angrily compelled
himself to notice that they overlapped their shoes, that one shoe
had lost its buckle, and that the stocking above each descended in
wrinkles that betrayed a weakness in the matter of suspenders.
‘Cover them up,’ he said. ‘Mine eyes dazzle.’
‘They haven’t died young yet, though,’ replied Isabel, finishing the
quotation. ‘Perhaps they will, though—the feet, I mean.’
‘Why do you ask about insurance, Isabel?’
‘I was thinking that you might welsh the Powers that be, and burn
the house down, and get the money to build a decent one. This
great garish glassy palace is not a bit at home here among the hills.
You want something sombre and quiet and self-sufficient as they are
—something that will be at ease with them. This house of yours is
about as much at ease among the hills as a brewer’s wife having tea
with half a dozen Dowager-Empresses. You want a building that
won’t be fussy and assertive.’
‘Then want must be my master. You have the most placid way of
suggesting things. Do you always get what you want yourself, quite
irrespective of the means?’
‘What is the use of wanting things,’ said Isabel defiantly, ‘if one
doesn’t get them? One might as well never want them.’
‘But what about other people? If they object? If you can only win
over their dead bodies?’
‘Oh, they must look out for themselves. Every herring must hang by
its own tail. It is everybody’s business to get what they want. If they
can prevent me from doing as I wish, why, then they may; and if
they can’t, well, I romp in; and if they get in my way while I am
doing it, why, so much the worse for them. They go under.’
‘There’s your crude individualism again,’ protested Kingston. Then he
turned to his wife, determined to bring her into the dialogue. She
was soberly conversing with Lady Adela over the Stores List.
‘Are you an individualist, Gundred?’ asked her husband. ‘Isabel’s a
terror; she has no respect for other people.’
Gundred finished her sentence calmly.
‘Besides, they say that spotted ones are bad for the eyesight,’ she
concluded, then prepared to answer her husband. ‘What did you say,
dear? Of course one must respect other people, or how are other
people to do the same to us?’
Unlike Kingston, Isabel was inclined to resent her cousin’s invasion.
‘Oh, Gundred doesn’t count,’ she cried. ‘Gundred’s a civilized woman.
Now, you and I are only pagans, Kingston.’
‘My dear, dear child,’ exclaimed Lady Adela, unspeakably distressed,
‘Kingston is nothing of the kind, I am sure!’
‘Don’t trouble about Isabel,’ explained Gundred. ‘She is always
talking nonsense—yes? Nobody ever cares what she says. Go on
talking to Kingston, Isabel, but really you must not interrupt us any
more. We have our duties, Kingston, and you idle people must not
disturb us.... Dear Lady Adela, do you really think we want a dozen
of those common table-cloths?’
Kingston and Isabel were silent for a moment, listening to Gundred’s
conversation with her mother-in-law.
‘Well, I always believe it is best in the long run to get rather too
much than too little,’ replied Lady Adela, pondering the question.
‘Besides,’ amended Gundred, with a more cheerful air, ‘they might
give one discount on a quantity.’ Nothing should induce her to waste
the superabundant Darnley wealth. She licked the tip of her pencil,
prepared to tick off table-clothes with a lavish hand.
‘Would you say at eight and six each, or at nine shillings?’ she asked
anxiously, poising the pencil in indecision.
‘Oh, for the servants, my dear, eight and six will be ample. They
wear out their things in no time. It is quite shameful that they
should be wanting new ones already. I got them a whole supply only
the year before last.’
Gundred cluck-clucked.
‘Dear, dear,’ she said, ‘that Mrs. Bosket must really be a very careless
woman—yes? And she tells me that new sheets are wanted as well—
sheets and pillow-cases, dear mamma.’
‘My child, how truly dreadful!’ answered Lady Adela. ‘You must
certainly keep a close eye on Mrs. Bosket, though I do trust the poor
thing is honest.’
‘Oh, perfectly, and most obliging, but not equal to responsibility. One
so often finds that in a household. And it is so important to have an
efficient head—yes? I feel that one cannot safely leave her the
ordering of things like this, for instance. I have to do it myself.’
Had she had ten housekeepers—had she been the daughter of two
reigning sovereigns—Gundred would still have insisted on ordering
the table-cloths herself. It was her nature, but she made a virtue of
her nature’s necessity, and fell to weighing the comparative merits of
pillow-cases at half a crown and at three and six. Half a crown was
eventually fixed on.
Isabel looked at Kingston. She saw that Gundred’s dialogue had
irritated him. Why his annoyance was so keen she hardly knew. He
himself would have been puzzled to account for it. Her eyes
triumphed as she watched him, and obviously rejoiced at the defeat
of his effort to pull Gundred into their talk.
‘That’s all you are likely to get out of Gundred for an hour or two,’
she murmured.
‘Martha is a much more pleasant, useful person than tiresome, head-
in-the-air Mary,’ he flashed back at her resentfully.
‘Especially to talk to,’ replied Isabel mildly. ‘As a matter of fact, a
man wants both sorts—a Martha-wife and a Mary-wife: the Martha-
wife to air the beds and order the dinner, and the Mary-wife to look
at and talk to. Most of the tragedies in history have arisen from a
man’s failure to get the two in one person. Lucky men have an aunt
or a sister, as well as a wife, to fill the second part; but generally a
man either has a Mary-wife who talks brilliantly, but feeds him on
cold mutton, or a Martha-wife who will order a good dinner, but can
only talk about the servants. And then he looks round for someone
to think about meals, while Mary discusses the soul; or to discuss
the soul while Martha is interviewing the cook. And then there are
complications. The whole system is wrong. People ought to be much
freer to get what they like.’
Kingston resented Isabel’s tranquil description of the Martha-wife. It
had nothing to do with any case they knew of. To talk about it was
silly impertinence.
‘Individualism again,’ he answered. ‘You are an anarchist, Isabel, like
all egoists. Anarchy never pays in the long run.’
‘No,’ admitted Isabel, ‘one has to pay for it in the long run, of
course. But until the bill comes in one has a good time—quite worth
the price one has to give.... Ask the lady behind you. There is a
triumphant instance of the Mary-wife, and the egoist, and the
individualist, all in one. She died for it at last, but she had all she
wanted while she lived. That is me; I’ll die gladly, but I mean to
have all I want till then.’
Kingston turned to look at the picture to which Isabel pointed. From
a background as dark as her end there smiled out at him,
enigmatically, whimsically, the face, so much more prudish than
passionate, of a woman so much more passionate than prudish—the
face of Anne, “Marquis” of Pembroke, concubine and Queen.
‘So there is your model,’ he answered her contemptuously. ‘Well, she
had her way, and her way led her to the block on Tower Green.’
‘Let it. What does that matter? It had led her first over the scarlet
cloth of a throne. The price was heavy, yes, but she always knew it
would be. I expect she was even glad to die at last, and have rest,
and be out of all her glorious, dreadful suspense. And the splendour
she bought was worth it. What do I care for the bill I may have to
settle some day? If I want a thing, that means I intend to have it.
Do you think a beggarly consideration of economy would stop me?
Thank Heavens, I am not a miser. Why, to haggle over Fate’s
account would be like Gundred wrestling for a twopenny discount off
a pillow-case. No, Queen Anne and I know better, don’t we, your
Grace?’
Isabel rose and stared into the picture. The pursed lips, the sly,
slanting eyes beneath their demure lids, responded mysteriously to
her gaze. This was not the woman that Holbein drew in the last
hours of her tragedy, weary, worn, and haggard; this was the Queen
of his earlier paintings, as he and Lucas Cornelisz saw her in the
radiance of triumphant battle, the fierce adventuress-soul that, with
nothing in her favour—neither beauty nor position nor wealth—and
with everything against her in the fight—a kingdom, a wife, a Church
—yet by sheer force of brilliancy, courage, and charm, fought her
way at last, through the wreckage of a religion, to the throne of a
Queen.
‘Your Grace,’ said Isabel, ‘you and I are friends. You were a pagan
like me. What you wanted nothing could stop you from getting,
neither armies of enemies nor any silly dread of the price to pay at
the end.’
‘I wish you joy of your friend,’ said Kingston, filled with inexplicable
hostility. ‘Ask her what she thought of it all at the end; ask her what
she felt that last night at Greenwich, when the King had deserted
her, when she was still treated as Queen by people bowing and
backing and saying “Your Grace” to her, who in their hearts were all
stealthy enemies from whom there was no escape (with bets among
themselves as to when her head would be off and a new Queen
crowned); when she had to be brave and royal among all those
crowding black, invisible dangers, under the descending shadow of
the axe. Don’t you think she wished then that she had not been such
a pitiless individualist? Don’t you think she wished then that she had
been allowed to live and die plain Lady Northumberland?’
‘Brave and royal you were, your Grace,’ cried Isabel to the picture.
‘You never regretted, did you? If you had, you would have been a
poor lath-and-plaster creature, unworthy of what you did. Your
nerves gave way for an hour or so. They had been at full stretch for
three terrible years of crowned suspense. So it was no wonder they
snapped just for a moment in your fall. But it was not death you
were afraid of; it was just the crash and the dying. You were a
Queen at heart. You fought for your life as a Queen, and in the end
it was as a Queen you died. Nobody else, not even in that strong,
brutal time, died in such an exaltation of gladness.’
‘An egoist should not be an idealist as well,’ protested Kingston. ‘You
make too pompous a song about a peddling adventuress put
shamefully out of the way by a political job.’
‘Take care,’ cried Isabel. ‘When I knew her Grace, she was not a lady
to be spoken lightly of. Her enemies only killed her because they did
not dare to let her live. Even her worst enemies dreaded her
cleverness and her courage. And her dying words must have taken
the skin off her husband’s back when he heard them. The demure
gentleness of them, the vitriolic irony of them! You may have been
“spiteful, flighty, and undignified,” your Grace, but you were
splendid, terrible, indomitable. And you must have been marvellously
charming when you chose, you plain, prudish-looking creature with
six fingers and the devil’s temper. There’s a Mary-wife for you, to
hold the interest and curiosity of the King, while his poor good
Martha of a Katherine was everlastingly saying her beads and
hemming shirts.’
‘My dear Isabel, I tell you that the song of history is “Pay, pay, pay.”
If you want to follow Anne Boleyn, you must follow her all along the
road.’
‘My dear Kingston, history may sing “Pay, pay, pay,” but it sings to
deaf ears when it tries to impose its twaddling threat on well-bred
souls. Only stupid, parvenu people ever think of reckoning up the
cost of anything beforehand. It’s the hall-mark of recent wealth to
be sparing of its pence. One does not bother about such things. One
buys first, and only asks the price when the time comes to pay the
bill.’
‘And then the price may make you bankrupt.’
‘Oh no. Fate’s bills are paid in courage, and I hope one would never
be bankrupt of that. I think I shall always be able to settle up. One
plunges, like Queen Anne. Your Grace did not stop to haggle. You
and I go boldly forward, order what we want from the Stores of Life,
and don’t give a thought to discounts and reductions and Summer
Sales. And then, when the time comes, we fork up with a will, and
pay out our uttermost penny.’
For a moment Kingston did not answer her. He stood looking into the
secretive face of the Queen. Gundred’s voice broke the silence.
‘I know where one can get them at two and six,’ she was heard
remarking in her clear, level tones.
‘There’s Queen Katherine arranging the household,’ laughed Isabel,
with insolent regardless frankness, ‘and here is Queen Anne ordering
a crown across the counter of life. No discount asked, and only the
best required.’
Kingston looked at her with rage in his eyes. She was always saying
crude things like that—things that roused in him swift opposition and
dislike. Yet he remained helpless, as if bound by a spell. And her
indifference to everyone’s opinion was so profound, her scorn of
conventions so sincere that no reproach could be brought home to
her. She had no common standard for measurement by the rules of
the world. One might as well have attempted to reprove a savage for
going naked, or an Englishwoman for going clothed.
‘Well,’ he said at last, ‘I hope your bill will be as heavy as Queen
Anne’s; then we shall see how you behave when it comes to paying
for it.’
‘But perhaps I have not really decided what I shall order from the
shop-keeper?’
‘Oh, well, I neither know nor care,’ replied Kingston savagely. ‘And
you don’t seem to have the decent instincts of the real honest buyer,
either. From the anarchistic things you were saying a few minutes
ago, I should have thought you would have been a shop-lifter, pure
and simple, going in and stealing whatever you wanted, without a
thought of paying for it.’
This time he had touched her. She flushed.
‘Oh no,’ she said. ‘When it comes to the big things of life, I am as
honest as the day. Love and hope and so on I should expect and
intend to pay the top price for—pay it thoroughly to the last farthing,
sooner or later. I am only an anarchist in little things. I might steal
for a fancy, and assert my individualism for a whim, but really, really,
Queen Anne hasn’t a thought of bilking when she orders her crown.
Whatever I buy I shall pay good money for, Kingston—pay it
ungrudgingly, if I have to die for it.’
Her earnest face, as she turned it to his, burning and eager, had a
strange fascination. He turned roughly away towards his wife.
‘We are talking about Anne Boleyn,’ he cried, raising his voice to
penetrate Gundred’s attention—‘how she had her fun, and then paid
the money.’
‘And nine is twenty-one,’ answered Gundred, completing her
sentence in mechanical tones.... ‘What, dear? Oh yes, Anne Boleyn,
poor little thing! so dreadfully treated by her husband. The first
martyr of the Church of England.... And now, about prunes,
mamma?’
Kingston, angry and disappointed, turned again to Isabel. Primly,
inscrutably, Queen Anne smiled down upon them from the wall. She
had heard about that martyrdom before. She knew better. She had
been the martyr of ambition, not of dogma; she sold her life for a
crown, not by any means for a faith. And she thought her
martyrdom the grander. In her passionate mysterious heart she
pondered Isabel’s brave declaration, and wondered whether the
modern woman, too, would be content to pay her debt, when the
time should come, for the big things she had ordered at the counter
of Fate. Beneath the riddle of her smile Kingston and Isabel fell once
more a-talking, while across the room Gundred was still ticking off
groceries, and exchanging plans of household economy with her
mother-in-law.
CHAPTER X
‘Yes, very, very pretty,’ said Gundred approvingly. ‘No sugar, thank
you.’
Delicately, with neatly-lifted little finger, she raised her cup and
sipped. From top to toe she was the fine flower of deportment, and
her manner exhaled a mild consciousness of being the perfect model
of decorum for the country neighbour on whom she was conferring
the honour of a call. The afternoon being brilliantly fine, Lady Adela
had wished to take her daughter-in-law to call on some intimate
friends of hers, proprietors of a celebrated view, who lived on the
other side of the lowland valley that stretched beneath the glen of
Ivescar. Gundred was happy in the opportunity of exacting provincial
approval, and, against everyone’s wishes, including his own,
Kingston had insisted that he and Isabel should join the polite
pilgrimage. Accordingly the landau had duly sallied forth with its
burden of four, and after more than an hour’s drive through the soft
country beneath the hills, had brought them to their destination.
Now, on the famous terrace of Blakebank, Gundred sat full in the
light of her hostess’s admiration, consuming cakes and tea with her
usual crisp yet ethereal daintiness.
‘The lights on the hills!’ cried Mrs. Norreys ecstatically, anxious that
Mrs. Darnley should appreciate the full beauty of the prospect.
‘Delightfully pretty,’ replied Gundred, casting a comprehensive glance
across the world. ‘One quite envies you, Mrs. Norreys. We have no
view like this at Ivescar. A charming place to have tea, out on this
terrace. Oh, thank you. How greedy I am!—yes? But this air makes
one so famished, and these little cakes of yours, so delightful.’
With a sweet smile Gundred accepted a second cake, and devoted
her whole attention to its decent consumption.
In front of Blakebank the ground sloped away sharply to the river far
down below. Dense woodland filled the hollow in which the water
flowed, and rose again in a blue foaming mass on the farther side of
the valley. Thence the eye followed undulation after undulation of
meadow and copse, fields of soft green, plumed hedgerows, a placid
country full of opulent peace. The foreground of the picture was
formed by a strip of meadow beneath the terrace that dropped in a
steep brow towards the woods. Here the grass was hidden and
gilded by a sheet of buttercups, and the pure ardour of their gold
was touched to a keener fire by the shafts of sunlight that slanted
across them. Beyond their blaze lay the voluminous splendours of
the woodland, dull and heavy in sullen shadow. For the day had its
sharp notes of contrast. The air was leaden and lurid, dazzling, here
and there, with a golden rain of sunlight, and here and there, again,
made sombre by thunderous masses of cloud. Huge curling crags of
purple and silver rolled and towered above the world, and the sky
was opalescent with a hundred shifting colours. The landscape,
drowsy and complacent, was transfigured into something mystic and
dreamy. From the poignant glory of gold in the foreground the eye
wandered on over the steamy blueness of the woods, over the
rippling waves of vaporous green and blue that filled the valley, to
where, seeming very far away across the glamour, the great rampart
of the hill-country lay high against the faint rosy lights of the north.
The lowering air, the sleepy, fantastic colours of the day, seemed to
remove things distant to another world, and the mountains, dim,
misty in shades of amethyst and azure, hardly appeared distinct
from the ranges of cloud amid which they faintly loomed. Far away,
far above the valleys, they lay in crests and billows of dreamland
along the border of a fairy world. Yet only six miles of comfortable
peace was all that lay between Gundred at her tea and those
mysterious giants in the haze.
Full in the middle of that walled horizon, isolated on all sides, rose
the mass of the Simonstone, unrolling his apathetic splendour on the
ranges of lesser hills that formed his throne. In steep, precipitous
slopes his lines dropped abruptly to the western valley; to eastward
they trailed away in long, placid curves. The ranges of white
limestone that formed his pedestal shone dimly pink across the
distance, and the towering bulk of the mountain was lucent as a
carved sapphire from crown to base. His sheer stern western cliff,
his flat summit, loomed disdainfully over the sleepy valleys at his
feet; and his presence, serene and enormous, ruled the whole
country with the inevitable weight of its majesty. Steep glens in the
range divided him from the heights to either side; he stood out the
conspicuous tyrant of the horizon. Away to the right, over a range of
smaller fells, the leonine head of Ravensber stood up in secondary
authority, and above the western cleft where Ivescar incongruously
squatted in the undiscoverable distance, rose the slouching back of
Carnmor. But of the trinity that dominated the hill-country,
Ravensber and Carnmor, the lesser and the greater, were both
subordinate to the imperious sweep of the Simonstone. Here, from
the terrace of Blakebank, in the complete contemplation of his
grandeur, might be perceived the full grotesqueness of the insolence
that had planted Ivescar beneath the sombre glory of his shadow.
From that parvenu house itself the blatancy of the contrast was not
so evident; for Carnmor and the Simonstone were both shut out
from view by the amphitheatre of white cliffs that closed in the glen,
and gave support to their dominating mass. But to Blakebank, far
away, the whole supremacy of the hills lay revealed in all its
greatness, and their empire seemed, in the mysterious clouded lights
of rose and blue, to belong to a world that had no knowledge of
man or his evanescent doings. Gundred, meanwhile, having finished
her tea, began to think of departure. She set to work delicately
drawing on her gloves and preparing her farewells.
‘Such a long drive—yes?’ she said; ‘I am afraid we must really be
starting, Mrs. Norreys. My husband’s aunt is coming to us to-day,
and we ought to be home in time to receive her.’
The carriage was ordered, and the party stood exchanging
compliments and politenesses.
‘Such a delightful day,’ said Gundred, ‘and a drive home in the
evening so charming in weather like this—yes?’
‘You will have a lovely view of the hills as you go home,’ replied Mrs.
Norreys. ‘You will have them in front of you all the way. Do notice
the sunset-lights; too exquisite they are.’
Long habit had developed in Mrs. Norreys a proprietary manner
when she talked of the distant hills that made the attraction of her
terrace. She spoke of them as a successful actor-manager might
speak of a scene that his own great skill has contrived and arranged.
‘Charming, charming!’ answered Gundred, with the enthusiasm
which everyone thinks it a duty to manifest for landscape, though
the true intelligent passion is so rare and sacred.
Then the carriage was announced, and the party from Ivescar
embarked on their homeward voyage.
Kingston and Isabel had not contributed much to the gaiety of the
entertainment. They had been possessed with the delight that
Gundred had merely expressed. To them the beauty of the world as
it lay unfolded before them had been so vast and holy as to make all
comment obtrusive and irreverent. Kingston had felt the unspoken
sympathy of Isabel’s mood, and her silence had mitigated for a time
the feverish animosity with which he regarded her. As they drove
home, there was little conversation between the four. Now and then
Lady Adela made some remark on Mrs. Norreys’ kindness, her
charm, the successful blend of her tea. But even Gundred was
feeling too serene for speech. Everything combined to make her
happy. Her gown was a perfect fit, the evening was comfortable, and
she was conscious of having given her hostess a flawless model to
copy—in manners, conversation, hair, and hat. Of course she never
doubted her faultlessness or felt a qualm, but there were moments
when its lovely perfection came upon her in a compelling wave of
pleasure. She sat in a rapture of satisfaction as the carriage whirled
her home through the quiet sunset. Tea and a good digestion
assisted the placidity of her mood, and the influences of the
atmosphere collaborated to make it complete. The twilight was pink
and sweet as Gundred’s own opinion of herself. Immovably tranquil,
roseate and mild, it had the fascination of a drowsy fairy tale.
Cowslip and bean and hawthorn sent her their tribute in wafts of
fragrance. She accepted everything as her due, and felt that all the
world was showing a very proper spirit in conspiring to do her
honour.
So their road led them up and down the gentle slopes that filled the
valley with ripples of green. Sleepy old farmsteads they passed,
nestling in dense knots of verdure, and villages with their brilliant
little strips of garden. The day’s work was over, and in the clear air
rose the song of peace and rest. Only far above, over the nearing
mass of the mountains, rose stormy ranges of cloud, flushed and
splendid in purple and gold. And so at last they had done with the
broad lowland, and the road set itself to mount up towards the high
glen of their destination. Now the country changed. Below lay the
wooded, feathery richness of copse and hedgerow, meadow and
pasture. Stone walls began to replace the hedges, stiff wiry moor-
grass the lush growth of the valleys; the framework of the earth was
near the surface; the soil became a thin stretched skin, no longer a
warm soft coat of flesh; here and there the film broke, and the
limestone bones protruded. So the road wound its way to the upper
levels, and climbed at last to the glen between the hills. Far ahead of
them it streamed away up towards Ivescar—an undulating stripe of
whiteness. Above, to their right, rose, stiff and stark, a wall of white
rock, shutting out from sight the mountain above. To their left lay
the narrow desolation of the defile, a stream meandering among
sparse meadows, with here and there a bare barn or a farm
surrounded by a few wind-tormented trees. And beyond these again,
towered the farther wall of the valley, another escarpment of long
limestone cliffs, which could be seen rising tier upon tier to the first
brown and violet slopes of Carnmor. The road, hugging the western
precipice, commanded a full view of the valley’s eastern rampart, but
of the cliffs overhead revealed only the first and lowest range. This,
in the sunset-light, was radiantly pink, but the sheer rocks across the
stream, cut off from the light, were grey and grim, rising up in bank
upon bank towards the moors above. No colour touched them, no
softness made them lovable. Their inhospitable, irreconcilable
sternness foreshadowed the abomination of desolation, and gave the
valley a stony, lifeless melancholy that recalled the land that once
flowed with milk and honey, but is now a wilderness of sterile stone.
As the road led on up the narrowing pass, so the shadows deepened
across the way of the travellers. Suddenly, however, the western wall
of cliffs overhead, now no longer touched by the sun, dipped in an
abrupt cleft; and there, very far above them, hung the sheer
western face of Simonstone. Keen, precipitous, menacing, the mass
of the mountain impended suddenly over the valley, and the
apparition was almost terrifying in its unexpectedness. Another
twenty yards, and the lower ranges would once more conceal it from
view; here, for a swift moment, it revealed its over-lordship of the
glen at its feet. Behind and over its brow high volumes of cloud
stood stationary, and in the glow of evening the mountain and all
the upper air was rich with a glamour of amethyst and hot violet.
Gundred was dominated by this revelation, and her powers of
expression rose to the emergency.
‘Oh, look, how pretty!—yes?’ she cried, indicating the obvious with a
neat wave of her neat hand.
Never had her gift for inadequacy burst upon her husband in such a
terrifying flash. For a moment he could not speak.
‘Quite good,’ he answered at last, incapable of saying more to a
woman who would have been incapable of understanding it.
Isabel remained silent. Her eyes were fixed. Then she put out her
hand in an eager gesture to stop the carriage.
‘Stop them, Gundred,’ she cried; ‘I want to get out. I am going up
there into the glow and the glory. I am tired of this dull grey world.
Kingston, come with me. Let us go and be gods on the heights.’
Gundred saw consent in her husband’s eyes. The carriage was
stopped.
‘Well, don’t be late for dinner, darlings,’ she conditioned. ‘Remember,
Aunt Minna will be arriving. Do you really think you will have time?’
‘What does time matter!’ exclaimed Isabel rebelliously. ‘There is no
such thing.’
Kingston would have liked to go alone. Gundred had just succeeded
in irritating him, he felt, to the last point of endurance. Her bland
impenetrability was nothing short of tragic. Nothing could ever teach
her what to say and what to leave unsaid, for nothing could teach
her to feel. She had the sublime elephantine tactlessness of perfect
self-satisfaction. Her husband, for one wild moment, wanted to get
away from it all—from Gundred, level, monotonous, stodgy, yet
unsatisfying; from the dear good old mother who did not count, who
never could count; from Isabel, tormenting, tantalizing, odious
Isabel. To be alone, up there in the radiance, far above the world of
desire and dissatisfactions—that would be, at least for half an hour,
rest and relief. But he was to have none; Isabel was to come,
emphasizing at every point the exasperating perfections, the
exasperating limitations of his wife. With her usual primitive
clumsiness, so utterly at variance with Gundred’s well-drilled
movements, Isabel flounced out of the carriage, alighting with a
jumping flop that brought down a coil of hair and a shower of pins.
Kingston noticed that, as usual, her placket was open. He waited in
silence till she should have finished her untidy adjustments.
Gundred repeated her injunction.
‘Aunt Minna will be so surprised if you are not there in time to
receive her,’ she said. ‘Do be certain that you have time, darling.’
Kingston forced himself to speak. ‘Ivescar is just over the hill,’ he
said. ‘We shall be there as soon as you. It will be a short cut—up
one side of the Simonstone, and down the other. Are you ready,
Isabel?’
Yes, Isabel had finished tucking up her skirt. It was a skirt as
inadequate for visiting as for mountaineering. And now she had
bunched it up on one side to give her legs full play, and its effect
was not only incongruous, but lumpy and lopsided. However, for
such matters Isabel cared nothing. She was ready. Without another
word, Kingston turned aside and opened a gate. Together they
passed through into the field bordering the road, on their way to the
copse above, that sloped up to the limestone cliff, and so led on to
the heights overhead. Gundred watched them go. A faint, a very
faint ripple of doubt trembled across the calm waters of her self-
complacency. She had the strangest, the most ridiculous, the most
unheard-of feeling that in some way she had not been at the height
of the situation. In some way, she had a dim instinct of having
failed. As the carriage drove on, she suddenly found herself feeling a
little lonely, a little cold.
Kingston and Isabel wrestled their way to the cliff’s top, and found
themselves on a flat floor of scar limestone that led straight away to
the long, swift slope of the mountain. As if arranged by mortal
hands, the blocks of white stone made a regular pavement, like the
wrecked foundation of some Cyclopean temple. Between each block
was a deep, dark rift, where ferns and lilies of the valley, and
strange flowers with white plumy spires flourished in the shelter
where no wind could ruffle them. Together the wanderers crossed
the level, leaping and balancing lightly from rock to rock. Then
heather and sedge began to break the even surface of the paving,
and soon usurped its place altogether. Thence, to the summit, was
nothing but moor and whortleberry, steep slopes of shale and grit.
Kingston and Isabel addressed themselves resolutely to the ascent.
Steep and arduous as it was, they had neither time for breath nor
talking. They climbed strenuously, silently, taking pride in each step
that proved their mastery over the earth by lifting them steadily
higher, foot by foot, on the flank of the mountain that had seemed
at first too vast to be conquered by any movements of so
infinitesimal a creature as man. Slowly but certainly they found
themselves advancing up the stark ladder of tussock and poised
boulder. Each stone that they dislodged rolled crashing into farther
depths, and at last they found themselves moving into the cold
shadow of the clouds that evening seemed to be drawing down
upon the summit. The crown of the mountain was now beyond their
sight, cut off by the fierce angle of the slope; but they could see that
the upper air was still aglow with sunlight round it, though the
volumes of dark vapour seemed to be growing and darkening.
Suddenly the acclivity took a swifter line, then paused for a moment
from its labours. Surmounting it, they found that the ground lay for
a few yards in a gentler curve, and there beyond, straight above
them, was the summit, glorious and crimsoned. A last eager
voiceless effort, and they had attained it. Around them whistled and
hurtled a sharp wind, and before stretched away the round level
plain of the hill’s crown.
It was with a sigh of relief that the climbers rested and faced round
to see the extent of their conquest. The whole world far beneath
them was misty, ardent, gorgeous in the glamour of evening.
Kingston and Isabel made their way to the ruins of the old cairn that
had sent northward the news of many centuries. Among the
scattered, rough-hewn boulders they settled themselves for an
interval of repose in achievement. Behind them rose the ruined wall
of the beacon tower that had talked, in its day, of Queen Jane and
Queen Mary, of the Armada’s coming, and the passing of the Tudors.
Before them, unrolled at their feet like a map, two thousand feet
below, was all the splendour of the earth, phantasmal and glorified—
tiny towns, and the worm-like track of great rivers, the minute
tessellation of meadows, and the dim velvet of wide forests. The
whole air, before them and beneath, was a-tremble with motes of
gold. Gold filled and pervaded the atmosphere, confounding detail in
a haze of glitter, and softening the great dazzling stretches of the
western sea into an imperial harmony with the golden heaven and
the golden earth.
Kingston Darnley looked out across the glowing mystery beneath
him. Rest, profound and eternal, seemed to be enveloping him. In
reality, the very foundations of his nature were stirred and stirring.
Insensibly, through the heat and worry of the foregoing days, his life
had been growing ripe for a great upheaval. Slowly the tormenting
desires, the incessant, unacknowledged hunger, the uneasy, restless,
emotional uncertainty, the strenuous nourishment of artificial
feelings, had all combined to bring his restless unhappiness to a
head. Through unacknowledged storm and secret stress he had
come at last to that deceptive calm which precedes the breaking up
of the soul’s settled weather—the discharge of the soul’s
accumulated electricity in a devastating nerve-cyclone. To-day his
endurance of himself and his own forced contentment had touched
its limit. Gundred had given him the last least touch that was needed
to destroy the perilous equilibrium of his mood. Unconsciously he
was waiting, in a breathless interval of suspense, for the crash of
thunder that was to precipitate the crisis, and clear the air of all its
unhealthy restraints.
Suddenly as he lay there, with Isabel silent and watchful at his side,
the glory of the world shivered coldly and vanished. A black shadow
swooped over the mountain-top, and soon only the uttermost
distance retained the glimmer of gold. Down, down upon the old
cairn sank, like the portcullis of a fairy castle, a heavy curtain of
darkness, shutting out all that was left of the gleaming distance. The
cloud was upon them. And, as their gaze was fixed on the gloom
descending from above, no less abruptly, no less silently, in grey
coils and whirling streamers the mist curled up at them from
beneath, rippling and foaming over the rim of the mountain, as a
devouring wave sweeps round an islet and over its crown. In an
instant the world was blotted out by the white darkness. Uniform,
monotonous, it obliterated everything. Only the old cairn and a few
yards of ground around it could now be seen. Kingston and Isabel
were cut off from the earth, set alone as Deucalion and Pyrrha in a
new sphere, one solid point amid a vast ocean of chaos....
‘So much for the glory of life,’ said Isabel.
Kingston rose. ‘I don’t like this,’ he replied. ‘It will be the very
mischief to get down again. Come and help me find a way.’
Together they moved away from the old cairn into the mist. As they
went it widened before them, revealing a few dim feet of distance,
then closed in again behind. Through the drifting pearly gloom
objects were strangely magnified, made mysterious, portentous;
rocks became monsters looming through the darkness, the level
crown of the mountain, shifting fantasy of vapour. The ground
beneath their feet seemed to swirl and shift with the movement of
the fog, and, now that shape and colour had vanished from the
world, an enormous crushing silence dominated the air. Faint and
melting before their eyes stretched away the few visible yards of the
flat soil, covered with short sedges, and, among the loose piles of
grit, with a thick growth of little mountain-sorrel, whose brilliant reds
and yellows had been levelled by the blank twilight into a sombre
note, as of stale blood spilled out among the stones. Then, beyond,
the solid earth wavered away into a phantom, revealing here and
there a rock or a patch of grass, uncertainly, evanescently, as a faint,
half-guessed shape, as the mist lightened or lowered.
So they wandered carefully on across the plane of the summit, till
suddenly, ahead of them, grim and mysterious, rose a long grey
barrier fading to right and left in the profundities of darkness. It was
the old boundary wall of the summit, built by Celtic kings in the lost
ages when the hill-top was the last great British outpost in the north.
Humped, shapeless, an indistinguishable mound of stone, the old
wall remained intact, running round the plateau in a solid ring,
unbroken except at the point where the beacon tower stood.
Knowing that outside its precinct cliffs and pitfalls awaited the
unwary, Kingston and Isabel turned, and set themselves to follow it
on its circuit, hoping to find an outlet or a path. At one point they
came on a small stone chamber built into its bulk, but no sign of
gateway or track could they discover. Now they were crossing a bare
part of the summit, a wilderness of rocky wreckage. Here and there,
at short intervals, great rings and semicircles of half-buried stone
could be divined in the level of the soil, foundation-lines to show
where the huts and palaces of the Celtic kings had stood. Now they
were but dim ridges, grown with dwarf sedge and sorrel, through
which roughly burst the gritstone bones of their fabric. Adventurous
climbers of the mountain had had their fun of the rocks that former
occupants had made their houses and defence. Often the flat, hewn
blocks had been lugged from their places by modern hands, to be
arranged in some riddle or motto. One ambitious tourist had
perpetrated a great design. Kingston and Isabel came suddenly upon
it. It stretched bravely across the earth, a device of big boulders,
carefully arranged. ‘I love you,’ it said to them, in its audacious, solid
letters. ‘I’ and ‘you’ at either end of the legend faded away into the
white obscurity beyond, and at their feet lay ‘love,’ obtrusive,
unconquerable, built of sound stones so square and firm as to defy
the enmities of time and weather.
‘I love you,’ read Isabel slowly.
Hitherto few words had passed. Words, in that blanched silence,
seemed futile and impertinent. There was in that vast loneliness of
the mist a sense of intimacy too close to be profaned by speech;
man and woman were alone, two halves of one primitive creature, in
a primitive, floating chaos, where nothing else, as yet, had taken
shape. How could such a drifting void hold anything so formal as
speech? Speech belonged to that forgotten world of things visible
and tangible, that world where other human beings lived, and there
was light, sound, movement. Here, in the level, immovable silence of
the primeval twilight, Kingston and Isabel found the intervening ages
swept away.
They had gone back into the dim time before the dawn of the world,
when there was nothing more than this poised existence, vague,
voiceless, pervasive.
‘I love you,’ repeated Isabel, studying the tourist’s device—the
blatant modern cry breaking into the abysmal stillness of old chaos.
Kingston, with an effort, tore himself from the white mist of fantasy
that had closed in upon his mind. The gloom suddenly held dangers;
they loomed ahead. He had a dim sense that something unseen was
moving towards him out of the swirling uncertainties around.
‘It’s no good,’ he said. ‘We shall have to stay here till the clouds lift a
bit. I simply can’t pretend to know my way. We should probably
wander half over the moors, and go on in a circle till we got
hopelessly lost or fell in a pothole. What a fool I was not to watch
the sky! However, if the worst comes to the worst, you can shelter in
that little shanty, and I don’t expect Gundred will be anxious; she
never is.’
‘Read what this creature has written,’ said Isabel. ‘It sounds better in
a man’s voice.’
Kingston looked down at the straggling stone letters at his foot. ‘I
love you,’ he read. Then he looked up at Isabel.
She was facing him. The motto lay between them. Her face, against
the luminous pallor of the mist, was burning, aglow, filled with a
strange triumphant challenge. Suddenly, with an appalling crash of
thunder, the fantastic world in which he had lived so long shattered
and broke about his head. He saw the call in her eyes, understood it,
answered to it, helplessly as a bound slave. This was the one woman
in the world. He had known her since the beginning of time, been
with her since the creation; now at last she threw aside her veils,
and stood before him, no longer a stranger, but the lost part of his
own soul—that lost part for which he had so long been vainly
seeking. Now, in an instant, he recognised the cause of all his
enmity, his unrest, his gnawing hunger, the incessant angry cravings
which had tormented him. Hitherto he had not seen the truth; he
had guessed it. And those guesses, painful, secret, stifled—they had
engendered all the throbbing hostility, all the restless enmity with
which he had regarded this half-recognised intruder into his life.
Now he knew her, now his heart heard the lost language for which it
had pined, now his soul stood complete again in the acquisition of its
lost part.
Isabel saw that the answer to her call had come. At last she was
known. ‘Old friend,’ she whispered, smiling into his eyes.
‘You—you,’ he stammered. ‘And I did not understand. It is You. I
have never seen you before, Isabel, and yet—and yet I have known
you all my life.’
Suddenly she was clothed in glorious beauty from head to foot. From
head to foot she was altogether splendid and desirable. Every inch
of her called aloud for his worship. As the sooty kitchen-maid of the
tale strips off her rags and stands revealed a King’s golden daughter,
so now the accidents of Isabel’s disguise, the untidy hair, the
shapeless clothes, all passed out of Kingston’s consciousness.
Henceforth she stood far above such peddling criticism. The rules of
his ordinary taste could never apply again to this recovered spirit out
of the dead ages. She was his—his right, his property, his existence.
She was altogether without fault or blemish, the completion of
himself.
‘You are beautiful,’ he said in a low voice—‘you are beautiful, the real
Isabel. I never guessed what beauty was. It is you, Isabel. It has
always been you.’ Wonder at the miracle possessed him, tied his
tongue, gave him the pathetic little blundering gestures of the blind
—of one suddenly emerged from a lifetime’s black darkness into the
blinding glare of daylight.
‘You have come to me at last,’ smiled Isabel. ‘I wondered when you
would. You have been trying not to wake.’
‘I have been holding my eyelids down,’ he answered. ‘I have been
making myself blind. It has been hell; Isabel ... Isabel!’
‘Yes,’ she replied—‘yes. You have been denying me ... you have been
denying yourself. It is Peter’s crime. Of course it was hell. But now
you have confessed the truth—the truth which was from the
beginning.’
He stared at her—the man made perfect in full self-realization—at
her, the woman, whole and entire in her reunion with himself. Soul
imperiously cried to soul, and body to body. She had the
unimaginable beauty of the thing created by its lover, loved by its
creator. Every line and curve of her was perfected handiwork of his
own rapture. The loveliness that he saw in her, his own heart, his
own flaming fancy had planted there, had fashioned and worshipped
as the lover always fashions the idol that he worships.
‘How is it,’ he said hoarsely—‘how is it you can be so beautiful,
Isabel? You are not beautiful. My eyes know you are not beautiful.
And yet my heart knows better. My heart knows there is nothing like
your beauty—nothing like it, Isabel, anywhere in the world. My soul
is twisted up in every part of you; there is something of me in every
part of you. Your hair, your skin, your eyes—they are me, Isabel; I
have given myself to make them. Can you understand it, Isabel?
There isn’t an inch of you in which the sinews and the nerves of
myself have not always been woven and twisted.’
‘Ah,’ she cried, answering his low tones with a deep burst of feeling.
‘We have been together through the worlds. We are not strangers.
That is what you mean. You have buried yourself in me, and I have
buried myself in you. We belong to each other. We have always
belonged together. There are only you and I in this white pale world.
That is what real lovers are. Alone—alone together for ever and ever
and ever. Nothing can ever break our solitude—nothing can put itself
between us—if only we are honest with ourselves.
‘Isabel, what does it mean—this that we feel? What is it that we
are?’ he asked, whispering as if in the presence of a sacred mystery.
‘Ourself,’ she answered triumphantly—‘ourself, awake, brought to
life, welded together again. We have come out of a hundred ages.
Do you suppose that we come together now for the first time? How
do we know each other, then? This that we feel is the song of many
dead souls calling in each of us to the many dead souls that have
loved us in the other. We have been bound together since first we
met in the far-away distance of things. Love is that. Love is never a
new thing. Love is the oldest thing in the world. It has lived through
a hundred thousand deaths of the body, and gathered strength and
knowledge at every stage of its journey. It’s a jewel of a hundred
thousand memories crushed together and crystallized into a pure
sparkle of lights. It’s a chain of a hundred thousand links, each
heavier than the last, and more golden. Kingston, the chain is round
us and round us. Tie it tighter, tighter, for ever and ever. We will live
everlastingly in this land of splendid bondage.’
‘Isabel, what is it the wise people of the East say?’ answered
Kingston, in the stupefaction of ecstasy. ‘They pledge themselves to
one another for half a dozen lives or more. Isabel, that is what you
mean. You and I are both bound together. We’ll plight our troth
again now, far ahead into the future. For a score of existences,
Isabel. Our love was not born a minute ago; it will not die to-
morrow. It goes on and on, whatever bodies it takes to clothe itself.
Our love is the only thing of us that goes on. And nothing can
destroy it. It is ourselves. You are mine, Isabel, and I am yours—you
are me, and I, you, not only now, in these shapes of ours, but
through half a hundred more that are not yet born, Isabel. Isabel,
what do words and talking matter? We cannot get away from each
other; we are the same person. Now and always, Isabel. But we will
never lose ourselves again; we must always recognise each other.’
‘Yes,’ she said, ‘again and again and again. For ever and always. You
have been trying to cut me, Kingston—me! trying to cut yourself.’
‘You are chained to me, Isabel, and I to you! I will never break the
chain at my end; you must never try to break it at yours.’
‘No; we are always the same person henceforth. Why, there is no
bond. We are too close together now even to be bound.’
She stood gazing at him, her eyes, her pose, her manner inspired
with conquest. The blank, sickening ferocity of passion seized him as
he answered her look. It caught him by the throat, swept him away
in a rapture of agony. To crush that beauty of hers, to mangle it,
strangle it, absorb it utterly in himself, became at once the one
blinding, obliterating need that filled his whole consciousness. An
insatiable thirst of her loveliness possessed him. The keen, flame-like
delirium of his desire was a devastating pain. His whole being
moaned with the aching torment of it. The sight of her, the thought
of her, went through him, pierced him, rent his innermost heart in
twain. The drunken glory of suffering that held him on the wheel of
knives was a frenzy very different from that placid repletion which
had been his ideal—how long ago?—of the great ideal passion. Now
at last he knew what passion was—the parching, gorgeous misery of
it, the straining, leaping martyrdom. The ancient secret madness
that once had dwelt in the orderly rooms of his father’s heart now
stirred again in the son’s, and bled once more, under the wounds of
ecstasy, as once, for a wild hour, it had bled long since at the hands
of that ill-fated, forgotten woman whose place was now usurped by
Isabel. Kingston, his calmer self destroyed by the red intoxication,
moved towards his fate, vaguely, blindly.
‘Isabel—Isabel!’ he murmured with dry, cracking lips, groping hands
outstretched to take her.
And Isabel welcomed his coming as the crown of life. She threw his
arms wide and waited, glowing and transfigured.
The ghostly twilight of the mist was round her, behind her. The face
it revealed was fierce with joy, exquisite in its vividness. The dark
hair drifted round it, and the throat rose vivid and white from the
low-cut collar of her dress, thrown back splendidly, an ivory column.
The neck of her dress was fastened awry by a little brooch, whose
diamonds gleamed dully in the pale glooming.
And in an instant the man’s flaming drunkenness had passed—
passed utterly, in a spasm of torment almost beyond his bearing. As
sometimes we are torn painfully, violently from the gay madness of a
happy dream by the sound of a bell or some other noise that
penetrates to our consciousness from the outer world beyond our
vision, so now, in the crisis of his passion, the sight of his wife’s
brooch at Isabel’s throat recalled Kingston Darnley, with a jarring
crash, to the horrible realities of life. Isabel, characteristically
buttonless and pinless, had borrowed it from Gundred to make good
the deficiencies of her blouse. His arms fell, the light of his eyes
grew dull, and died. His body stood motionless, and his spirit went
down into the abyss of hell.
Isabel saw the change, and at the sight her own glory
sympathetically faded. They had done with the heights. Now their
feet were set on earth again.
‘Isabel—Isabel!’ he repeated. But the flame of his utterance had died
down into a grey dreariness.
Isabel saw that her moment was passing. A horrible anxiety
possessed her. ‘What is it?’ she cried. ‘Kingston, what is it? What has
come between us?’
He pointed to the brooch. ‘Gundred,’ he answered—‘Gundred. We
had forgotten.’ He was suffering so acutely in the death of passion
that he could hardly make his words intelligible. The wrench was
agonizing. Passion was not dead, but his heart knew that it must die
—that he himself must be its executioner—must cast out the guest
that was the dearest part of himself—cast it out and cut the throat
of it. He desired still with all his soul, but knew that his desire must
rest for ever unfulfilled. He belonged to Gundred. He must face his
own responsibilities.
Isabel could not hear what he said. But she shivered in the cold that
had fallen upon them. Without words she understood what it was
that had cut down the flower of his rapture in a moment, what
drawn sword it was that had suddenly thrust itself between them.
She stood withered and stricken with the shock, grown suddenly
pale and old.
Kingston was fighting down his pain, struggling with it, and gradually
bringing it into bounds. He was too clear-sighted to give himself any
hope. Had he been sprung of a more lawless stock, of men
accustomed to love where they chose, without consideration of
morality, he might have taken his pleasure as it came, and never
given a thought to self-reproach or duty. But as it was, bygone
generations stirred again in him, of men who had lived cleanly,
decently, according to their lights, avoiding the wild urgencies of
passion. Law, custom, convention had ingrained into them a respect
for rule and restraint, and now their latest descendant reaped in his
own person the cruel reward of all their virtues. To go further in the
ghastly labyrinth was impossible. Joy was unattainable. Only duty
could be pursued. And for shirking that there could be no excuse.
Without a word he turned and walked away from that ill-omened
motto on the hill-top. Vaguely, with hands thrust down into his
pockets, he wandered on, crushing down the misery, the angry
clamours of his nature, and steeling himself violently to the
preservation of what remained possible to him of decency. For the
sake of Gundred, of himself, of Isabel—for the sake of his love and
hers, he must at least live as clean as might be. The struggle was a
martyrdom, though, the shock of self-mutilation a grinding,
lancinating anguish.
Isabel stood for a moment, then followed him across the flat ground.
She soon caught him up, and they advanced together in silence
through the driving mists. Suddenly, vague and ghostly, the old cairn
rose before them again, looming mountainous. When he had
reached the stones at its foot, Kingston threw himself down upon its
steps with a heavy gesture of lassitude. And still the silence ruled.
‘Isabel,’ he said at last, in a dull, tired voice—‘Isabel, you must
forgive me if you can. I have been a beast. I must have been off my
head. I feel as if I had been drunk, and was only just beginning to
come to. Whatever rot I talked you must try and forget it, Isabel. I
can’t make out what the devil can have come over me!’
The woman gave him an angry, challenging glance. ‘No,’ she said, ‘I
won’t forget it. You spoke the truth. Why are you beginning to tell
the old weary lies again? Surely we have got beyond that.’
Her words, her defiant tone, caught his attention.
‘You didn’t understand,’ he said. ‘I was a brute; there’s no more to
be said. Don’t try to say any more. Of course you can’t understand.
My God, what a damned muddle I have made of things!’
‘But of course I do understand, Kingston. Nothing can undo what
you have said. It didn’t need saying, and no amount of denials can
ever make it untrue.’
Kingston looked at her anxiously.
‘Isabel,’ he said in a broken voice. ‘Do you realize what you are
saying? I was fool enough to tell you——’
‘What we both knew before in our heart of hearts,’ she interrupted
passionately. ‘And now we know each other. Oh yes, I understand
you. All of a sudden you have been overcome by some absurd qualm
—some whim or other. You think we are to be separated by some
ridiculous fad.’
Amazement held him. This time he fixed his eyes on her and spoke
slowly, laboriously, as one speaks English to someone who can only
understand a foreign language.
‘A fad!’ he repeated. ‘Hang it all, Isabel, is honour a fad, and
decency, and all the rest of it? One does what one can. Is it only a
whim?’
‘Yes,’ she answered violently. ‘It is only a whim. These artificial
scrupulosities of yours, they are just middle-class superstitions. You
belong to me, and I belong to you. We know that is true. Very well,
then; why should we deny in deed what we know to be true in fact.
Oh, I have no patience with such whims. Nothing can separate us;
why should we pretend to be separated by the fact that you have
got what you call a wife? I am your wife. You have no other. You
can’t have another. Your only duty is to me—to me and to yourself.
All the rest is mere romantic sentimental nonsense.’
His fastidiousness swung him back into a reaction of almost physical
repulsion as he contemplated her. The impossibility of making her
understand any honourable point of view was dreadful. He loathed
her with all his heart as she sat there trying to enforce her claim.
And yet he could not deny her claim, and, despite his shuddering
disgust, he loved her as much as ever, reluctantly, angrily, but with
all the secret unreasoned impulses of the bondage that held him.
‘Isabel,’ he said, with forced gentleness, ‘can’t you even try to
understand? I am sorry. Yes; it is true what you say. We belong to
each other. Nothing can alter that. But I have given my word to
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like