[Ebooks PDF] download Hands-on Azure Functions with C#: Build Function as a Service (FaaS) Solutions 1st Edition Ashirwad Satapathi full chapters
[Ebooks PDF] download Hands-on Azure Functions with C#: Build Function as a Service (FaaS) Solutions 1st Edition Ashirwad Satapathi full chapters
com
https://ebookmeta.com/product/hands-on-azure-functions-with-
c-build-function-as-a-service-faas-solutions-1st-edition-
ashirwad-satapathi/
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/dessert-a-tale-of-happy-endings-1st-
edition-jeri-quinzio/
ebookmeta.com
MT6360 PMIC Datasheet Version 1 1 Release date 2019 05 24
Mediatek Inc
https://ebookmeta.com/product/mt6360-pmic-datasheet-
version-1-1-release-date-2019-05-24-mediatek-inc/
ebookmeta.com
https://ebookmeta.com/product/getting-to-know-vue-js-learn-to-build-
single-page-applications-in-vue-from-scratch-1st-edition-brett-nelson/
ebookmeta.com
https://ebookmeta.com/product/greed-an-amber-monroe-crime-thriller-
book-1-sutter-c-m/
ebookmeta.com
https://ebookmeta.com/product/next-in-line-us-edition-jeffrey-archer/
ebookmeta.com
https://ebookmeta.com/product/shipwrecks-of-lake-erie-tragedy-in-the-
quadrangle-1st-edition-david-frew/
ebookmeta.com
Creole Societies in the Portuguese Colonial Empire 1st
Edition Philip J. Havik
https://ebookmeta.com/product/creole-societies-in-the-portuguese-
colonial-empire-1st-edition-philip-j-havik/
ebookmeta.com
Ashirwad Satapathi and Abhishek Mishra
Abhishek Mishra
Mumbai, Maharashtra, India
This work is subject to copyright. All rights are solely and exclusively
licensed by the Publisher, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in
any other physical way, and transmission or information storage and
retrieval, electronic adaptation, computer software, or by similar or
dissimilar methodology now known or hereafter developed.
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress
Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
This book is dedicated to my father, Mr. Upendra Satapathi, and mother,
Mrs. Sabita Panigrahi, for supporting me through each and every phase
of my life. Without your support I wouldn’t have been able to complete
this book.
—Ashirwad Satapathi
This book is dedicated to my super dad, Mr. Balabhardra Mishra, and
loving mom, Mrs. Pragyan Mishra.
—Abhishek Mishra
Introduction
Azure Functions is a function as a service (FaaS) offering on the Azure
Platform. In this book, you will explore Azure Functions in detail and
learn how to work with Azure Functions using a practical and example-
based approach that will help you grasp the subject with ease.
The book will start with the essential topics. You will learn how to
set up the application development environment for Azure Functions.
Then you will get example-based steps for building a serverless
solution using a combination of bindings and triggers in C#. The book
will then dive into areas that will help you learn how to create custom
bindings, connect with various data sources, ingest telemetry data for
Azure Functions into Application Insights, and learn various ways to
deploy the functions to the Azure environment.
You will also explore advanced areas such as running Azure
Functions in an Azure Kubernetes Service cluster using Kubernetes
Event Driven Autoscaling (KEDA). You will learn the DevOps way of
working with Azure Functions using Azure DevOps, as well as the best
practices you should follow while using Azure Functions.
This book provides production-like scenarios and provides labs that
will deliver the right set of hands-on experience. The practical approach
in the book will help you gain deep proficiency in the subject.
This book is intended for experienced developers, cloud architects,
and tech enthusiasts looking forward to building scalable and efficient
serverless solutions using Azure Functions. Anyone having a prior
experience with C# and knowing the Azure basics can use this book to
start their journey in building serverless solutions with Azure
Functions.
Acknowledgments
We would like to thank the Apress team for giving us the opportunity to
work on this book. Also thanks to the technical reviewer and the editors
for helping us deliver this manuscript.
Table of Contents
Chapter 1:Introduction to Azure Functions
Structure of the Chapter
Objectives
Introduction to Azure Functions
Introduction to Serverless
Azure WebJobs vs.Azure Functions
Advantages and Disadvantages of Azure Functions
Hosting Plans for Azure Functions
Consumption Plan
Premium Plan
Dedicated Plan
Use Cases for Azure Functions
Summary
Chapter 2:Build Your First Azure Function
Structure of the Chapter
Objectives
Create Functions Using the Azure Portal
Create Functions Locally Using the Command Line
Create Functions Using Visual Studio Code
Create Functions Using Visual Studio
Summary
Chapter 3:What Are Triggers and Bindings?
Structure of the Chapter
Objectives
Introduction to Triggers and Bindings
Supported Triggers and Bindings
Trigger and Binding Use Cases
Use Case:An Azure function gets triggered when a message
arrives in a queue, and the processed message is put into
another queue
Use Case:A scheduled job picks up images for Blob Storage
at a particular time interval and then processes and stores
them back in the Blob Storage
Use Case:An HTTP call invokes an Azure function to execute
some business logic
Use Case:An event grid can invoke an Azure function to
send an email with event data
Use Case:RabbitMQ triggers an Azure function that
processes the message sent by RabbitMQ and puts the
processed message in Azure Cosmos DB
Implement Triggers and Bindings for Azure Functions
Summary
Chapter 4:OTP Mailer with Queue Storage Trigger and SendGrid
Binding
Structure of the Chapter
Objectives
Getting Started with a Queue Storage Trigger and Use Cases
Build a Sample Application Using a Queue Storage Trigger
Getting Started with a SendGrid Output Binding and Use Cases
Build a Sample Application Using the SendGrid Output Binding
Create an OTP Mailer Using a Queue Storage Trigger and
SendGrid Output Binding
Summary
Chapter 5:Build a Report Generator with a Timer Trigger and Blob
Storage Bindings
Structure of the Chapter
Objectives
Getting Started with Timer Triggers and Use Cases
Build a Sample Application Using a Timer Trigger
Getting Started with Blob Storage Bindings and Use Cases
Build a Sample Function Using a Blob Storage Binding
Create a Report Generator Using a Blob Storage Binding and
Timer Trigger
Summary
Chapter 6:To-Do API with an HTTP Trigger and a Table Storage
Binding
Structure of the Chapter
Objectives
Getting Started with HTTP Triggers and Use Cases
Build a Sample Application Using an HTTP Trigger
Routing in HTTP-Triggered Azure Functions
Getting Started with Table Storage Bindings and Use Cases
Build a Sample Application Using a Table Storage Binding
Create a To-Do API with an HTTP Trigger and a Table Storage
Binding
Summary
Chapter 7:Creating Custom Bindings for Azure Functions
Structure of the Chapter
Objectives
Introduction to Custom Bindings
Use Cases for Custom Bindings
Build a Custom Binding for Azure Functions
Create an Azure Function
Implement the Binding Attribute Class
Implement the Binding Logic Class
Implement the Binding Extension Class
Implement the Binding Startup Class
Incorporate the Binding in the Azure Function
Summary
Chapter 8:Building Serverless APIs Using Azure Functions and
Azure SQL
Structure of the Chapter
Objectives
Problem Statement
Creating an Azure SQL Database Instance in the Azure Portal
Building Serverless APIs for the Proof of Concept
Testing the Serverless APIs for the Proof of Concept
Summary
Chapter 9:Serverless API Using Azure Functions and Azure
Cosmos DB
Structure of the Chapter
Objectives
Introduction to Azure Cosmos DB and Its Use Cases
Getting Started with Azure Function Cosmos DB Triggers by
Building a Simple Application
Build an HTTP-Triggered Azure Function to Perform CRUD
Operations on Azure Cosmos DB Using Bindings
Leverage the Azure Cosmos DB SDK to Interact with Cosmos DB
from Azure Functions
Summary
Chapter 10:Enabling Application Insights and Azure Monitor
Structure of the Chapter
Objectives
Enable Logging Using Application Insights
Perform Diagnostics for Azure Functions
Monitor Azure Functions and Create Alerts
Restrict the Number of Scaling Instances for the Azure Function
App
Summary
Chapter 11:Storing Function Secrets in Azure Key Vault
Structure of the Chapter
Objective
Getting Started with Azure Key Vault
Create an Azure Key Vault in the Azure Portal
Store Secrets in Key Vault
Create an Azure Function in the Azure Portal
Add an Access Policy for Azure Key Vault
Summary
Chapter 12:Authentication and Authorization Using Azure Active
Directory
Structure of the Chapter
Objectives
What Is Azure Active Directory?
What Are Authentication and Authorization?
Implement Authentication and Authentication for Azure
Functions Using Azure Active Directory
Summary
Chapter 13:Securing Azure Functions with API Management
Structure of the Chapter
Objectives
What Is the API Management Service?
Advantages of Using the API Management Service
Integrate API Management with Azure Functions
Summary
Chapter 14:Deploying Your Azure Functions Using IDEs
Structure of the Chapter
Objective
Deploy an Azure Function to Azure Using Visual Studio 2019
What Are Deployment Slots?
Deploy an Azure Function to Deployment Slots
Deploy an Azure Function to Azure Using VS Code
Summary
Chapter 15:Deploying Your Azure Functions Using a CI/CD
Pipeline with Azure DevOps
Structure of the Chapter
Objectives
What Is Azure DevOps?
Create a Project in Azure DevOps
Create a Build Pipeline in Azure DevOps and Enable Continuous
Integration
Create a Release Pipeline in Azure DevOps and Enable
Continuous Delivery
Summary
Chapter 16:Running Azure Functions in Containers
Structure of the Chapter
Objectives
Getting Started with Containers and AKS
What Is Serverless Kubernetes and KEDA in Azure?
Containerize Azure Functions and Push Them to the Azure
Container Registry
Deploy the Containerized Azure Functions in AKS Using KEDA
Summary
Chapter 17:Adding Cognitive Capabilities to Your Azure Functions
Structure of the Chapter
Objective
Getting Started with Azure Cognitive Services
Getting Started with Azure Text Analytics
Create an Azure Text Analytics Resource in the Azure Portal
Build a Serverless API to Analyze Feedback Using Sentiment
Analysis
Test the FeedbackAnalyzerFunction Using Postman
Build a Language-Based Document Classifier Serverless
Solution
Test the Language-Based Document Classifier Function
Summary
Chapter 18:Introduction to Azure Durable Functions
Structure of the Chapter
Objectives
Getting Started with Azure Durable Functions
Benefits of Azure Durable Functions
Application Patterns
Fan-Out and Fan-In
Function Chaining
Async HTTP APIs
Monitoring
Human Interaction
Aggregator
Implement an Azure Durable Function
Summary
Chapter 19:Integrating Azure Functions in a Logic Apps Workflow
Structure of the Chapter
Objective
Getting Started with Azure Logic Apps
Create an Azure Logic Apps Solution in the Azure Portal
Add Azure Functions in Logic Apps Workflows
Summary
Chapter 20:Best Practices and Pitfalls to Avoid
Structure of the Chapter
Objectives
Design Guidelines and Best Practices
Decide to Use Functions or Not for Your Scenario
Choose the Correct Programing Language
Choice of Hosting Plan
Pick a Stateful or Stateless Solution
Mitigate Delay Startups
Get the Correct Bill to Fit Your Budget
Handle Long-Running Code
Facilitate Integration and Communication Among Other
Azure and External Services
Identify and Manage the Bottlenecks
Make Your Solution Fault Tolerant
Secure the APIs Developed Using Azure Functions
Facilitate Efficient Monitoring and Debug Failures
Incorporate DevOps Practices and Bring in an IaC Approach
Bring in a Defensive Programming Approach
Pitfalls to Avoid
Sharing Functions in a Single Function App Service
Processing the Input Data One Piece at a Time
Hosting the Production and Development Functions in the
Same Function App Service
Sharing Storage Accounts Across Function App Services
Summary
Index
About the Authors
Ashirwad Satapathi
works as a software developer with a
leading IT firm and has expertise in
building scalable applications with .NET
Core. He has a deep understanding of
building full-stack applications using
.NET Core along with Azure PaaS and
serverless offerings. He is an active
blogger in the C# Corner developer
community. He was awarded the C#
Corner MVP in September 2020 for his
contributions to the developer
community.
Abhishek Mishra
is an architect with a leading multinational software company and has
deep expertise in designing and building enterprise-grade intelligent
Azure and .NET-based architectures. He is an expert in .NET full stack,
Azure (PaaS, IaaS, serverless), infrastructure as code, Azure machine
learning, intelligent Azure (Azure Bot Services and Cognitive Services),
and robotics process automation. He has a rich 15+ years of experience
working in top organizations in the industry. He loves blogging and is
an active blogger in the C# Corner developer community. He was
awarded the C# Corner MVP in December 2018, December 2019, and
December 2020 for his contributions to the developer community.
About the Technical Reviewer
Carsten Thomsen
is primarily a back-end developer but
works with smaller front-end bits as
well. He has authored and reviewed a
number of books and created numerous
Microsoft Learning courses, all focused
on software development. He works as a
freelancer/contractor in various
countries in Europe, using Azure, Visual
Studio, Azure DevOps, and GitHub. He is
an exceptional troubleshooter, asking the
right questions in a most logical to least
logical fashion; he also enjoys working in
the areas of architecture, research,
analysis, development, testing, and bug
fixing. Carsten is a good communicator
with great mentoring and team-lead
skills and is skilled at researching and presenting new material.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2021
A. Satapathi, A. Mishra, Hands-on Azure Functions with C#
https://doi.org/10.1007/978-1-4842-7122-3_1
Objectives
After studying this chapter, you will be able to do the following:
Understand the fundamentals of serverless computing and Azure
Functions
Identify scenarios where you can use Azure Functions
Introduction to Serverless
You start getting billed for cloud services as soon as you spin them up.
You get billed even if you do not use the services. Also, you need to plan
and configure the scaling strategy for these services. Some services give
you the flexibility to set autoscaling, and for others, you need to set the
scaling configuration manually. In either case, you end up providing the
necessary settings so that the services can scale.
In the serverless cloud services case, you get billed when the service
is running and is executing your hosted code, and you do not get billed
when the service is idle and is not executing anything. You pay the
cloud vendor on an actual consumption basis, which saves you money.
The underlying platform manages all the scaling aspects of your
application running inside the serverless service. You need not
configure any scaling settings for the serverless service. The serverless
services are intelligent enough to add new instances to handle
incoming traffic and remove the additional instances when the
incoming traffic decreases.
Serverless does not mean that the cloud services are not hosted on
any server. You cannot run any code without a server. In the case of
serverless services, you do not have control over the server hosting
your code. You need to bring your code and host it on the serverless
services without worrying about the underlying infrastructure. The
cloud vendor manages the underlying infrastructure.
The following are a few of the popular serverless offerings provided
by Microsoft Azure:
Azure Functions
Azure Logic Apps
Azure Event Grid
Serverless Azure Kubernetes Service
Serverless SQL Database
Consumption Plan
In the Consumption Plan case, you do not have control over how the
functions scale. The underlying Azure platform adds or removes
instances on the fly based on the incoming traffic that the functions
receive. You do not have any control over the underlying hosting
infrastructure. You get billed when the function runs. This hosting plan
is an ideal serverless plan, but you may encounter a cold-start
phenomenon. It takes a while for the Azure Functions instances to
warm up and spring into action whenever triggered. Your code does not
run instantaneously when the function is triggered as it takes some
time to wake up from its idle state. This phenomenon is referred to as
the cold-start phenomenon. In the Consumption Plan case, the function
can execute for a maximum of ten minutes and has a default value of
five minutes. The default value of five minutes refers to the amount of
time the function will execute before timing out without explicitly
setting the timeout value for the function.
Premium Plan
In the Premium Plan case, you can have prewarmed Azure Functions
instances that can spring into action and execute the code as soon the
function is triggered. The prewarmed instances help you overcome the
cold-start phenomenon. Like with the Consumption Plan, you do not
have any control over how Azure Functions scales or over the
underlying hosting infrastructure in the Premium Plan case. However,
you get options to choose an SKU (EP1, EP2, or EP3) that will meet the
memory and CPU requirements for your application. The underlying
Azure platform manages all the scaling aspects. You get support for a
virtual network. In the Premium Plan case, you can configure a function
to run for a longer duration without timing out. By default, the function
execution will time out after 30 minutes. Your functions can run
continuously or nearly continuously.
Dedicated Plan
The Dedicated Plan in Azure Functions is the same as the App Service
Plan in Azure WebApp. You get to choose from a wide range of SKUs
and sizes compared to the Premium Plan that will meet the
application’s memory and CPU requirements. You can configure manual
scaling or automatic scaling for your functions. You also get virtual
network support. This hosting plan is best suited for long-running
applications.
Summary
In this chapter, you learned the basics of Azure Functions. You explored
what Azure Functions is and discussed the concepts of serverless
computing. You then learned about how Azure WebJobs is different
from Azure Functions and then explored the advantages and
disadvantages of using Azure Functions and the scenarios in which to
use the service. You also learned about the different hosting plans
available for Azure Functions.
The following are the key takeaways from this chapter:
Azure Functions is a serverless computing service on the Microsoft
Azure platform and is based on the FaaS computing model.
You need to build your code, spin up a function, and host your code
on Azure Functions. The underlying cloud platform manages the
hosting infrastructure and hosting software.
The underlying platform manages the scaling aspects for Azure
Functions, and you need not do any scaling configurations.
You get billed when a function executes, and you do not incur any
cost when a function is idle.
Azure Functions supports the Consumption, Premium, and Dedicated
Plans.
You can use Azure Functions in current scenarios like the Internet of
Things, microservices, event-driven applications, and many more.
© The Author(s), under exclusive license to APress Media, LLC, part of Springer
Nature 2021
A. Satapathi, A. Mishra, Hands-on Azure Functions with C#
https://doi.org/10.1007/978-1-4842-7122-3_2
You can create a function for Azure Functions using a wide variety of
options. If you are comfortable with command-line interfaces, then you
can use Azure PowerShell or the Azure command-line interface (CLI).
You can use an integrated development environment (IDE) or a code
editor like Visual Studio IDE or Visual Studio Code. You can also use the
Azure portal to create a function.
In the previous chapter, you learned the basics of the Azure
Functions service and explored some of its essential concepts. In this
chapter, you will explore various options available to create a function.
You will learn how to set up the development prerequisites and explore
how Azure Functions works under the hood.
Objectives
After studying this chapter, you will be able to do the following:
Understand the core tools of Azure Functions
Create a function using various tooling options
Once your login is successful, you will get redirected to the Azure
portal dashboard. Type function app in the search bar and click the
Function App option, as shown in Figure 2-2.
Exploring the Variety of Random
Documents with Different Content
CHAPTER III.
THE RIVER CONGO A BOUNDARY—SLAVE
TRADE—SLAVERY—ORDEAL BY POISON—
INSENSIBILITY OF THE NEGRO—INGRATITUDE.
Plate II.
porto da lenha.
To face page 81.
CHAPTER IV.
THE RIVER CONGO—BANANA—PORTO DA
LENHA—BOMA—MUSSURONGO TRIBE—
PIRATES—MUSHICONGO TRIBE—FISH—PALM
CHOP—PALM WINE.
At the mouth of the River Congo and on its north bank a long spit
of sand separates the sea from a small creek or branch of the river.
On this narrow strip, called Banana, are established several
factories, belonging to Dutch, French, and English houses, and
serving principally as depôts for their other factories higher up the
river and on the coast. The Dutch house especially is a large
establishment, and it was in one of their small steamers that my wife
and myself ascended the river in February 1873.
The first place we touched at was Porto da Lenha, about forty or
forty-five miles from Banana. The river banks up to this point are
sheer walls of large mangrove trees rising out of the water; at high
water, particularly, hardly a dry place can be seen where one could
land from a boat or canoe. The natives have, of course, openings
known to themselves, under and through the mangrove, where their
little canoes dart in and out.
Porto da Lenha (Plate II.) consists of half-a-dozen trading
factories, built on ground enclosed from the river by piles, forming
quays in front, where large vessels can discharge and load close
alongside. The wharves are continually sinking, and have to be
replaced by constant addition of new piles and layers of thick fresh-
water bivalve shells, very abundant in the river. We here found
growing in the mud, and with the roots covered by the river at high
water, the lovely orchid “Lissochilus giganteus” in full bloom; we
collected some of its roots, which reached England safely, and are
now growing in Kew Gardens. Several fine creepers were also in
flower, and we observed numerous butterflies, which were not easy
to capture from the difficulty of getting at them, as at the back of the
houses the dense bush grows out of swamp, and only those
specimens crossing the small dry space on which the houses are
built could be collected. Little creeks divide one house from another;
in some cases a plank bridge affords communication, but it is mostly
effected by boats. A few days before our arrival a flood had covered
the whole of the ground with several inches of water. Considering the
conditions of the place, it does not seem to be so unhealthy to
Europeans as might be expected. Next day we proceeded to Boma,
also situated on the north bank of the river, about ninety-five miles
from Banana.
The scenery completely changes after leaving Porto da Lenha, the
mangrove totally disappears, and several kinds of bright green
bushes, interspersed with different palms and trees, cover the banks
for many miles. Near Boma, however, the banks are higher, and
become bare of trees and shrubs, the whole country being
comparatively free of any other vegetation but high grass; we have
arrived, in fact, at the grass-covered high country before mentioned
as beginning at the third elevation from the coast over the whole of
Angola.
We were most hospitably received by a young Portuguese,
Senhor Chaves, in charge of an English factory there, picturesquely
situated, overlooking the banks of the river. A high hill opposite
Boma and across the river is covered from the top right down to the
water’s edge with an impenetrable forest, and it is not easy to
explain this vegetation, as it stands in such singular relief to the
comparative barrenness of the surrounding country, gigantic
Baobabs being the great tree-feature of the place. We crossed the
river several times to this thickly-wooded hill, and were only able to
find just sufficient shore to land under the branches of the trees, one
of which (Lonchocarpus sericeus) was in beautiful bloom. The
current of the river is so strong, and the stream so broad, that it took
us half-an-hour to get across in a good boat with ten strong Kroomen
paddling.
The view from a high hill on the north bank is magnificent: a
succession of bends of the river, and as far as the sight could reach,
the flat country to the south and west cut into innumerable islands
and creeks, of the brightest green of the water-grass and papyrus
reed, divided by the sunlit and quicksilver-like streams of the vast
rapidly-flowing river.
Boma, as before observed, was formerly the great slave-trade
mart, thousands arriving from all quarters of the interior; they
generally carried a load of provisions, chiefly small beans, a species
of the haricot, for sale to the traders, and on which the slaves were
chiefly fed, in the barracoons and on board the vessels in which they
were shipped, and the Congo used in this way to supply the coast,
even to Loanda, with abundance of beans, mandioca-meal, &c.; but
since the cessation of the slave-trade there has been such great
scarcity of native grown food produce, not only in the river but
everywhere on the coast—the cultivation of other products, such as
ground-nuts, being of greater advantage to the natives—that
Europeans are sometimes reduced to great straits for food for the
natives in their service, and even for the fowls. This is one of the
curious changes produced in the country by the abolition of the
slave-trade. A very large trade quickly sprang up at Boma in ground-
nuts, palm-oil, palm-kernels, &c.; but a foolish competition amongst
the white traders has induced them to go higher up the river to trade;
the consequence has been that Boma, so capitally situated in every
way for a trading station, is now nearly reduced to a depôt for
produce brought from farther up the river.
We were a fortnight at Boma, but were greatly disappointed at the
small number of species of insects we collected, and the poverty in
plants as well. All the lovely coloured finches and other birds of the
grassy regions were here most conspicuous in number and
brilliancy, and it was really beautiful to see the tall grass alive with
the brightest scarlet, yellow, orange, and velvet black of the many
different species, at that season in their full plumage.
We were very much amused at a pretty habit of the males of the
tiny little sky-blue birds (Estrelda cyanogastra) that, with other small
birds such as the Spermestes, Estreldas, Pytelias, &c., used to come
down in flocks to feed in the open space round the house. The little
mites would take a grass flower in their beaks, and perform quite a
hoppy dance on any little stick or bush, bobbing their feathery heads
up and down, whilst their tiny throats swelled with the sweetest little
song-notes and trills imaginable. This was their song to the females,
who were feeding about on the ground below them. The long-tailed
little whydah birds (Vidua principalis) have a somewhat similar habit
of showing off whilst the hens are feeding on the ground; they keep
hovering in the air about three or four feet above them, twit-twitting
all the time, their long tails rising and falling most gracefully to the
up-and-down motion of their little bodies.
One Sunday during our stay Senhor Chaves organized a pic-nic of
the principal white traders to a native village in the interior, where he
had arranged that the nine kings who govern Boma and receive
“customs” from the traders, should meet us, in order that he might
make them each a “dash,” which he wished my wife to present, in
commemoration of a white woman’s visit. We started in hammocks,
and after about two hours’ journey, arrived at the place of meeting,
where a good breakfast awaited us. Our road was over hilly ground,
rough and rocky (mica schist), and was remarkably bare of
vegetation; we passed one or two large and well-cultivated ravines.
After breakfast the nine kings appeared on the scene, and a
miserable lot they were, with one exception, a fine tall old grizzly
negro; their retinues were of the same description, and wretchedly
clad. There was a big palaver, the customary amount of rum was
consumed by them, and they each received, from my wife, their
“dress” of several yards of cloth, piece of cotton handkerchiefs, red
baize sash, and red cotton nightcap. One old fellow had a very
curious old crucifix, which he did not know the age of; he could only
tell that he was the fifth Soba or king that had inherited it. It had
evidently belonged to the old Catholic Portuguese missionaries of
former times.
Crucifixes are often seen as “fetishes” of the kings in Angola.
Nothing will induce them to part with them, as they belong to part of
the “fetishes” that have been handed down from king to king from
time immemorial, and must not be lost or disposed of.
An amusing incident occurred on our way at a large village, where
a great crowd, chiefly of women and children, had collected to cheer
the white woman, seen for the first time in their lives. My hammock
was a little way behind, and on arriving at the village I was met with
great shouts and much shaking of hands; as the other white men
had not been similarly received, I inquired the reason why, and was
then informed that it was to denote their satisfaction at seeing the
“proprietor or owner of the white woman,” as they expressed it.
The natives here, in fact above Porto da Lenha, are Mushicongos,
and are not a bad set of blacks; but, like all this large tribe, are weak
and puny in appearance, dirty in their habits, and scanty of clothing.
They have not as yet allowed white men to pass from Boma, or any
other point of the river, to St. Salvador, and several Portuguese who
have wished to go from St. Salvador to Boma have been dissuaded
from attempting the journey by the king and natives, not from any
objection on their part, but from the certainty that the blacks near the
river would make them turn back.
There is a very great objection on the part of all the tribes of the
interior of Angola, and particularly of those not in the actual territory
held by the Portuguese, to the passage of a white man through the
country. This is due in the first place to the natural distrust and
suspicion of the negro character, and secondly to their fear of the
example of the occupation of Ambriz and the Bembe mines by the
Portuguese. It is impossible for blacks to understand that a white
man will travel for curiosity’s sake; it is perfectly incomprehensible to
them that he should spend money in carriers, making presents, &c.,
only for the pleasure of seeing the country; they are never satisfied
without what they consider a good reason; consequently they always
imagine it must be for the purpose of establishing a factory for trade,
or else to observe the country for its occupation thereafter. This is
the reason why natives will never give reliable information regarding
even the simplest question of direction of roads, rivers, distances,
&c. It is very difficult to obtain exact information, and it is only after
being very well acquainted with them that their natural suspicions are
lulled, and they will freely afford the knowledge desired.