100% found this document useful (13 votes)
45 views

Node js Blueprints Tsonev 2024 scribd download

Blueprints

Uploaded by

kazuhosimmie
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (13 votes)
45 views

Node js Blueprints Tsonev 2024 scribd download

Blueprints

Uploaded by

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

Download the full version of the ebook at ebookname.

com

Node js Blueprints Tsonev

https://ebookname.com/product/node-js-blueprints-tsonev/

OR CLICK BUTTON

DOWNLOAD EBOOK

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Node js By Example 1st Edition Tsonev

https://ebookname.com/product/node-js-by-example-1st-edition-tsonev/

ebookname.com

Node js in Practice 1st Edition Alex R. Young

https://ebookname.com/product/node-js-in-practice-1st-edition-alex-r-
young/

ebookname.com

Ext JS Application Development Blueprints 1st Edition


Ramsay

https://ebookname.com/product/ext-js-application-development-
blueprints-1st-edition-ramsay/

ebookname.com

Counterparty credit risk and credit value adjustment a


continuing challenge for global financial markets second
edition Jon Gregory
https://ebookname.com/product/counterparty-credit-risk-and-credit-
value-adjustment-a-continuing-challenge-for-global-financial-markets-
second-edition-jon-gregory/
ebookname.com
Single and Multi Carrier DS CDMA Multi User Detection
Space Time Spreading Synchronisation Networkingand
Standards 1st Edition Lajos L. Hanzo
https://ebookname.com/product/single-and-multi-carrier-ds-cdma-multi-
user-detection-space-time-spreading-synchronisation-networkingand-
standards-1st-edition-lajos-l-hanzo/
ebookname.com

Measuring Society 1st Edition Chaitra H. Nagaraja

https://ebookname.com/product/measuring-society-1st-edition-chaitra-h-
nagaraja/

ebookname.com

Food Lipids Chemistry Nutrition and Biotechnology Third


Edition Food Science Technology Casimir C. Akoh

https://ebookname.com/product/food-lipids-chemistry-nutrition-and-
biotechnology-third-edition-food-science-technology-casimir-c-akoh/

ebookname.com

Psychoanalysis of Aging and Maturity 1st Edition Guillermo


Julio Montero

https://ebookname.com/product/psychoanalysis-of-aging-and-
maturity-1st-edition-guillermo-julio-montero/

ebookname.com

The Language of Conversation Linguistic Theory Guides 1st


Edition F. Pridham

https://ebookname.com/product/the-language-of-conversation-linguistic-
theory-guides-1st-edition-f-pridham/

ebookname.com
The Racing High performance Tire 1st Edition Paul Haney

https://ebookname.com/product/the-racing-high-performance-tire-1st-
edition-paul-haney/

ebookname.com
Node.js Blueprints

Develop stunning web and desktop applications with


the definitive Node.js

Krasimir Tsonev

BIRMINGHAM - MUMBAI
Node.js Blueprints

Copyright © 2014 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: June 2014

Production Reference: 1060614

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham B3 2PB, UK.

ISBN 978-1-78328-733-8

www.packtpub.com

Cover Image by Svetlana Mircheva-Tsoneva (sv_mircheva@abv.bg)


Credits
Author Copy Editors
Krasimir Tsonev Alisha Aranha
Mradula Hegde
Reviewers Adithi Shetty
Ben Sammons
Glenn Antoine Project Coordinator
Bojan Bižić Sanghamitra Deb
Andrey Kovalenko
Miguel A. Madero Proofreaders
Simran Bhogal
Abhijeet S. Sutar
Maria Gould
Leo Hsieh
Ameesha Green

Commissioning Editor Paul Hindle


Julian Ursell
Indexers
Acquisition Editors Hemangini Bari
Antony Lowe Tejal Soni
Greg Wild
Production Coordinators
Content Development Editor Manu Joseph
Sankalp Pawar Alwin Roy

Technical Editors Cover Work


Miloni Dutia Alwin Roy
Kapil Hemnani
Mukul Pawar
Siddhi Rane
About the Author

Krasimir Tsonev is a coder with over 10 years of experience in web development.


With a strong focus on quality and usability, his interests lie in delivering cutting-
edge applications. He enjoys working in the industry and has a passion for creating
and discovering new and effective digital experiences. Currently, Krasimir works
with technologies such as HTML5 or CSS3, JavaScript, PHP, and Node.js, although he
started off as a graphic designer. Later, he spent several years as a flash developer using
ActionScript3 and frameworks such as RobotLegs. After that, he continued delivering,
as a freelancer, full-stack web services for his clients' graphic design as well as frontend
and backend programming. With the present surge in mobile development, Krasimir
is enthusiastic to work on responsive applications targeted at various devices. Having
lived and worked in Bulgaria, he graduated from The Technical University of Varna
with a Bachelor's and Master's degree in Computer Science.
About the Reviewers

Ben Sammons is an enthusiastic programmer who, with a background in other


sciences matter, has found his passion in programming, particularly asynchronous
programming. He enjoys exploring complex problems and new technologies. In his
spare time, he enjoys reading fiction novels and programming goofy side projects.

I would like to thank Sanghamitra Deb for managing the project,


the author for the delightful content, and all the Node.js-core
contributors for starting such a fun technology, which allows
books like this to be written.

Glenn Antoine is a software engineer with over 20 years of experience. By


day, much of his time is spent working with C#, .NET, and MVC enterprise-level
applications. By night, he devotes his time to writing Node.js- and AngularJS-based
responsive web applications. As a lifelong learner, he enjoys sharing his experiences
on his blog at http://glennantoine.com.
Bojan Bižić started programming at the age of 14, when he got his first
Commodore 64. Since then, he has come a long way developing a wide range of
solutions using VB6, Delphi, C, C++, LAMP, Node.js, Objective-C, DirectX, OpenGL,
OpenCL, NVidia Cuda, Python, AngularJS, and .NET. He is a Microsoft Certified
Solutions Developer, database administrator, professional web developer, as well as
a Certified Technology Specialist who develops SharePoint solutions. Currently, he
holds a Bachelor's degree in IT Management from The University of Novi Sad, Serbia.

Bojan currently lives in Germany and works for GMG GmbH & Co. KG, developing
a wide range of cross-platform color management and printing solutions, using both
Microsoft and open-source technologies. In his spare time, he actively participates in
open source projects.

I would like to dedicate this work to my beautiful wife Olivera. She


has always been the greatest support and inspiration for my work
and has made me the man I am today.
Andrey Kovalenko is a software developer, team leader, and blogger. He is a
member of Jaybird Marketing Group LLC, a web and mobile development firm
in the United States and Ukraine. He has been working there since the inception
of the company and holds a team leader position. His work includes overseeing
and implementing projects on a wide variety of technologies, with emphases
on JavaScript, Node.js, HTML5, and Cordova (PhoneGap). He leads several
development groups, which produce products for call centers, marketing companies,
real-estate agencies, telecommunication companies, and healthcare, among others.
Lately, he has been focusing on learning mobile development in details. As a result,
he started the BodyMotivator project, a mobile application for fitness. He is a believer
in the future of JavaScript as a generic development language. When he isn't coding,
Andrey likes to hang out with his family, skydive, and exercise at the local cross-fit
gym. He is a healthcare enthusiast and is trying to put all his software development
efforts into making life healthier.

He is also the author of the book KineticJS Starter, Packt Publishing.

I would like to express my gratitude to the many people who


saw me through this book. First and foremost, I would like to
thank my girlfriend Lena for her understanding, endless patience,
and encouragement when it was most required. I also thank the
Jaybirdians—the amazing people to whom I now dedicate much of
my life. It is through their teachings, encouragement, and support
that I have gained and grown. It is an incredible feeling to know
that I have worked for five years already, wrote my first book here,
reviewed several books, and also created my first mobile application.
Miguel A. Madero is a developer, entrepreneur, speaker, author, and open source
contributor. He has been programming for fun for almost 20 years. He founded
a magazine, video production, a few web companies, and a development shop in
Mexico. He has worked as a software consultant for Readify, Australia, developing
some of the coolest projects in the country. He moved last year to San Francisco,
where he works at Practice Fusion to connect doctors, patients, and data to drive
better health and save lives. On a personal note, Miguel is married and likes rock
climbing, good food, and trying exploring new things.

He also has worked on the book Professional Visual Studio 2008, Wrox.

To Carina, my wife.

Abhijeet S. Sutar is a self-taught, full-stack software developer based in Mumbai,


India. He is a technology and open-source enthusiast and a blogger. Having worked
with enterprise middleware applications with a Java platform, he is now building
real-time applications with the Node.js platform and Meteor, along with NoSQL
databases MongoDB and Redis.

He finds more interest in exploring, experimenting, reading, and writing in new


languages and with new technologies.

You can reach him on his blog at http://blog.ajduke.in, on GitHub at


http://github.com/ajduke, or on Twitter via @_ajduke.

Leo Hsieh graduated from USF with a Master's degree in Web Science in 2011.
He has been working as a software engineer for over two and a half years. He is
an open-source JavaScript developer, interested in frontend development and
Node.js. Although he is more focused on frontend development, he is able to
work on backend development with Java and Python as well.

He is also a software engineer on a platform service team at PayPal, working on a


developer portal for https://developer.paypal.com/.
www.PacktPub.com

Support files, eBooks, discount offers, and more


You might want to visit www.PacktPub.com for support files and downloads related
to your book.

Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at www.PacktPub.
com and as a print book customer, you are entitled to a discount on the eBook copy.
Get in touch with us at service@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
TM

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online


digital book library. Here, you can access, read and search across Packt's entire
library of books.

Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print and bookmark content
• On demand and accessible via web browser

Free access for Packt account holders


If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view nine entirely free books. Simply use your login credentials
for immediate access.
Table of Contents
Preface 1
Chapter 1: Common Programming Paradigms 7
Node.js fundamentals 8
Organizing your code logic in modules 10
Building a car construction application 11
Using the car's engine 12
Understanding inter-module communication 14
Asynchronous programming 16
Exploring middleware architecture 20
Composition versus inheritance 21
Managing dependencies 23
Summary 24
Chapter 2: Developing a Basic Site with Node.js and Express 25
Getting acquainted with Express 25
Installing Express 26
Using package.json 26
Using a command-line tool 28
Managing routes 32
Handling dynamic URLs and the HTML forms 34
Returning a response 35
The example-logging system 37
Summary 40
Chapter 3: Writing a Blog Application with Node.js and AngularJS 41
Exploring AngularJS 41
Bootstrapping AngularJS applications 42
Using directives and controllers 42
Data binding 43
Table of Contents

Encapsulating logic with modules 44


Preparing data with filters 45
Dependency injection 45
The model in the context of AngularJS 46
Final words on AngularJS 46
Selecting and initializing the database 47
Using NoSQL with MongoDB 47
Using MySQL 50
Developing the client side with AngularJS 53
Implementing a control panel 58
Summary 66
Chapter 4: Developing a Chat with Socket.IO 67
Exploring WebSockets and Socket.IO 67
Understanding the basic application structure 68
Running the server 69
Adding Socket.IO 70
Writing the client side of the chat 71
Preparing the HTML markup 71
Writing the chat logic 73
Implementing user-to-user communication 75
Changing the server-side code 75
Making changes to the frontend of the chat 77
Summary 79
Chapter 5: Creating a To-do Application with Backbone.js 81
Exploring the Backbone.js framework 82
Recognizing the framework dependency 82
Extending the functionality 82
Understanding Backbone.js as an event-driven framework 83
Using models 83
Using collections 84
Implementing views 85
Using the router 85
Talking to the backend 86
Writing the backend of the application 87
Running the Node.js server 87
Managing the to-do lists 89
Writing the frontend 92
Looking into the base of the application 92

[ ii ]
Table of Contents

Listing the to-do activities 96


Adding, deleting, and editing the to-do lists 98
Summary 102
Chapter 6: Using Node.js as a Command-line Tool 103
Exploring the required modules 103
Planning the application 105
Obtaining images from a folder 106
Authorizing the Flickr protocol 108
Obtaining your application's Key and Secret 109
Writing into the Flickr.js module 111
Running our application tool 113
Uploading the images 115
Summary 116
Chapter 7: Showing a Social Feed with Ember.js 117
Preparing the application 117
Running the server and delivering the assets 118
Getting tweets based on a user handle 121
Discovering Ember.js 125
Knowing the dependencies of Ember.js 125
Understanding Ember.js 126
Exploring classes and objects in Ember.js 126
Computed properties 126
Router 127
Views and templates 129
Models 130
Controllers 131
Writing Ember.js 132
Defining the templates 132
Defining the routes 134
Handling the user input and moving to the second screen 135
Displaying the tweets 136
Summary 137
Chapter 8: Developing Web App Workflow with Grunt and Gulp 139
Introducing the task runners 139
Exploring Grunt 140
Concatenating files 141
Minifying your code 143
Watching files for changes 144
Ignoring files 146

[ iii ]
Table of Contents

Creating our own task 146


Generating a cache manifest file 148
Documenting our code 152
Discovering Gulp 153
Installing Gulp and fetching plugins 154
Concatenating and minifying with Gulp 154
Creating your own Gulp plugin 156
Summary 157
Chapter 9: Automate Your Testing with Node.js 159
Understanding the importance of writing tests 159
Choosing a testing methodology 160
Test-driven development 160
Behavior-driven development 161
Classifying tests 162
Using Jasmine 164
Installing Jasmine 164
Defining the module for testing 164
Following the test-driven development concept 165
Testing the file-reading process 165
Finding strings in the file content 168
Writing an integration test 169
Testing with Mocha 170
Installation 170
Translating our example using Mocha 171
Selecting a reporter 172
Testing with a headless browser 173
Writing the subject of our test 173
Testing with PhantomJS 175
Developing the micro testing framework 175
Understanding how PhantomJS works 176
Writing the actual test 177
Testing with DalekJS 180
Summary 183
Chapter 10: Writing Flexible and Modular CSS 185
Writing modular CSS 185
BEM (block, element, modifier) 186
Using the Object Oriented CSS approach 187
Separate structure and skin 187
Separate container and content 188
Scalable and modular architecture for CSS 188

[ iv ]
Table of Contents

Atomic design 188


Exploring CSS preprocessors 189
Using Less 190
Defining variables 190
Using mixins 190
Structuring the styles into nested definitions 192
Using Sass 193
Using Stylus 194
Working with AbsurdJS 195
Styling a simple login form 197
Summary 202
Chapter 11: Writing a REST API 203
Discovering REST and API 203
Developing an online library – a REST API 204
Defining the API parts 204
Writing the base 204
Implementing the API router 205
Writing the responder 209
Working with the database 211
Creating a new record 212
Editing a record 213
Deleting a record 213
Displaying all the books 214
Adding a default route 214
Testing the API 215
Summary 217
Chapter 12: Developing Desktop Apps with Node.js 219
Using node-webkit 219
Writing the base of the application 222
Writing the package.json file 222
Preparing the HTML layout 222
Designing the JavaScript base 223
Displaying and using the working directory 225
Displaying the current working directory 225
Showing the files and folders 226
Changing the current directory 229
Copying, moving, and deleting files 230
Extending the application 234
Tweaking the updateFileArea function 234
Loading a new page for the selected image 235

[v]
Table of Contents

Showing the image and its dimensions 236


Removing the toolbar 238
Summary 240
Index 241

[ vi ]
Preface
As you probably know, the big things in our sphere are those that are moved by the
community. Node.js is a technology that has become really popular. Its ecosystem
is well-designed and brings with it the flexibility we need. With the rise of mobile
development, JavaScript occupies a big part of the technology stack nowadays.
The ability to use JavaScript on the server side is really interesting. It's good to know
how Node.js works and where and when to use it, but it is more important to see
some examples. This book will show you how this wonderful technology handles
real use cases.

What this book covers


Chapter 1, Common Programming Paradigms, introduces us to the fact that Node.js is a
JavaScript-driven technology, and we can apply common design patterns known in
JavaScript in Node.js as well.

Chapter 2, Developing a Basic Site with Node.js and Express, discusses how ExpressJS
is one of the top frameworks on the market. ExpressJS was included because of its
fundamental importance in the Node.js world. At the end of the chapter, you will
be able to create applications using the built-in Express modules and also add your
own modules.

Chapter 3, Writing a Blog Application with Node.js and AngularJS, teaches you how to
use frontend frameworks such as AngularJS with Node.js. The chapter's example is
actually a dynamic application that works with real databases.

Chapter 4, Developing a Chat with Socket.IO, explains that nowadays, every big web
app uses real-time data. It's important to show instant results to the users. This
chapter covers the creation of a simple real-time chat. The same concept can be used
to create an automatically updatable HTML component.
Preface

Chapter 5, Creating a To-do Application with Backbone.js, illustrates that Backbone.js was
one of the first frameworks that introduced data binding at the frontend of applications.
This chapter will show you how the library works. The to-do app is a simple example,
but perfectly illustrates how powerful the framework is.
Chapter 6, Using Node.js as a Command-line Tool, covers the creation of a simple CLI
program. There are a bunch of command-line tools written in Node.js, and the
ability to create your own tool is quite satisfying. This part of the book will present
a simple application which grabs all the images in a directory and uploads them
to Flickr.
Chapter 7, Showing a Social Feed with Ember.js, describes an Ember.js example that will
read a Twitter feed and display the latest posts. That's actually a common task of
every developer because a lot of applications need to visualize social activity.
Chapter 8, Developing Web App Workflow with Grunt and Gulp, shows that there are
a bunch of things to do before you can deliver the application to the users, such as
concatenation, minification, templating, and so on. Grunt is the de facto standard
for such tasks. The described module optimizes and speeds up your workflow. The
chapter presents a simple application setup, including managing JavaScript, CSS,
HTML, and cache manifests.
Chapter 9, Automate Your Testing with Node.js, signifies that tests are really important
for every application nowadays. Node.js has some really great modules for this. If
you are a fan of test-driven development, this chapter is for you.
Chapter 10, Writing Flexible and Modular CSS, introduces the fact that two of the
most popular CSS preprocessors are written in Node.js. This chapter is like a little
presentation on them and, of course, describes styling a simple web page.
Chapter 11, Writing a REST API, states that Node.js is a fast-working technology, and
it is the perfect candidate for building a REST API. You will learn how to create a
simple API to store and retrieve data for books, that is, an online library.
Chapter 12, Developing Desktop Apps with Node.js, shows that Node.js is not just a web
technology—you can also create desktop apps with it. It's really interesting to know
that you can use HTML, CSS, and JavaScript to create desktop programs. Creating a
simple file browser may not be such a challenging task, but it will give you enough
knowledge to build your own applications.

What you need for this book


You need Node.js installed, a browser, and your favorite code editor. That's all you
will use. There are a lot of additional modules to be used, but Node.js comes with a
wonderful package manager which handles the installation process.

[2]
Preface

Who this book is for


The book is for intermediate developers. It teaches you how to use popular Node.js
libraries and frameworks. So, good JavaScript knowledge is required.

Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows:
"The http module, which we initialize on the first line, is needed for running the
web server."

A block of code is set as follows:


var http = require('http');
var getTime = function() {
var d = new Date();
return d.getHours() + ':' + d.getMinutes() + ':' +
d.getSeconds() + ':' + d.getMilliseconds();
}

Any command-line input or output is written as follows:


express --css less myapp

New terms and important words are shown in bold. Words that you see on the
screen, in menus or dialog boxes for example, appear in the text like this: "Click on
the blue button with the text OK, I'LL AUTHORIZE IT."

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

[3]
Preface

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or may have disliked. Reader feedback is important for us
to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to feedback@packtpub.com,


and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.

Downloading the example code


You can download the example code files for all Packt books you have purchased
from your account at http://www.packtpub.com. If you purchased this book
elsewhere, you can visit http://www.packtpub.com/support and register to have
the files e-mailed directly to you.

Downloading the color images of


this book
We also provide you a PDF file that has color images of the screenshots/diagrams
used in this book. The color images will help you better understand the changes in
the output. You can download this file from: https://www.packtpub.com/sites/
default/files/downloads/7338OS_ColoredImages.pdf

[4]
Preface

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in the text or
the code—we would be grateful if you would report this to us. By doing so, you can
save other readers from frustration and help us improve subsequent versions of this
book. If you find any errata, please report them by visiting http://www.packtpub.
com/submit-errata, selecting your book, clicking on the errata submission form link,
and entering the details of your errata. Once your errata are verified, your submission
will be accepted and the errata will be uploaded on our website, or added to any list of
existing errata, under the Errata section of that title. Any existing errata can be viewed
by selecting your title from http://www.packtpub.com/support.

Piracy
Piracy of copyright material on the Internet is an ongoing problem across all media.
At Packt, we take the protection of our copyright and licenses very seriously. If you
come across any illegal copies of our works, in any form, on the Internet, please
provide us with the location address or website name immediately so that we can
pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected


pirated material.

We appreciate your help in protecting our authors, and our ability to bring you
valuable content.

Questions
You can contact us at questions@packtpub.com if you are having a problem with
any aspect of the book, and we will do our best to address it.

[5]
Common Programming
Paradigms
Node.js is a JavaScript-driven technology. The language has been in development for
more than 15 years, and it was first used in Netscape. Over the years, they've found
interesting and useful design patterns, which will be of use to us in this book. All this
knowledge is now available to Node.js coders. Of course, there are some differences
because we are running the code in different environments, but we are still able
to apply all these good practices, techniques, and paradigms. I always say that it
is important to have a good basis to your applications. No matter how big your
application is, it should rely on flexible and well-tested code. The chapter contains
proven solutions that guarantee you a good starting point. Knowing design patterns
doesn't make you a better developer because in some cases, applying the principles
strictly won't work. What you actually get is ideas, which will help you in thinking
out of the box. Sometimes, programming is all about managing complexity. We all
meet problems, and the key to a well-written application is to find the best suitable
solutions. The more paradigms we know, the easier our work is because we have
proven concepts that are ready to be applied. That's why this book starts with an
introduction to the most common programming paradigms.
Common Programming Paradigms

Node.js fundamentals
Node.js is a single-threaded technology. This means that every request is processed
in only one thread. In other languages, for example, Java, the web server instantiates
a new thread for every request. However, Node.js is meant to use asynchronous
processing, and there is a theory that doing this in a single thread could bring good
performance. The problem of the single-threaded applications is the blocking I/O
operations; for example, when we need to read a file from the hard disk to respond to
the client. Once a new request lands on our server, we open the file and start reading
from it. The problem occurs when another request is generated, and the application is
still processing the first one. Let's elucidate the issue with the following example:
var http = require('http');
var getTime = function() {
var d = new Date();
return d.getHours() + ':' + d.getMinutes() + ':' +
d.getSeconds() + ':' + d.getMilliseconds();
}
var respond = function(res, str) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(str + '\n');
console.log(str + ' ' + getTime());
}
var handleRequest = function (req, res) {
console.log('new request: ' + req.url + ' - ' + getTime());
if(req.url == '/immediately') {
respond(res, 'A');
} else {
var now = new Date().getTime();
while(new Date().getTime() < now + 5000) {
// synchronous reading of the file
}
respond(res, 'B');
}
}
http.createServer(handleRequest).listen(9000, '127.0.0.1');

Downloading the example code


You can download the example code files for all Packt books you have
purchased from your account at http://www.packtpub.com. If you
purchased this book elsewhere, you can visit http://www.packtpub.
com/support and register to have the files e-mailed directly to you.

[8]
Random documents with unrelated
content Scribd suggests to you:
should he escape and raise another army, with the hot weather and
the inundations coming on, he may bother us for another year. So
hie after him! Let us hope the gentleman will have the politeness to
wait for us at Khanpur, and not lead us away into the desert on an
unmannerly wild-goose hunt for Umarganj.”
“Hard luck for you to lose him, General, when you so nearly had
your fingers on him again!”
“Precious hard luck! But no, I won’t have a word said against
my luck—my most astounding good luck! That Rickmer’s column
should get in safe, despite its commander’s utmost efforts, that both
my reinforcements, from up and down the river, should arrive in the
very nick of time, that we should run across that herdsman this
morning, and learn that while we were flourishing forth to fight
empty air the enemy was in full march for our communications—
what d’ye call that? Nay, I will go further, and instead of what in our
pagan style we call luck, say that the hand of Providence has been
manifest throughout. There is a great future before Khemistan—I’m
convinced of it. I see all the hoarded wealth of Central Asia pouring
down the river, and making Bab-us-Sahel a port richer and more
extensive by far than Bombay. (As soon as I have time to think of
anything but fighting, my first care shall be the provision of a proper
harbour.) I see the great city of Victoria rising on the upper river,
occupying the whole of the site now covered by the wretched hovels
of Sahar and Bahar and the mouldering ramparts of Bori—the scene
of an annual fair beside which the glories of Novgorod grow pale,
where the silks of Gamara and the embroideries of China are spread
forth to entrance the eyes of the simple Arabit bringing for sale the
precious gums of his mountain deserts and the wiry beasts of his
own breeding. I see that Arabit—son and brother of the grim fighters
whose piled corpses I passed with unavailing horror and regret on
my way hither,—his immemorial weapons laid aside at the behest of
British power, not merely cultivating a desire for the manufactures of
the West, and thereby benefiting my beloved native land, but
perceiving for the first time the blessings of peace and the
advantages of commerce, and carrying the tale to the dwellers in his
rugged glens. Positively there’s no end to the wonders that will
follow naturally upon this day’s conquest. The price is heavy—those
gory heaps, not merely of the enemy, but of our own best and
bravest,—but Heaven is my witness that had the choice lain with
me, not one drop of blood had been shed. My hands are clean, for
all that I have been ‘a man of war from my youth.’”
“Who could deny it, General? Certainly no one that knows you,
or has taken part in the campaign. The enemy themselves will be
the first to admit it, when they are learning under your guidance the
lessons of peace as they have done—not by their own good will, I’ll
confess—those of war.”
Undoubtedly Brian possessed to perfection the art of smoothing
down the lion. Sir Harry’s rugged countenance radiated pleasure and
contentment, though he felt bound to protest.
“Well, well, we mustn’t make too sure! Yet it seems as though
Heaven had designs for me as well as for Khemistan. To be riding
gently up and down for three mortal hours at Mahighar between
opposing forces never more than fifteen yards apart, the target of
both—for when the —th got excited and fired high their bullets came
rattling about my head—and yet to go unscathed! To lead my
soldiers unwittingly into the line of fire to-day, then down into that
nullah, with matchlocks directed at my heart in dozens from the
farther bank, and those fiery swordsmen dashing upon me whirling
their deadly blades! Delany, I found my sword-hilt smashed by a
bullet; after I had sent you away one of the enemy’s magazines blew
up close to me; yet I was unhurt. Not even Black Prince was
touched, poor beast!—which at Mahighar was neither more nor less
than a miracle—though my orderly behind me was unhorsed both
then and to-day. Nor have I been compelled to defend my own life
at the cost of another’s. To-day an Arabit ran at me with his sword
uplifted. I had a pistol ready, and could have shot him, but a soldier
stopped him with his bayonet before he could reach me. Even my
staff seem to share my immunity. Though riding hither and thither
on errands in the thickest of the fray, not one of you has even been
hit until you took this hurt of yours, and you came by that through
your thirst for hand-to-hand fighting, against which I have warned
you. There is indeed something remarkable in all this. D’ye know the
people have found a new name for me? Several times as I rode here
I saw groups of ’em bowing profoundly at the roadside, and on my
orderly calling out that the Bahadar Jang was in a hurry and could
hear no petitions now, their sole reply was to prostrate themselves
reverently, ejaculating ‘Padishah!’”
“And why not, sir?” asked Brian heartily—he had been fearing
the General had heard himself mentioned by the less complimentary
title of “Brother of Satan.” “Who would be so fit as yourself to
administer the territory you have added to Her Majesty’s
dominions?”
“Well, that ain’t for me to say——” Sir Harry was obviously not
ill-pleased. “The Governor-General will select whom he chooses—
though I don’t pretend to be ignorant of his appreciation of the
efforts of the army. That dâk which came in before we marched this
morning was Lord Maryport’s, containing his congratulations to us on
Mahighar. I have had no time to read it through, but it contained
some awards—Keeling is promoted aide-de-camp to the G.-G., I
remember—and he promises further promotions when he has been
able to study my despatches more fully. To be elated by the praises
of a civilian—pshaw! am I as weak as that? I trust not, I believe not.
Praise from the Duke, now—the assurance that the humblest of his
Grace’s pupils, endeavouring to put in practice lessons learnt from
that great man, had made no heinous mistake,—that would gratify
my most greedy desires, and lacking that, I shall remain unsatisfied.
Put it that Lord Maryport appoints me Governor of Khemistan, as
you suggest. I am touched by such a proof of his lordship’s
confidence, and naturally strive to acquit myself to his satisfaction,
but if he desired to do me a personal favour, he could please me no
better than by sending me back to my wife and girls. What are
Khemistan and the winning of battles to me compared with them?”
“But sure you’ll have both, General. Lady Lennox and the young
ladies won’t consent to be kept at Poonah much longer with you up
here, if I know ’em.”
“Possibly it may be feasible to get them here after the hot
weather. Then indeed I should have nothing left to wish for. But I
must be moving. I am glad to leave you here to look after your
sister. See to it that she never rides alone, by the bye. Munshi was
telling me some foolish tale of Kamal-ud-din’s believing that our luck
resides in her presence with us, and no doubt he is capable of
seeking to transfer my good fortune to himself. The lower he sees
his cause sunk, the more likely he is to attempt to re-establish it by
some desperate expedient. And see that she don’t drive the
unfortunate Ambrose mad by her affectionate assiduities, if you
can.”
“Will you tell me you think I’m able for it, General?”
Sir Harry chuckled. “Give the poor fellow the support of your
presence when possible. But don’t attempt to dissuade your sister
from a close attendance on him, for you’ll get the worst of it. Never
interfere with a woman in her own province. She knows what will
bring her consolation, though you mayn’t realise it. That’s the advice
of one who has had a good deal to do with women.”
“I’m sorry the association has been so unfortunate as to teach
you such wisdom, General.”
“You young dog!” Sir Harry turned back on the verandah step
and chuckled again. “But you’re wrong there. I thank Heaven no
woman has ever known sorrow through me. Many are the tears I
have kissed away, but never caused one to flow. And you are
thinking, you irreverent young rascal”—with a renewed chuckle
—“that to be kissed by a battered old phiz like mine would be more
likely to draw tears than to allay ’em. I know you young fellows!”
“I wouldn’t dream of such a thought, sir!” with virtuous
indignation. “But all the same, I’d give a good deal to be sure you
don’t draw floods of ’em from my little Sally when I ask you for her,
before you say yes!” he added sotto voce, as he supported himself
by the pillar while Sir Harry mounted his horse and called out a
farewell message to Eveleen.
CHAPTER XX.
IF SHE WILL, SHE WILL.

It would be pleasant to state that the shock Eveleen had received


turned her in one hour into a normal wife, and that feminine
intuition taught her to care for her husband in his weakness without
jarring him by too great eagerness, but it would not be in
accordance with the facts. Perhaps the ladies who disliked her were
justified in saying that she was unwomanly. At any rate, the truth
remains that she was absolutely incapable of realising that there are
times—and a good many of them—when the soul of a sick person
yearns for nothing on earth but to be let alone. She could not let
Richard alone. If she was not doing some totally unnecessary and
undesired thing for him, she was thinking of something to do, and if
she could not think of any thing, she was asking him to suggest
something. His bearer knew exactly how to make him comfortable in
bed, but it would have been asking too much of Eveleen to expect
her to believe this. She was quite certain she could arrange things
more to his taste than any one else, and she arranged them
complacently to her taste, only to see a possible improvement in less
than five minutes, and to proceed to make it. Richard’s hours were
passed in undergoing a continual series of experiments—each of
which had to be talked about beforehand, discussed while it was in
progress, and made the subject of mutual congratulation when it
was over, until the next inspiration dawned on Eveleen’s mind. He
could not quite decide whether the talking made it worse or better.
It added the tortures of anticipation to those of realisation, certainly,
but it might have been worse if he had been seized upon without
warning. He was too weak to protest, too weary to be sarcastic,
though he derived not merely bodily satisfaction, but a glimmering
of amusement, from the air of portentous patience with which his
bearer would take any and every opportunity of the Beebee’s
absence to reverse each and all of her arrangements, and make his
master comfortable in his own way. Perhaps it was as well that
Eveleen’s inventive brain provided her with so many new and
infallible ideas for the better treatment of the sick, since she could
never be quite sure that the arrangement she found in force on her
return might not have been her own latest experiment but one, and
not the bearer’s at all. Her satisfaction in having her husband all to
herself, and being able to do everything for him—she told him so
perpetually—was so complete that Richard had not the heart to
disturb it, and sufferance being the badge of the bearer’s tribe, he
refrained likewise. The surgeon was the only person whose authority
she acknowledged—to a certain extent,—and he knew better than to
wound her, and probably provoke a scene, by throwing doubts on
her capacity as a nurse. What he did, and earned thereby the
patient’s sincerest gratitude, was to insist on her taking regular
exercise—or in the enthusiasm of her self-sacrifice she would have
forsworn even her beloved rides. The doctor used to detect, or so he
imagined, a faint smile in the eyes of the man on the bed when he
took upon himself, with friendly violence, to propel Mrs Ambrose
from the sick-room. “Just a short ride, my dear madam, beside your
good brother’s palkee”—for the surgeons had fulfilled Brian’s darkest
anticipations by condemning him to a recumbent position and no
riding for a week at least—“to cheer him up and give you a little
change of scene. Otherwise”—darkly—“we shall have you unable to
resume your kind care of Ambrose to-morrow, and what would
become of him then?” with, it is to be feared, a perceptible wink
directed towards the patient.
Richard’s constitution—mental as well as physical—must have
been a good one, for he succeeded in surviving not merely his own
imprudence on the day of the battle, but his wife’s nursing after it,
and in arriving at the point when the surgeon said cheerfully, “Now
we ought to see some improvement every day!” But the forecast
was not justified. There was no relapse, but also no further
improvement. The patient remained in the same state day after day
—unwilling or unable to attempt exertion of any kind, still asking
merely to be let alone. It was only natural that Eveleen should
become impatient. Her active mind had run ahead of reality so far as
to picture him convalescent and established out of doors in the
shade, with herself fetching and carrying for him and anticipating his
slightest wish. The trifling drawback that there was no shade out of
doors did not at first suggest itself to her. The hot weather was
coming on fast, and the emerald greenery which had made the
country round Qadirabad such a refreshing sight to Indian eyes was
growing brown and parched. Happily the Residency had been built
to suit the climate, with thick walls and heavy chunamed verandahs,
and an abundant supply of the mud-brick ventilators evolved by local
talent—erected on the roof to catch every breath of air, and convey
it in the form of wind down a kind of chimney into each room,
accompanied by a disproportionate quantity of dust. But even in the
Residency Eveleen gasped for breath behind the close-drawn blinds,
and felt that life was only worth living when night and darkness
made it possible to move about again outside, though only to find
that all her favourite leafy spots were sere and dry. Then—probably
by force of contrast—the thought of Bab-us-Sahel and the sea
suggested itself to her, and instantly her mind was made up that a
trip to Bab-us-Sahel was what Richard needed to restore him to
health. Of course he would never shake off his lassitude here, with
the hot breath of the desert blasting the vegetation and burning
everything up. A voyage down the river—peacefully floating onwards
night and day, drawing nearer each hour to real sea-breezes—that
was what would cure him, and he must and should have it. She said
so—without a thought of encountering opposition—to Brian, just
promoted to a gentle ride morning and evening instead of the
humiliating palkee, and was astonished and wounded to find that he
did not agree with her.
“Can’t you leave the poor fellow alone?” he demanded. “Sure he
only wants not to be teased and worried.”
“But who teases and worries him, I’d like to know? It’s rousing
he wants—any one could see that.”
“Ask the doctor, can’t you? and see what he’ll tell you.”
“I will not. Don’t I know what my own husband wants better
than any doctor?”
“But Ambrose don’t want to go to Bab-us-Sahel.”
“Does he not, indeed?” triumphantly. “I asked him would he like
it, and he said he would greatly.”
“I wonder did he even know what you were talking about?
Plenty of times I don’t believe he’s so much as listening.”
“Y’are very polite, indeed! I know better.”
“But see here, Evie, the floods will be coming down any day
now, and you wouldn’t be safe in any country boat—only a steamer,
and you know there ain’t one to spare.”
“Sure that’s the very reason we ought start at once—to make
the voyage before the floods begin. They don’t come till a full
fortnight after this—I was asking about it this morning—and that’ll
give us oceans of time.”
“You can never tell. They would as likely have begun a fortnight
ago—only they have not. Anybody will tell you there’s no reckoning
on ’em.”
“Well, I can’t help that——” with a sudden shifting of her
ground. “I tell you we are going.”
“You can’t go without getting leave. Even if the doctor would let
you, Ambrose is on the staff, and you can’t go carrying him off to
t’other end of nowhere without a word to the General.”
“Sure I’ll write and ask him. Will that satisfy you?”
“Will you wait for the answer? Nonsense, Evie! y’are behaving
like a bit of a child. Look now what I’ll do for you. I’ll go see the
General and tell him all about it. He’ll be at Khanpur—or maybe even
on his way back here, and I suppose you will take what he says from
his own mouth. If he thinks it safe you will go, and if not, you stay
here like a rational being. You can trust him. Is that settled now?”
“I’ll be quite satisfied if I once see the General and settle it with
him,” agreed Eveleen—which was not quite the explicit pledge Brian
would have exacted had he been giving his full mind to the matter.
But Brian was uncomfortably conscious of ulterior motives in his
opposition to the plan. He was arguing quite as much for his own
benefit as Richard’s. The General would give him leave to escort his
sister and the invalid to Bab-us-Sahel, he was sure—only too readily,
indeed, for he did not want to go. He wanted to be back at his
proper work—not leaving Stewart and Frederick Lennox to win all
sorts of laurels without him. Khanpur had fallen without a blow—
Khemistan is full of Khanpurs, but this was Kamal-ud-din’s pleasure-
capital on the edge of the desert, quite distinct from his grim
fortress of Umarganj in its deepest depths. The inhabitants met the
Bahadar Jang with acclamations, and testified the utmost gratitude
to him for delivering them from the Arabit tyranny, but they could
only hand over the shell without the kernel. Kamal-ud-din, with his
baggage and the remains of his army, had escaped into the desert,
presumably to Umarganj, and Sir Harry settled down, with what
patience he could command—which was very little—to wait at
Khanpur while his subordinates continued the pursuit. It was not
etiquette for him to move against Umarganj in person, lest so great
a potentate should incur the disgrace of a check before a small
desert fort, and he was beginning to pay some attention to Indian
opinion, which he had despised so heartily when he landed. But he
learned to wish that he had disregarded it on this occasion, for
Kamal-ud-din contrived marvellously to baffle his pursuers. He was
heard of in many places—now far ahead of his enemies, then at the
spot they had just left, and at this time there was a rumour that he
had managed to elude the troops altogether, and break back
towards the river. With the hot weather and the inundations close at
hand, this was a serious matter, and Brian anticipated a regular drive
—a combined effort to put an end once and for all to the young
Khan’s power for mischief. Little wonder, then, that Eveleen’s
insistence on the trip to Bab-us-Sahel failed to meet with sympathy.
Being anxious to get back to active service at the earliest
possible moment, Brian had obeyed orders so virtuously with regard
to his wound, that the surgeons were quite glad to have an
opportunity for rewarding him. His request was so modest—merely
to ride out to Khanpur with a supply convoy, which must necessarily
travel slowly and by night, pay his respects there to the General, and
return, thus at once testing his strength and increasing it, and the
doctors sped him joyfully. So did Eveleen. He felt bitterly afterwards
that he ought to have extorted a promise from her that she would
make no move until his return, but it is probable that at the time she
had no thought of anticipating it. According to her wont, she was
entirely convinced that things were going to happen as she wished,
and referred to Brian’s mission as though the General was merely to
be informed politely of the proposed journey instead of being asked
to permit it. Brian found this trying, and ventured to point out the
misconception, whereupon she faced round upon him with flashing
eyes.
“D’ye tell me Sir Harry would have the heart to keep Ambrose
here sick when a month or so at Bab-us-Sahel would set him up
entirely? It’s yourself is making the difficulty, Brian, and if you say
any more I’ll know you don’t want us to go.”
This was precisely the case, but it seemed rather heartless to
admit it to an affectionate wife torn with anxiety for her husband,
and Brian said no more. His disobliging attitude rankled in Eveleen’s
mind for a while after he started, but as so often happens, it was
opportunity that provided the impulse to action. She was sitting with
Richard as usual, and after a night largely sleepless by reason of the
heat, was dozing in her chair—not restfully, but spasmodically. She
was too tired even to resent actively the fact that the bearer had
seized upon the chance of doing something for his master, and was
remaking the bed—if it could be called making when there was so
little to make. He was talking, too, and Richard was answering
drowsily, or rather acquiescing, at due intervals. It was something
about a Parsee trader whose business required his immediate
presence at Bombay. He had secured boats and a guard of armed
men for the voyage down the river to Bab-us-Sahel, but though he
was intensely anxious to get there before the floods began, he was
horribly afraid of the wild tribes plundering on the banks, and would
give anything for the countenance and protection of European
fellow-travellers. By Richard’s murmured assents, the information
evidently conveyed nothing to him, but Eveleen was wide awake by
this time, and sat up suddenly.
“How did you hear this Firozji would like to take European
passengers in his boat, bearer?” she asked—in Persian which was
very much of the “station” order, but which long practice enabled
Abdul Qaiyam readily to understand. But he did not seem very clear
about his answer. The matter had been talked about among the
servants. They might have heard of it from Mr Firozji’s servants—he
did not know. Eveleen suspected at once that her desire to go down
the river had been discussed—as everything was discussed—by the
servants, who were always at hand to see and hear, and that one of
them knew sufficient of Mr Firozji’s affairs to conceive the idea of
bringing the two parties together in return for a tip from the Parsee,
and possibly another from herself. But to quarrel with the means by
which her wish might be attained would indeed be to look a gift-
horse in the mouth, and she questioned the bearer further, finding
him better informed than his previous vagueness might have
suggested. To secure the escort of Europeans, Mr Firozji would be
willing to give up to them his own large and comfortable boat,
occupying a smaller one himself, and his servants would undertake
catering and cooking, so that only personal attendants need be
taken. This clinched the matter. Eveleen bade Abdul Qaiyam
summon Mr Firozji to wait upon her as soon as possible, and then
turned her attention to the not unimportant detail of getting the
doctor’s leave for the move. She met the poor man with shock
tactics.
“Such a wonderful chance!” she cried triumphantly when he
came in on his evening visit—“splendid, I’d say, only the General
hates the word so. You know the way I have been longing and
wishing to get Ambrose down the river, but there wouldn’t be any
boats going?”
It was the first the surgeon had been told of it officially, but he
also had servants, and they also talked. Therefore he was able to
answer with truth, “I have heard of it, certainly.”
“Well, and now here’s the very thing—old Firozji in the Bazar
going down with more boats than he wants, all in a hurry to avoid
the floods, don’t you know. He’ll be glad of European passengers,
we’ll be glad to travel with him, so did y’ever hear anything nicer?”
“I am not surprised at his welcoming European fellow-travellers,
but I doubt your finding him the safest of company. He’s afraid of
the Codgers, of course.”
These were the Kajias, the wildest of the wild tribes of Lower
Khemistan, who in the mouth of the British troops naturally became
the Codgers, and their Khan the King of the Codgers. The Kajias it
was who had been so bold as to raid the outlying houses of Bab-us-
Sahel, and Sir Henry had sent the Khan a stern reproof and orders
to come in and surrender. Eveleen laughed as she thought of it.
“And the Codgers will be afraid of us. Sure the General has put
terror upon them—so that’s all right. After these two victories no one
would dare touch a European.”
“I trust you may be correct. But——”
“Ah, then, don’t but at me! Be good and kind like yourself, and
help me to make my bandobast in time.”
“Why, when do you want to go?”
“I haven’t seen Firozji yet, but the way the bearer spoke I’d say
he would start to-night if he could—and what could be better? I
mean”—she explained kindly—“that Ambrose won’t have the worry
of looking forward. He’ll wake up out of this drowsy state and find
himself on the beautiful cool water, and he will be pleased!”
“There’s something in that,” said the surgeon meditatively, and
went and looked at Richard, in whose eyes he caught a fleeting
gleam of recognition, which passed as quickly as it came. “But I fear
you won’t find it particularly cool on the river. The glare from the
sand and the water will be precious trying, after the shade here. You
don’t know what it means to be cooped up in a small boat in the hot
weather, with nothing but a mat roof between you and the sun, and
no possibility of finding even a rock or a tree to shelter you.”
“But it won’t be for very long,” cheerfully. “And nothing could be
hotter than ’tis here.”
The surgeon was well aware of the contrary, but Eveleen looked
so tired and washed-out that he could not bring himself to dash her
hopes. He remembered another objection, however. “But what about
getting leave? You can’t spirit away the General’s political assistant
without asking him.”
“Why, now, what could be better?” she cried joyfully. “My
brother has gone to see Sir Harry and get leave for this very trip,
only I never thought we’d find a passage so easily. Sir Harry can’t
refuse, and Brian must come on after and overtake us.”
“Or fetch you back, if Sir Harry should refuse.”
“He will not, I’ll answer for him. ’Twould be as much as to say
he didn’t wish Ambrose would get better.”
“I have no doubt you would tell him so, ma’am. And you ain’t
afraid of the responsibility of looking after your husband with no
doctor at hand?”
“Why, what can doctors do for him?” ungratefully. “Ah, now”—
realising what she had said,—“you know what I mean. You have
done all you can—you said so,—and here he lies in this state, and
you can get him no further. You’ll tell me what I’ll do if he seems
worse, and I’ll do it. Why would I be frightened at all?”
“I don’t see that the voyage can do him any harm so long as
you ain’t shipwrecked or attacked by the Codgers,” said the surgeon
dubiously; “and at Bab-us-Sahel you will be able to turn him over to
Gibbons. But for pity’s sake don’t go and get marooned on a
sandbank, or besieged in some barren spot on the shore without a
bit of shade, till your brother comes and rescues you. I can’t answer
for Ambrose if he’s exposed to the sun again, remember. The heat is
bad enough; you will have to keep the bearer pouring water over
him most of the day in any case, I expect.”
“I will, I will; and if we have to be besieged I’ll be sure to pick
out a shikargah or some other nice place. And you will see about a
pass for us, if one’s wanted, like the angel that y’are, and see that
no one would try to stop us, will you not?”
“But I would gladly keep you back myself until your brother was
here to take charge of you, if I didn’t know it would mean that you
would probably be prevented from going at all. Hang it, ma’am! I
wish you had sent me a chit to tell me what you wanted. How is a
man to consider things coolly with a flood of blarney pouring on his
head?”
“But sure I don’t want you to consider things—only to do them,”
said Eveleen innocently, and he went off laughing. That morning it
would have seemed absurd that she should actually find her wishes
fulfilled by the evening, but so it happened. Mr Firozji, a short elderly
man, who contrived somehow to be both stout and wizened at the
same time, was evidently waiting outside for the doctor to go. He
was very rich, very timid, and so grateful for the prospect of having
Major and Mrs Ambrose as fellow-passengers that he would have
promised almost anything to secure them, and Eveleen had to insist
that they should pay their share of the boat hire and other expenses.
“’Twould be a fine joke against Ambrose to save his pocket by
putting him under an obligation to a black man, but I won’t be
teasing him when he’s so ill,” she said virtuously to herself. “Though
Firozji would maybe think it only fair to pay for the protection of our
presence,” she added a little ruefully. “It’s well I’m not timid, for it
looks as if my courage would have to do the whole party.”
It was not the first time in her life that she had felt nervous over
the fulfilment of one of her impulsive wishes, but she had never had
the feeling quite so strongly as to-night. Abdul Qaiyam and Ketty
had it too, for they both enquired anxiously if she was not going to
wait for the young Sahib. She was obliged to be very firm and
cheerful with them over the process of packing, realising that they
would not be sorry if they could manage to delay things till the
opportunity was lost. Despite the heat, she flew about from the sick-
room to her own room and then to the verandah, deciding what
must be taken, and seeing with her own eyes that it was packed.
Abdul Qaiyam would never let his master go short, she knew—if
Richard suffered it would be through forgetfulness, not malice,—but
she had an idea that she herself might find various things lacking
that were indispensable to comfort unless she looked after them
herself. Richard remained in the same lethargic state until the
servants lifted him to carry him down to the boat. Then there came
another of those brief flashes of full consciousness, and he looked
disturbed—even protesting. Eveleen had a moment of terror lest her
plan should fall through even now. She bent over him and smiled
into his face.
“Off to Bab-us-Sahel!” she said brightly. “Do y’all the good in the
world!”
He seemed to try to say something, but in the effort the
drowsiness came over him again, and she was guiltily conscious that
she was glad. Once get him safely on board, and he might regain
command of his senses as soon as he liked. He was certain to make
a fuss—especially about her not waiting for Brian’s return—but she
would point out triumphantly that his return to consciousness was
the best possible proof of the wisdom of her action. The surgeon
came to see them on board, and gave anxious directions as to what
was to be done if various things happened, and she listened and did
her best to label them and stow them away in the proper
compartments of her mind. A number of friends were waiting to see
them off, for the sudden journey had given every one the idea that
Richard had had a serious relapse, and the only chance of saving his
life was to take him at once to Bab-us-Sahel, regardless alike of the
unpropitious season and the dangers of the way. They were very
quiet and sympathetic as he was carried down the path, but a
certain revulsion of feeling was perceptible when Eveleen followed.
Ambrose looked no worse than he had done for days, and Mrs
Ambrose certainly had not the look of strain that the situation
demanded. Just a little anxious, no doubt, as any woman is when
she is trying to remember whether she has got everything before
starting on a journey, but with a look of something like triumph as
well. The condolences and good wishes fell rather flat, and as they
returned up the cliff by torchlight the ladies told their husbands that
either Mrs Ambrose was trying to get rid of the Major by carrying
him off away from medical aid, or she was going down the river for
some purpose of her own, regardless of the effect on him.
The chill of disapproval made itself felt, and Eveleen was
conscious of depression of spirits. The boat was as comfortable as
had been promised, their possessions were easily arranged so as to
leave ample room for moving about, and one or two suggestions
which the doctor made for the invalid’s comfort were instantly
carried out. Yet she did not feel happy. The surgeon’s last remark
had been that they ought to have a guard of soldiers—he was
certain the General would have sent one had he been there,—and
anyhow, where were these armed servants of Firozji’s? Mr Firozji
explained anxiously that a boat had gone to fetch them, and they
would catch up the party below the camp, and the doctor said he
hoped it was all right, but his tone was doubtful. Eveleen
remembered it when the boatful of guards joined the other two.
They were armed, certainly—to the teeth, but they were a wild-
looking set, more like outlaws from the hills than the servants of a
law-abiding elderly merchant. But had Mr Firozji said they were his
servants? She could not remember that he had, and it looked very
much as though he had selected his guardians from among the
masterless men who had been left without occupation by the defeat
of the Khans. If she had guessed that he had carried one of the root
principles of Indian housekeeping so far as to guard against trouble
from the Kajias by going to some trouble to obtain members of the
tribe as his escort, she would have been still more uneasy, but she
told herself that it was too late to turn back now, and she must hope
for the best. She took out Richard’s pistols, and made sure that they
were loaded, and determined to sleep with them under her pillow
and a supply of ammunition within reach of her hand. After all, Brian
ought to catch them up in two days at most—less if he took a fast
boat and kept the crew up to their work. It did not occur to her that
Brian might be in no hurry to get back from Khanpur. He was a man
of many friends, and there was plenty to hear from all of them, and
he had no particular objection to leaving Eveleen to cool her heels at
Qadirabad, as he believed, for a day or two. The longer his return
was delayed, the more likely was she to have some new plan in her
head—completely ousting the Bab-us-Sahel one,—or the floods
might even have begun, and the journey be out of the question.
The surgeon’s warning came back to Eveleen many times in the
course of the next day, and when evening came she would readily
have confessed that at the Residency she had not known what heat
was. In her anticipations, the voyage had offered all the advantages
of a steamer except its speed, coupled with the absence of smoke
and smell, and the delight of being near the water. But she found
that with the greater speed of the steamer went the pleasant
sensation of moving air, and that the long hot hours when there was
no breeze to fill the sails, and the river-current seemed incredibly
slow, provided a new form of torture—such as might be experienced
by a speck of dross on the mirror-like surface of a huge cauldron of
molten metal. Even Richard was conscious of it, as she could not but
see. He did not recognise her—not even her voice when she spoke
to him,—but he gasped feebly, with now and then a pitiful little
moan. The fear gripped her that he might die before her eyes, and
with threats and bribes she induced one of the boatmen and a
servant of Mr Firozji’s to keep the roof of the cabin continually wet
with buckets of water, while Abdul Qaiyam performed the same
service for his master beneath it. It was no light task, for the heat
seemed to dry things at once, and leave them even drier than
before; but she threw all her energy into the business of keeping the
men at their work, and when evening came her husband was a little
easier. She had a moment to rest, and to notice what she had not
done before—the threatening look of the sky. Mr Firozji, in a
quavering voice which sounded absurdly small for his substantial
bulk, opined that they were going to have a thunderstorm, and
Eveleen did not need him to tell her that if this extended far up the
river, it would mean that the dreaded inundation would begin at
once. Other people realised this as well, for the lazy boatmen began
to work with some appearance of energy, and the headman of the
guards came into Mr Firozji’s boat to urge some course of action
upon him, which he refused, though with a fluttering politeness
which betrayed alarm. Since there was still no breeze, it was
necessary to pole the boats along, as this wide unsheltered channel
was not a safe place in which to be caught by the storm; and the
boatmen poled to such good purpose that before the rapid darkness
fell, the flotilla was moored under the lee of an island—or rather
sandbank—which promised some protection from wind and current.
CHAPTER XXI.
WELL AND TRULY LAID.

Still the storm tarried. Supper was served, and Eveleen made a
pretence of eating, lest the servants should attribute her lack of
appetite to fear. Then they went away to have their food—Ketty
eating in self-righteous solitude, while Abdul Qaiyam fraternised with
the boatmen, who had kindled a fire on the island to cook their rice.
Eveleen envied them as they sat in the smoke, for it served to keep
away mosquitoes and other flying pests, while she durst not light a
candle for fear of filling the cabin with the winged intruders. Alone
with her unconscious husband, she kept a dreary vigil, fearful of she
knew not what. She remembered that Richard had seemed about to
say something when the boat with the guards came up, but the
momentary impulse had passed, and he had shown no inclination to
speak since. What was it that had troubled him? Could it be that he
had recognised any of the men? But even so, what could the guards
do, even if ill-disposed? They might intend robbery, but the modest
belongings of the pair would be poor booty compared with the
danger of provoking the certain vengeance of the Bahadar Jang. Or
if they were indeed adherents of the Khans, their object might be
simply to avenge the wrongs of their former masters; and Eveleen
shuddered as she remembered what had befallen an invalid officer,
on his way down the river, at the hands of some of Khair Husain
Khan’s servants. Dragged from his boat shivering with fever, the sick
man had pleaded with the robbers, as he thought them, to leave
him his clothes, because he was so cold, and they had responded by
cutting off his head. Sir Harry had acted as might have been
expected of him, informing the Khan he would hang him from the
round tower of the Fort unless the guilty servants were given up.
They were produced in an hour, and suffered the penalty their
master escaped, though it went sorely against the grain with Sir
Harry to spare Khair Husain and punish his tools. That example
ought to serve as a salutary warning, surely?
But Eveleen could not take comfort. The servants had returned
and made things ready for the night, and she had lain down on her
bed, though knowing she could not sleep. Every sense seemed to be
more than commonly alive, as though the coming storm, which had
lulled Richard into lethargy, merely stimulated her. Theoretically no
one was awake within miles of her—for what was the use of posting
sentries on an uninhabited island in the middle of a wide river?—but
the air was full of little unaccountable noises. A feeble soughing wind
that went and came, distant irritable growlings of the storm, the
rattling, rather than rustling, of the withered grass and rushes—
these sounds she could identify, but there were others whose
meaning eluded her. Of course it was only the lapping of the water
that sounded like whispers, and when one might think some one had
dropped a weapon it was merely the snapping off of a dead branch
by its own weight; but she wished they would not happen. The
blinds at the ends of the cabin were rolled up to allow the free
passage of air, and she lay looking out at the leaden sky, with no
companionable stars to brighten it, and listening to the sounds, and
there fell upon her at last an agony of terror. It had always been her
boast that she did not know what nerves were, but she would never
make it again. The beating of her own heart sounded to her like the
rise and fall of a tremendous piston, such as she had once heard in a
Dublin factory, filling the whole earth and sky; and as she cowered
before its relentless thud, she trembled with cold, though the
slightest movement made her aware that her whole frame was
streaming with perspiration. She who had been afraid of nothing was
afraid of everything—the place, the time, the weather, the solitude,
the company, the silence, the sounds,—what she saw and what she
did not see.
She shook herself angrily free from the overmastering terror at
last—or at any rate, which perhaps showed equal courage, she acted
as if she did. Struggling from the bed and to her feet—for she found
she must put forth all her strength, as though she were really being
held down by a powerful hostile hand,—she threw on a dressing-
gown and groped her way forward. The old bearer, curled up like a
dog beside his master, heard her and looked up curiously: she saw
his bright eyes like a dog’s in the dark, lighted by some gleam
behind her, perhaps the ashes of the dying fire on the shore. She
stood looking out, but there was nothing to see. Dark sky, dark
water—a perfect pall of darkness brooding over everything,—and on
her left a slightly deeper darkness which showed the position of the
island and its ragged grass and shrubs. The voices of the night were
whispering as before, and again she felt that terrible sensation of
helplessness. Once she opened her lips to pray, but her pride was
not broken yet. “And how would I pray,” she asked herself sharply,
“when I know every bit of it’s my own doing?”
She staggered as she spoke, and caught at the framework of
the cabin to steady herself. What had made the boat lurch suddenly
—some wave which was the result of the storm higher up, its
precursor here? She looked more narrowly at the water. Was it fancy,
or did she see round things moving in it? And surely there were
strange amorphous shapes where there had been none before? Her
heart stood still. The change, if change there was, was so soundless,
so ghostly. But the thought of the supernatural passed from her
mind with a shock. The boat was moving. Not merely swaying at its
moorings as the current tried to suck it away from the protecting
island, but moving out into the stream and leaving the island behind.
Wild thoughts of crocodiles rushed into her mind. Could they
possibly bite through stout ropes and tow a boat along, or even
leave it to float at its own sweet will? Impossible; there must be
human agency at work. With Eveleen to think was to act, and
kneeling precariously at the side of the boat, she leaned over the
gunwale and clutched at one of the round objects she had thought
she saw. The yell of horror which came from it told her what the
sense of touch told also, that it was a human head. The boat was
surrounded by swimming men, who were moving it away from the
island—presumably it was also being towed by a rope. But what the
great shapeless objects were, which she seemed to see beyond the
heads, she could not tell, nor did she trouble to conjecture. Whether
she or the man she had grasped was the more astonished might be
doubtful, but she had the advantage of position. Catching up an
earthen water-pot which stood outside the cabin for the sake of
coolness, she hurled it in the direction of the yell, and was on her
feet in a moment and under the mat roof. When she came out,
Richard’s pistols were in her hand, and she fired one in the direction
of the island as a signal. She could not believe that Mr Firozji was
concerned in any plot that might be toward, and if he was a man at
all he would come to the rescue with those guards of his.
The immediate response to her signal was a startling one. She
had barely time to recharge the pistol, working clumsily in the dark,
before there was a hasty movement of men aft—whether the
boatmen or the swimmers she could not tell, nor was she much
concerned to know. At the moment she was more conscious of
Abdul Qaiyam’s heavy breathing close beside her as he asked in a
bewildered voice whether the Beebee had shot anybody than of her
possible assailants. Hurriedly she thrust the ammunition pouch at
him.
“Load when I pass y’a pistol!” she said sharply, and then called
out in her imperfect Persian to the men in front that if any one came
nearer she would shoot him. One man sprang forward, and she fired
at him point-blank. The blind shot in the dark must have taken
effect, for the man cried out and fell forward. Confused cries of rage
and protest came from the rest, and Eveleen held her hand. For the
moment she had thought of discharging all the three shots she had
left into the group, in the hope of driving them overboard at once,
but the imprudence of leaving herself defenceless, even for a
moment, was reinforced by mystification. The whole thing was like a
bad dream—the shapes in the water, the moving crowd dark against
the dark sky, the eager talking in an unknown tongue. If it was
Persian, her knowledge of the language was quite inadequate to
cope with it. She stooped a moment towards Abdul Qaiyam as he
handed her the recharged pistol.
“Speak to them!” she said imperiously. “Ask them who they are
—what they want. Tell them we are well armed, and can see them
though they can’t see us.”
The old man was too much terrified to obey immediately, and
she thrust at him impatiently with her foot. Then his quavering voice
made itself heard—“Brothers!” and the men in front appeared to
listen. One of them stepped forward a little.
“Stand back, or I fire!” said Eveleen quickly, and the bearer
repeated the words in Persian. As he spoke, she remembered
suddenly that she must be visible to any one able to see through the
cabin from end to end, and she sank on her knees, resting the barrel
of the heavy pistol on the back of a camp-chair which she pulled
noiselessly towards her. Crouching thus, she was invisible to those in
front, and a barrier—if a frail one—between Richard and the enemy.
But were they enemies, or was there some absurd mistake? She
could not decide, but she felt fairly certain that what they had been
speaking was not Persian, though the spokesman—who had
withdrawn a pace or two hastily before her threat—was using that
language with Abdul Qaiyam.
“These are very bad people,” the old man murmured to her at
last, and she listened without turning her head. “Kajia tribe—they
come to steal the boat—everything.”
“Nonsense! they’ll not do anything of the sort. Where will the
Parsee be, now? letting this kind of thing happen instead of coming
to help us.”
To her amazement the meek voice of Mr Firozji answered her—
apparently from somewhere close at hand. In her bewilderment she
suffered her gaze to stray for a moment, and discerned dimly that
he was just outside the boat, but seemingly not in the water. At
least, his voice was on a level with the gunwale, though there was
no grating sound to show that another boat was rasping alongside.
The mad incomprehensibility of the situation was more
incomprehensible than ever.
“The Beebee beholds in me a son of misfortune,” he said
pathetically. “The Kajias have deceived me. They have stolen the
boat, so as to carry away the Sahib, the Beebee, myself, the servant
people—all.”
“And what may those guards of yours be about, to let them do
it? Call them, can’t you? Shout!”
“The Kajias would slay me,” in affright. “The guards are asleep.”
“Much good they are! But what do the Kajias want to do with
us? We’d be no good to them to steal.”
“Are they not taking us to their camp?” he suggested doubtfully.
“Well, they won’t, then. Tell them to go back and leave us on
the island, and take the boat if they want it.”
“They say the water will soon be rising, and we should all be
drowned. They refuse to leave us.”
“Sure they’re very considerate! Well, tell them we won’t go to
their camp—or if we do, there’ll be precious few of them will take us
there. I have plenty of shots here, and I’ll use them all first.”
“What does the Beebee please to desire?” was the question
asked after some interchange of conversation between Mr Firozji and
the captors. Eveleen had employed the interval in thinking hard. She
did not believe the Kajias meant to take their victims to their camp—
or if they did, it was merely for the sake of killing them more at their
leisure. It was in the highest degree unlikely that they would leave
witnesses alive to testify against them, or provoke Sir Harry further
by attempting to hold them to ransom. No, what they had no doubt
intended was to tow the boat out of earshot of the sleepy guards on
the island, and then cut the throats of all on board, and gut the
vessel and send her adrift, in the comfortable conviction that nothing
but unrecognisable fragments would survive the storm. This seemed
the more certain from their bringing with them the means of getting
to shore again, for the mysterious shapes—on one of which Mr
Firozji was uncomfortably poised, like a river-god in difficult
circumstances—were obviously the mashaks, or inflated skins, with
the help of which the tribes on the banks were in the habit of
making such short voyages as they found necessary. How they had
managed to abstract the poor little man from his own boat, under
the eyes of his servants, was a mystery, but everything was
mysterious to-night.
He repeated his question as Eveleen hesitated a moment.
“Why, let them take us over to the other side,” she answered—
the desire to be as far as possible from the Kajias conquering all
other considerations. “I’d rather choose the desert than their camp.”
“There is no time. They are afraid of the storm.” Mr Firozji’s
voice sounded as if he was frightened himself.
“Well, they may say whether they’ll be shot, or drowned in the
storm. I’d much rather be drowned——” She stopped suddenly, for
the second pistol, which had lain beside her knee, was hastily
withdrawn, and a shot rang out behind her. Then she laughed rather
wildly, for the deferential voice of the old bearer murmured—
“This humble one made bold to fire at one of the sons of
wickedness who was climbing into the boat behind the Beebee’s
back.”
“Quite right!” she said, still laughing, then turned sharply upon
Mr Firozji. “Tell them they are wasting time. If the storm overtakes
us ’twill be their fault. I’m tired of this. Let them make up their
minds.”
Again there was a prolonged conversation, and apparently the
Kajias gave a grudging assent to the condition. “If the Beebee is
determined to drown all of us and the Kajias too, she must,”
remarked Mr Firozji sourly as he scrambled on board the boat,
having taken the opportunity of putting in a word for himself in the
course of the negotiations. Yet Eveleen had the idea that he was not
really displeased, and she wondered whether he could possibly be in
league with the Kajias after all. But the notion seemed so absurd
that she banished it again, though disregarding coldly his hints that
the night air was unhealthy, and refusing to invite him into the cabin.
The Kajias—or the boatmen—or perhaps they were the same: it was
impossible to see—were very busy, working with an alacrity rather
surprising in the circumstances. There was a slight chill breeze to be
felt now, and they were hoisting the sail, and also getting out their
poles. Were they really indifferent which bank they landed on, or
were they plotting further treachery? As noiselessly as she could,
Eveleen supplemented the chair which served her as a parapet by
such other pieces of furniture and packages as she could reach, and
whispered to Abdul Qaiyam to do the same at the other end of the
cabin, entrusting him with one of the pistols. In feeling about, she
came across Ketty, who had preserved such an unwonted silence
during the stirring events of the last half-hour that her mistress had
forgotten all about her. But she had been employing her time to
advantage, as Eveleen discovered when she found her dressing-case
open and largely denuded. Her handmaid had been removing such
fittings as were of convenient size, and concealing them about her
person.
“What in the world are you doing, Ketty?” The tone would have
been louder but for prudential reasons.
“What madam doing without her things?” was the self-righteous
reply, calculated to make Eveleen repent her unjust suspicions. Were
they really unjust? she wondered.
“Well, I hope y’are taking care of the Sahib as well,” she said.
“He needs much more than I do.”
The sniff with which Ketty replied suggested that she considered
this would be trespassing on Abdul Qaiyam’s province, but her
mistress had no time to see whether she was obeying or not, for
there were other things to think of. The tardy storm was coming up
at last, heralded by the breeze which was taking the boat across the
stream. Great drops of rain were falling like bullets on the cabin roof,
and the air was full of a hissing noise. The boat was in the main
stream now, and the boatmen drew in their poles, and evidently
settled down to hold tight and hope for the best. The river seemed
bewitched, cross-currents driving the boat now this way, now that,
and the men who were managing the clumsy sail had no easy task.
The vessel was not built for rough weather, her draught being too
shallow and her deck-load too heavy. She bounced and bobbed
about, shipping a good deal of water, and hurling all the loose things
in the cabin from side to side with every lurch. Fearful of a surprise,
Eveleen durst not leave her post even to see that Richard was safe,
and had to take what comfort she could from the knowledge that his
charpoy was fixed to the deck. By the sounds she heard, she
gathered that the two servants were in the throes of sea-sickness,
and she wondered dismally what would happen if she herself were
prostrated by it as on the voyage from Bombay. But her mental
preoccupation probably saved her, and she was able to maintain her
watch. Sheets of rain were falling now, and she was soaked to the
skin, but did her best to shelter the pistol under the wadded quilt
she dragged from her bed. The lightning was almost continuous, and
whenever the howling and shrieking of the wind would allow, the
rolling thunder filled up any pauses. The boat appeared to have
embarked with enthusiasm on a series of experiments—now trying
to stand on her head, now on her tail, and then seeing how far she
could heel over without actually dipping gunwale under. It was
wonderful that the mast did not go, though the great sail had been
partly torn and partly cut away, and replaced by a tiny one which
just kept the vessel before the wind. By the flashes of the lightning
Eveleen noted grimly the miserable huddled figures forward, and
guessed that the Kajias were not particularly happy in their
conquest.
“If only there was a man on board worth a halfpenny—barring
my poor Ambrose,” she said to herself, “we’d retake the ship in no
time. But who is there at all? Firozji is no mortal use; if Bearer can
fire a pistol, that’s the most he can do; and as for the boatmen, if
they ain’t Codgers themselves, they’re every bit as bad. Indeed and
they’re worse, for they ain’t sea-sick.”
Her self-communing was interrupted by a tremendous clap of
wind, which came down on the boat as though determined to end
her gambols at one blow. But once more she righted herself, though
the cabin roof was torn bodily from its supports and carried gaily
down the river. Eveleen’s heart failed her until she had assured
herself, by groping and feeling, that Richard and the two servants
were still there. The roar and crack had been so overwhelming that
for the moment she fully believed the boat had broken in two, and
they were all so wet already that the exposure to the rain hardly
signified. Moreover, the loss of the mast and the cabin made the
boat decidedly steadier, though Eveleen was less grateful for this
than might have been expected, since she saw distinct signs of
returning animation among the captors when the lightning made
them visible. Could they be nearing the shore? she wondered. How
long they had been tossing about, yet on the whole forging
eastwards, she could not tell, but now that the lightning was less
continuous, it seemed to her that between the flashes the darkness
was not quite so in tense. It was a poor prospect—to be turned out
on an unknown shore with a sick man and two frightened servants;
but the expectation of treachery was so strong in her mind that she
would have been thankful if they had been already there. Certainly it
was not goodwill on the part of the Kajias that had induced them to
undertake a voyage of so much danger and difficulty to get rid of
their prisoners, with the prospect of another even more difficult and
dangerous in getting back to their own side of the river; what then
was it? It was not fear. During her tempestuous vigil she had seen
that clearly. Her bluff before the storm had been spirited, but at any
moment she might have been rushed from behind and thrown
overboard, or a man on a mashak, shooting at the sound of her
voice in the dark, might have crippled or killed her without the
slightest risk to himself. It could hardly be vengeance, since—though
it might involve more suffering to your captives to maroon them on
the barren shore where they had mistakenly asked to be placed than
to kill them and dispose of their bodies in the river—their sufferings,
which you would not see, would hardly be sufficient compensation
for the risk to yourself involved in getting them there. Mr Firozji, too.
A certain complacence about the little man’s manner led Eveleen to
the conclusion that the greater part of his merchandise must consist
in precious stones hidden about his person, so that he could regard
lightly the loss of all the rest. But if she could guess this, so could
the Kajias, and were they really going to allow him to escape with it?
The whole thing—like all the events of the night—was beset with
riddles, and all that could be done was to keep a sharp watch
against surprise. But in what direction? Eveleen did not know where
to look, and moreover, the unceasing strain of the last few hours
was telling upon her. She had been soaked so repeatedly that she
could hardly remember what it was to feel dry and warm; she was
aching in every limb, and—what was worse—her eyes would hardly
keep open. In spite of the misery of body and anxiety of mind which
had already endured so long, she began to find her eyelids closing
involuntarily and imperceptibly, when she knew she ought to
redouble her vigilance of the night now that dawn would soon give
her enemies the advantage. She had no longer even the shelter of
the cabin from which to fire, and her poor attempt at a barricade
had been disintegrated long ago, and its component parts strewn
upon the waters. She turned her head with difficulty, and saw—yes,
the light must be increasing, since now she could see dimly Richard’s
white face as he lay stark and stiff, like a dead man, on the charpoy,
which was fortunately fixed against the framework of the cabin at
the corner where it had suffered least, the old bearer crouched
beside him, one hand clenched on the pistol, and Ketty hunched up,
like a little old monkey, nearer to herself. They were defenceless but
for the two pistols—even if the charges were not too damp to fire.
The Kajias could shoot them down without the slightest risk, or—
supposing their matchlocks also were useless, or their powder too
precious to waste on such game—kill them with their knives with
little danger to themselves. Why had they not done it long ago?
With equal difficulty Eveleen turned again towards them, where
they sat huddled in the bow, with the boatmen as a sort of neutrals
between, and Mr Firozji, with chattering teeth, crouching alone as
though disowned by all parties. The men in the bows were
beginning to lose something of their despairing attitude—taking an
interest in things again, and exchanging a word or two with one
another. She could see them, though in the driving rain she could
not hear them; and she tried to pierce the veil of moisture ahead,
and see if land were visible. But as yet she could see nothing but a
grey expanse of angry water, yellow in streaks with sand, and
bearing on its bosom uprooted trees and brushwood, with the grey
sky overhead and the grey curtain of rain between. She tried to
collect her thoughts and devise some way of getting Richard ashore
—when they reached the shore. But what kind of shore would it be
—high and rocky, or the endless flat land over which the flooded
river must now be crawling relentlessly? How could she decide till
she knew?
The end came suddenly—so suddenly that for the moment she
thought she must have been asleep, and missed what led up to it.
The boatmen had their poles out again, the keel was grating on
ground of some sort, and yet there was still nothing to be seen but
the river and the rain. But to the accustomed eyes of the Kajias
more must have been visible, for they were standing up and talking
eagerly. She noticed indifferently what big strapping fellows they
were—picturesque despite their drenched clothes and shapeless
turbans, and the ringlets, of which they were ordinarily so proud,
lying limp and straight on their shoulders and mingling with their
beards. The absurd reflection occurred to her that the rain must
have washed them a little clean, which would be a strange
experience to them. One of them turned round and kicked Mr Firozji,
saying something to him, and the old Parsee stumbled up from the
deck and addressed Eveleen in his beautiful Persian, which she
found so difficult to understand.
“The boat can go no farther—the water is shallow——” his
words tumbled over one another. “The boatmen will carry the
Beebee ashore, if she will promise not to shoot.”
“Let them take the Sahib first,” said Eveleen promptly, then
hesitated. How could she let them carry Richard away out of her
sight, not knowing where they were taking him? Better go first
herself. And yet how could she know how roughly they might handle
him if she and her pistol were not there? “Won’t you go first
yourself?” she asked eagerly. “Then you can see that they put Major
Ambrose down carefully, and I will come last.”
Mr Firozji’s face was ashy. “I fear—I greatly fear,” he
stammered. “I have the conviction that they will kill me if I leave the
Sahib and the Beebee.”
Clearly there was no help here. She must take the risk. She
turned to Abdul Qaiyam. “Watch over the Sahib, bearer; see that
they carry him properly on the charpoy. Fire the pistol if they are
rough, and I will come back. I can’t be any wetter than I am,” she
added to herself, and rather wondered that the captors should offer
to put her ashore instead of letting her wade. But when she was
mounted on the shoulders of a sturdy boatman, with another close
at hand in case of accidents, she saw how bad the footing was, and
how confusing the currents even in this shallow water. Just as they
started she heard a resounding splash, and looking round, was
touched to see that Ketty had deliberately thrown herself—or rather
let herself—into the water from the boat’s side, and was struggling
after her, clutching the scanty drapery of the second boatman. The
water was up to the old woman’s chest, but she pushed on bravely,
and though the men on board laughed, they did not attempt to stop
her.
How far the two men waded Eveleen did not know. The boat
was only dimly visible as a misty shape through the falling rain when
they reached land as suddenly as they had discerned it earlier. It
was land in the sense of not being covered with water, but it
resembled nothing so much as a sandbank left bare, though not dry,
by the retreating tide. Yet apparently it was not an island, for it
seemed to rise slightly on the side away from the boat, and to
continue rising; and when Eveleen felt her feet on firm ground once
more, her spirits went up with a bound. Anything was better than
that dreadful boat and the company it carried, and when the rain
stopped—which it must do soon now—they would quickly be dry and
comfortable, and could look for some village where there was food
and shelter to be found. She said as much to Ketty as they stood
looking after the two men, whose forms were soon swallowed up in
the driving rain. Most incomprehensibly, Ketty laughed; but before
Eveleen could demand the reason, her cheerful anticipations were
rudely contradicted by the sound of a shot from the boat, with cries
and the muffled noise of a struggle. Unheeding Ketty’s agonised
entreaties and attempt to hold her fast, she dashed into the water
and began to wade back. The boat seemed farther away than she
had been—and surely the boatmen were poling her off? Eveleen
gave a great cry as the truth burst upon her, then struggled on
again, though with failing strength, hindered by her clothes and the
treacherous sand. Somehow or other she reached the boat when the
water was up to her shoulders, and clung convulsively to the
gunwale, shrieking to her husband to wake, to escape, to save
himself, to save her. Mr Firozji lay on the deck in a pool of blood, and
the murderers were already stripping off his clothes in search of
booty. In front of his master stood Abdul Qaiyam—a most unheroic
hero, with the pistol wavering in a shaking hand, and a face grey
with fear. A man with a tulwar sprang at Eveleen as she clung to the
side, and brought down his weapon with a horrible sweep. In terror

You might also like