Learning AWS design build and deploy responsive applications using AWS cloud components Sarkar - Download the complete ebook in PDF format and read freely
Learning AWS design build and deploy responsive applications using AWS cloud components Sarkar - Download the complete ebook in PDF format and read freely
com
https://ebookgate.com/product/learning-aws-design-build-and-
deploy-responsive-applications-using-aws-cloud-components-
sarkar/
OR CLICK BUTTON
DOWLOAD EBOOK
https://ebookgate.com/product/modern-infrastructure-with-vmware-cloud-
on-aws-second-edition-martin-hosken/
ebookgate.com
https://ebookgate.com/product/aws-system-administration-best-
practices-for-sysadmins-in-the-amazon-cloud-1st-edition-mike-ryan/
ebookgate.com
Building Serverless Web Applications Develop scalable web
apps using the Serverless Framework on AWS 1st Edition
Diego Zanon
https://ebookgate.com/product/building-serverless-web-applications-
develop-scalable-web-apps-using-the-serverless-framework-on-aws-1st-
edition-diego-zanon/
ebookgate.com
https://ebookgate.com/product/learning-serverless-design-develop-and-
deploy-with-confidence-1st-edition-jason-katzer/
ebookgate.com
https://ebookgate.com/product/programming-c-12-build-cloud-web-and-
desktop-applications-1st-edition-ian-griffiths/
ebookgate.com
https://ebookgate.com/product/guide-for-the-nondestructive-
examination-of-welds-4th-edition-aws-committee-on-methods-of-
inspection/
ebookgate.com
Learning AWS
Aurobindo Sarkar
Amit Shah
BIRMINGHAM - MUMBAI
Learning AWS
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 authors, 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.
ISBN 978-1-78439-463-9
www.packtpub.com
Credits
Brian C. Galura spent his childhood tinkering with subjects such as Java
programming and Linux. His professional experience started with VoIP testing at
3Com in suburban Chicago. He then spent 2 years studying computer engineering
at Purdue University, before leaving to pursue freelance consulting in Los Angeles.
Following several years of freelancing, he developed his expertise in enterprise
infrastructure and cloud computing by working for a variety of start-ups and large
corporations. Later, he completed a bachelor's in IT while working at Citrix. He is
currently working on Citrix's cloud engineering and systems architecture team in
Santa Barbara, California.
Mark Takacs got his first job in the early '90s as the only applicant with HTML
experience. Since then, his road to DevOps has spanned traditional MVC software
development on LAMP and Java, frontend web development in JavaScript, HTML,
CSS, network administration, build and release engineering, production operations,
and a large helping of system administration throughout. He currently lives and
works in Silicon Valley.
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.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book
library. Here, you can search, access, and read 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 a web browser
[ ii ]
Table of Contents
[ iii ]
Table of Contents
[ iv ]
Table of Contents
[v]
Preface
With an increasing interest in leveraging cloud infrastructure around the world, the
AWS cloud from Amazon offers a cutting-edge platform for architecting, building,
and deploying web-scale cloud applications through a user-friendly interface. The
variety of features available within AWS can reduce overall infrastructure costs and
accelerate the development process for both large enterprises and start-ups alike.
Learning AWS covers basic, intermediate, and advanced features and concepts
as they relate to designing, developing, and deploying scalable, highly available,
and secure applications on the AWS platform. By sequentially working through
the steps in each chapter, you will quickly master the features of AWS to create an
enterprise-grade cloud application. We use a three-tiered services-oriented sample
application for extensive hands-on exercises.
This book will not only teach you about the AWS components, but you will gain
valuable information about key concepts such as multi-tenancy, auto scaling,
planning, implementing application development environments, addressing
application security concerns, and so on. You will also learn how these concepts
relate to cost effective architectural decisions while designing scalable, highly
available, and secure AWS cloud applications.
[ vii ]
Preface
Chapter 5, Designing for and Implementing High Availability, provides guidance on how
to define your availability objectives, discuss the nature of failures, and then discuss
the design and implementation of specific strategies to achieve high availability.
In addition, we will describe the approaches that leverage the AWS features and
services for your Disaster Recovery planning.
[ viii ]
Preface
Conventions
In this book, you will find a number of text styles 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:
"This can be done via the command line from the root of the a1ecommerce project
via a maven goal package."
New terms and important words are shown in bold. Words that you see on
the screen, for example, in menus or dialog boxes, appear in the text like this:
"From the RDS dashboard, click on Instances in the navigation pane, and then
on a1ecommerce to view the details of the DB instance."
[ ix ]
Preface
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about
this book—what you liked or disliked. Reader feedback is important for us as it helps
us develop titles that you will really get the most out of.
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 at 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.
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 could 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 to our website or added
to any list of existing errata under the Errata section of that title.
Piracy
Piracy of copyrighted 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.
[x]
Preface
We appreciate your help in protecting our authors and our ability to bring you
valuable content.
Questions
If you have a problem with any aspect of this book, you can contact us at
questions@packtpub.com, and we will do our best to address the problem.
[ xi ]
Cloud 101 – Understanding
the Basics
In this chapter, we will introduce you to cloud computing and the key terminologies
used commonly by cloud practitioners.
We will briefly describe what public, private, and hybrid clouds are, followed by
a description of various cloud service models (offered by the service providers),
including the features of Infrastructure as a Service (IaaS), Platform as a Service
(PaaS), and Software as a Service (SaaS).
To help you get started on Amazon Web Services (AWS), we will end the chapter
by walking you through the step-by-step process of creating an AWS account, and
describing some of the salient features of the AWS dashboard.
[1]
Cloud 101 – Understanding the Basics
The National Institute of Standards and Technology (NIST) gives the following
definition of cloud computing:
There are several other broadly accepted definitions of cloud computing. Some
explicitly emphasize configurability of the resources, while others include the need
for rapid on-demand provisioning of resources, and still others drop the requirement
of access via the internet. We define cloud computing as a model that enables the
features listed here:
Some of the implications of choosing to use the cloud for your computing needs are
as follows:
[2]
Chapter 1
These and other implications of using cloud services to design scalable, highly
available, and secure applications are discussed in-depth in subsequent chapters.
A private cloud provides many of the same benefits of a public cloud but the services
and data are managed by the organization or a third-party, solely for the customer's
organization. Usually, private cloud places increase administrative overheads on the
customer but give greater control over the infrastructure and reduce security-related
concerns. The infrastructure may be located on or off the organization's premises.
A hybrid cloud is a combination of both a private and a public cloud. The decision
on what runs on the private versus the public cloud is usually based on several
factors, including business criticality of the application, sensitivity of the data,
industry certifications and standards required, regulations, and many more. But in
some cases, spikes in demand for resources are also handled in the public cloud.
[3]
Cloud 101 – Understanding the Basics
From an infrastructure perspective, the customer does not manage or control the
underlying cloud infrastructure in all three service models.
The following diagram illustrates who is responsible for managing the various
components of a typical user application across IaaS, PaaS, and SaaS cloud service
models. The column labeled User Application represents the main components of
a user application stack, while the following columns depict the varying levels of
management responsibilities in each of the three service models. The shaded boxes are
managed by the service provider, while the unshaded boxes are managed by the user.
[4]
Chapter 1
The level of control over operating systems, storage, applications, and certain network
components (for example, load balancers) is the highest in the IaaS model, while the
least (or none) in the SaaS model.
[5]
Cloud 101 – Understanding the Basics
We are assuming that you do not have a pre-existing AWS account with Amazon
(if you do, please feel free to skip this section). Perform the following steps:
2. After creating a new account or using your existing retail Amazon account,
select the I am a returning user and my password is: option and click on
Sign in using our secure server. A set of intuitive screens will guide you
through multiple screens in order to to create an AWS account, these include:
[6]
Chapter 1
[7]
Cloud 101 – Understanding the Basics
3. At this stage, you have successfully created an AWS account, and you are
ready to start using the services offered by AWS.
• Amazon Web Services: This is a dashboard view that lists all the AWS
services currently available in a specific Amazon region. Clicking on any
one of these launches the dashboard for the selected service, as shown in
the following screenshot:
[8]
Chapter 1
• Amazon regions: This option allows you to access the AWS in a specific
region. In the following screenshot, all the Amazon Web Services are located
in the US East (N. Virginia) region:
[9]
Cloud 101 – Understanding the Basics
• Support: You can navigate to the Help, Forums, and support pages:
• Service Health: Launches the health dashboard of all the Amazon Web
Services across all regions, and not of your deployed service:
Summary
In this chapter, we introduced you to a few cloud computing concepts and
terminologies. We described the basic features of public, private, and hybrid
clouds. We introduced the main cloud delivery models, namely, IaaS, PaaS,
and SaaS. Finally, we listed the steps for creating your AWS account, and
described the salient features of the AWS management console.
With the basics out of the way, in the next chapter we will deep dive into the
details of how multitenanted cloud applications are different from traditional
multi-tiered applications. We will also walk you through creating a sample
application (using Spring and MySQL) that will be used to illustrate key cloud
application design concepts through the rest of this book.
[ 10 ]
Designing Cloud Applications
– An Architect's Perspective
As an architect, we are sure you have come across terms such as loosely coupled,
multi-tier, services oriented, highly scalable, and many more. These terms are
associated with architectural best practices and you find them listed in the first
couple of pages of any system architecture document. These concepts are generally
applicable to all architectures, and the cloud is no exception.
In this chapter, we want to highlight how these are accomplished on the cloud.
You will notice that the approach you take towards cloud application architecture
remains the same to a large extent. However, you need to be aware of certain
peculiarities of the cloud environment, in order to architect scalable, available,
and secure cloud applications. For example, if you are architecting a web-scale
application, you need to take into consideration the ability to automatically scale
up and down. What are the implications of auto scaling on your design?
[ 11 ]
Designing Cloud Applications – An Architect's Perspective
In this chapter, we describe the familiar and not-so familiar architectural best
practices in the cloud context, by covering the following topics:
• Multi-tier architecture
• Designing for multi-tenancy including data security and extensibility
• Designing for scale
• Automating infrastructure
• Designing for failure
• Parallel processing
• Designing for performance
• Designing for eventual consistency
• Estimating your cloud computing costs
• Sample application is a typical e-commerce web application
Multi-tier architecture
A simple three-tier architecture consists of a UI tier, an application or business tier,
and a data tier.
These tiers are ordinarily implemented using web servers, application servers, and
databases, respectively.
This tiered architecture on the cloud supports auto scaling and load balancing of
web servers and application servers. Further, it also implements a master-slave
database model across two different zones or data centers (connected with high
speed links). The master database is synchronously replicated to the slave. Overall,
the architecture represents a simple way to achieve a highly scalable and highly
available application in a cloud environment.
[ 12 ]
Chapter 2
[ 13 ]
Designing Cloud Applications – An Architect's Perspective
It is also possible to separate the tiers across two different regions, to provide for higher
level of redundancy including data center wide or zone level failures. While designing
high availability architectures across multiple regions, we need to address network
traffic flow and data synchronization issues between the regions. Such issues are
discussed in more detail in Chapter 5, Designing for and Implementing High Availability.
The following diagram illustrates this architecture:
[ 14 ]
Chapter 2
Whatever the multi-tenancy model, the data architecture needs to ensure robust
security, extensibility, and scalability in the data tier. For example, storing a particular
customer's data in a separate database leads to the simplest design and development
approach. Having data isolation is the easiest and the quickest to both understand
and explain to your customers.
In this model, suitable metadata is maintained to link each database with the correct
tenant. In addition, appropriate database security measures are implemented to
prevent tenants from accessing other tenants' data. From an operations perspective,
backups and restores are simpler for separate databases, as they can be executed
without impacting other customers. However, this approach can and will lead to
higher infrastructure costs.
Typically, you would offer this approach to your bigger customers who might be
more willing to pay a premium to isolate their data. Larger enterprise customers
prefer database isolation for higher security, or in some cases, to comply with their
security policies. Such customers might also have a higher need for customizations.
We can define a separate database schema for each of the tenants (within the same
database server instance) for applications having a limited number of database tables.
This approach is relatively simple to implement, and offers flexibility for custom tables
to be defined per tenant. However, data restore for a particular tenant can impact other
tenants hosted on the same database instance, but this approach can reduce costs while
separating out the data of each tenant.
[ 15 ]
Designing Cloud Applications – An Architect's Perspective
In a shared database, with a shared schema approach, the costs are minimized,
but the complexity of the application is much higher. This model works well for
cost conscious customers. However, restoring a customer's data is complicated,
as you will be restoring specific rows belonging to a specific tenant. This operation
can impact all other tenants using the shared database.
In cloud architectures, the main factors to consider while designing multi tenancies
are the security, extensibility, and scalability. In addition, multi-tenancy brings
additional complexity from a DevOps perspective, and we need to ensure that
we are able to effectively manage upgrades and troubleshoot, bugs and maintain
high service levels and operations' efficiency.
Data security
There are two levels of security to be considered—at the tenant level (typically, an
organization) and the end-user level, who is a member or an employee of a given
tenant. In order to implement a security model, you need to create a database access
account at the tenant level. This account can specify (using ACLs) the database objects
accessible to a specific tenant. Then at the application level, you can prevent users from
accessing any data they are not entitled to. A security token service can be used to
implement the access at the tenant level.
[ 16 ]
Chapter 2
If database tables are shared across tenants, then you need to filter data access by each
tenant. This is accomplished by having a column that stores a tenant ID per record
(to clearly identify records that belong to a specific tenant). In such a schema, a typical
SQL statement will contain a where clause based on the tenant ID being equal to the
security ID of the user account, namely an account belonging to the tenant.
[ 17 ]
Designing Cloud Applications – An Architect's Perspective
Data extensibility
Having a rigid database schema will not work for you across all your customers.
Customers have their specific business rules and supporting data requirements.
They will want to introduce their own customizations to the database schema.
You must ensure that you don't change your schema for a tenant so much that
your product no longer fits into the SaaS model. But you do want to bake in
sufficient flexibility and extensibility to handle custom data requirements of your
customers (without impacting subsequent product upgrades or patch releases).
[ 18 ]
Chapter 2
This approach is depicted in the following figure. Fields 1 to 4 are defined as extra
columns in the customer table. Further, the metadata table defined the field labels
and data types:
[ 19 ]
Designing Cloud Applications – An Architect's Perspective
A second approach, takes a name-value pair approach, where you have a main
data table that points to an intermediate table containing the value of the field,
and a pointer to a metadata table that contains the field label, data type, and such
information. This approach cuts out potential waste and does not limit the number
of fields available for customization as in the first approach, but is obviously more
complicated to implement.
[ 20 ]
Chapter 2
A variation on the preceding two approaches is to define an extra field per table, and
store all custom name-value pairs per tenant in an XML or JSON format, as shown in
the following figure:
A third approach is to add columns per tenant as required. This approach is more
suitable in the separate database or separate schema per tenant models. However,
this approach should generally be avoided as it leads to complexity in application
code that is, handling arbitrary number of columns in a table per tenant. Further,
it can lead to operational headaches during upgrades.
You will need to design your database schema carefully for providing
custom extensions to your tenants, as this can have a ripple effect on
the application code and the user interface.
[ 21 ]
Designing Cloud Applications – An Architect's Perspective
Application multi-tenancy
In addition to introducing a tenant ID column in the database, if the application
has web service interfaces, then these services should also include the tenant ID
parameter in its request and/or response schemas. To ensure smooth transition
between shared and isolated application instances, it is important to maintain
tenant IDs in the application tier. In addition, tenant aware business rules can be
encoded in a business rules engine, and tenant specific workflows can be modeled
in multi-tenanted workflow engine software, using Business Process Execution
Language (BPEL) process templates.
In cases where you end up creating a tenant-specific web service, you will need
to design it in a manner that least impacts your other tenants. A mediation proxy
service that contains routing rules can help in this case. This service can route the
requests from a particular tenant's users (specified by the tenant ID in the request)
to the appropriate web service implemented for that tenant.
Similarly, the frontend or the UI is also configured for each tenant to provide a more
customized look and feel (for example, CSS files per tenant), tenant specific logos,
and color schemes. For differences in tenant UIs, portal servers can be used to serve
up portlets, appropriately.
If different service levels need to be supported across tenants, then an instance of the
application can be deployed on separate infrastructure for your high-end customers.
The isolation provided at the application layer (and the underlying infrastructure)
helps avoid tenants impacting each other, by consuming more CPU or memory
resources than originally planned.
Logging also needs to be tenant-aware (that is, use tenant ID in your record format).
You can also use other resources such as queues, file directories, directory servers,
caches, and so on for each of your tenants. These can be done in a dedicated or
separated out application stacks (per tenant). In all cases, make use of the tenant
ID filter for maximum flexibility.
[ 22 ]
Chapter 2
[ 23 ]
Designing Cloud Applications – An Architect's Perspective
The following diagram shows a high capacity data processing pipeline. Notice that
queues are placed strategically between various processing components to help match
the impedance between the inflows of data versus processing components' speed:
Typically, the web tier writes messages or work requests to a queue. A component
from the services tier then picks up this request from the queue and processes it.
This ensures faster response times for end users as the queue-based asynchronous
processing model does not block on responses.
In a traditional architecture, you may have used message queues with simple enqueue
and dequeue operations to add processing requests and remove them for processing
from the queues, subsequently. However, implementing queue-based architectures
on the cloud is a little different. This is because your queue is distributed and your
messages automatically replicated across several nodes. In addition, one of these nodes
may be unavailable, or fails, when your request arrives, or during the processing of
your request.
[ 24 ]
Exploring the Variety of Random
Documents with Different Content
APPENDICES
APPENDIX A
Intelligence Ratings in the Army
(a) That the average score of the “best” group was approximately twice as
high as the average score of the “poorest” group.
(b) That of men testing below “C−” 70 per cent. were classed as “poorest”
and only 4.4 per cent. as “best.”
(c) That of men testing above “C+,” 15 per cent. were classed as “poorest”
and 55.5 per cent. as “best.”
(d) That the man who tests above “C+” is about fourteen times as likely
to be classed “best” as the man who tests below “C−.”
(e) That the per cent. classed as “best” in the various letter groups
increased steadily from 0 per cent. in “D−” to 57.7 per cent. in “A,”
while the per cent. classed as “poorest” decreased steadily from 80
per cent. in “D−” to 11.5 per cent. in “A.” The following table shows
the per cents. for each letter group:
D− D C− C C+ B A
Total number 29 60 121 231 229 191 104
Classed with “best” 0.0% 6.7% 19.0% 26.0% 39.3% 53.4% 57.7%
Classed with
“poorest” 79.3% 66.0% 57.9% 31.2% 24.9% 16.7% 11.5%
Considering that low military value may be caused by many things besides
inferior intelligence, the above findings are very significant.
2. In an infantry regiment of another camp were 765 men (Regulars) who
had been with their officers for several months. The company commanders
were asked to rate these men as 1, 2, 3, 4, or 5 according to “practical soldier
value,” “1” being highest, and “5” lowest. The men were then tested, with the
following results:
(a) Of 76 men who earned the grade A or B, none was rated “5” and only
9 were rated “3” or “4.”
(b) Of 238 “D” and “D−” men, only one received the rating “1” and only 7
received a rating of “2.”
(c) Psychological ratings and ratings by company commanders were
identical in 49.5 per cent. of all cases. There was agreement within
one step in 88.4 per cent. of cases, and disagreement of more than
7
two steps in only 10 of 1 per cent. of cases.
(a) Of 156 men classed with the ten “best” in their respective companies,
only 9 tested below C−.
(b) Of 133 men classed with the “poorest” ten in their respective
companies, only 4 tested above C+.
(c) Men above C+ are 7.3 times as likely as men below C− to be classed
with the ten “best.”
(d) Men below C− are 10.8 times as likely as men above C+ to be classed
with the ten “poorest.”
(e) An “A” man is 11.7 times as likely as a man below C− to be rated
“best”; but a man below C− is 13.5 times as likely as an “A” to be
rated “poorest.”
4. The same experiment was made in still another camp. Officers of 36
different companies picked the ten “best” and the ten “poorest” men in each
company. Of the “poorest,” 62.22 per cent. tested below C− and only 3.06
per cent. above C+. Of the “best,” 38 per cent. tested above C+ and only 9.72
per cent. below C−. According to this investigation, a man below C− is 6.4
times as likely to be “poorest” as to be “best.” A man above C+ is 12.5 times
as likely to be “best” as to be “poorest.” A man rating A is 62 times as likely
to be “best” as to be “poorest.” A man rating D− is 29.3 times as likely to be
“poorest” as to be “best.”
5. Where commissioned officers are selected on the basis of trying out and
“survival of the fittest” it is ordinarily found that about 80 per cent. are of the
A or B grade, and only about 5 per cent. below the C+ grade. Of non-
commissioned officers chosen by this method, about 75 per cent. are found
to grade A, B, or C+, and only 5 per cent. below C. Moreover, there is a
gradual rise in average score as we go from privates up through the ranks of
privates first class, corporals, sergeants first class, O. T. S. candidates, and
commissioned officers. This is seen in the following table:
PER CENT. EARNING EACH LETTER RATING
Various
Groups D− A and
(Whites) or E D C− C C+ B A B
8,819
Commissioned
Officers 0.0 0.01 .25 2.92 13.8 34.6 48.4 83.
9,240 O.T.S.
Candidates 0.0 0.14 .98 6.16 19.5 36.4 36.8 73.2
3,393
Sergeants 0.0 1.05 4.05 14.2 27.3 32.5 20.9 53.4
4,023
Corporals 0.0 1.33 7.33 20.33 31.3 26. 13.7 39.7
81,114
Literate
Privates 0.22 10.24 21.48 28.79 20.48 12.38 6.37 18.75
10,803
Illiterate
Privates 7.8 41.16 29.11 14.67 4.43 1.95 .52 2.47
6. Experience shows that “D” candidates admitted to Officers’ Training
Schools almost never make good, and that the per cent. of elimination
among the “C−” and “C” students is several times as high as among “A”
students. For example, in one of the Fourth Officers’ Training Schools 100
per cent. of the “D” men were eliminated as unsatisfactory, 55 per cent. of
the “C−” men, 14.8 per cent. of the “B” men, but only 2.7 per cent. of the “A”
men. In another Fourth Officers’ Training School 76.2 per cent. of the men
rating below C were eliminated in the first six weeks, 51.5 per cent. of the “C”
men, and none at all of the “A” or “B” men. These findings are typical.
The psychological ratings are valuable not so much because they make a
better classification than would come about in the course of time through
natural selection, but chiefly because they greatly abbreviate this process by
indicating immediately the groups in which suitable officer material will be
found, and at the same time those men whose mental inferiority warrants
their elimination from regular units in order to prevent the retardation of
training. Speed counts in a war that costs fifty million dollars per day and
requires the minimum period of training.
Directions for the Use of Intelligence Ratings.—In using the intelligence
ratings the following points should be borne in mind:
1. The mental tests are not intended to replace other methods of judging a
man’s value to the service. It would be a mistake to assume that they tell us
infallibly what kind of soldier a man will make. They merely help to do this
by measuring one important element in a soldier’s equipment, namely,
intelligence. They do not measure loyalty, bravery, power to command, or
the emotional traits that make a man “carry on.” However, in the long run
these qualities are far more likely to be found in men of superior intelligence
than in men who are intellectually inferior. Intelligence is perhaps the most
important single factor in soldier efficiency apart from physical fitness.
2. Commissioned officer material is found chiefly in the A and B groups,
although of course not all high-score men have the other qualifications
necessary for officers. Men below C+ should not be accepted as students in
Officers’ Training Schools unless the score on the Officers’ Rating Scale
indicates exceptional power of leadership and ability to command.
3. Since more than one fourth of enlisted men rate as high as C+, there is
rarely justification for going below this grade in choosing non-commissioned
officers. This is especially the case in view of the likelihood of promotion
from non-commissioned rank. Even apart from considerations of promotion,
it is desirable to avoid the appointment of mentally inferior men (below C) as
non-commissioned officers. Several careful studies have shown that “C−”
and “D” sergeants and corporals are extremely likely to be found
unsatisfactory. The fact that a few make good does not justify the risk taken
in their appointment.
4. Men below C+ are rarely equal to complicated paper work.
5. In selecting men for tasks of special responsibility the preference should
be given to those of highest intelligence rating who also have the other
necessary qualifications. If they make good they should be kept on the work
or promoted; if they fail they should be replaced by men next on the list.
To aid in selecting men for occupational assignment, extensive data have
been gathered on the range of intelligence scores found in various
occupations. This material has been placed in the hands of the Personnel
Officers for use in making assignments. It is suggested that those men who
have an intelligence rating above the average in an occupation should be the
first to be assigned to meet requirements in that occupation, and after that
men with lower ratings should be considered.
6. In making assignments from the Depot Brigade to permanent
organizations it is important to give each unit its proportion of superior,
average, and inferior men. If this matter is left to chance there will inevitably
be “weak links” in the army chain.
Exceptions to this rule should be made in favour of certain arms of the
service which require more than the ordinary number of mentally superior
men; e. g., Signal Corps, Machine Gun, Field Artillery and Engineers. These
organizations ordinarily have about twice the usual proportion of “A” and
“B” men and very much less than the usual proportion of “D” and “D−” men.
The first two columns in the following table illustrate the distribution of
intelligence grades typical of infantry regiments and also the extreme
differences in the mental strength of organizations which are built up
without regard to intelligence ratings. The last column to the right shows a
balanced distribution of intellectual strength which might have been made to
each of these two regiments.
Intelligence Interpretation Actual Distribution Balanced
Rating 1st 2nd Distribution
Regiment Regiment
A Very 1.0% 6.0% 3.5%
Superior
B Superior 3.0 12.0 7.5
C+ High Average 7.0 20.0 13.5
C Average 15.0 28.0 21.5
C− Low Average 25.0 19.0 22.0
D Inferior 31.0 13.0 22.0
D− Very 18.0 2.0 10.0
Inferior
Unless intelligence is wisely distributed certain regiments and companies
will take training much more slowly than others and thus delay the
programme of the whole organization.
7. “D” and “D−” men are rarely suited for tasks which require special skill,
resourcefulness, or sustained alertness. It is also unsafe to expect “D,” “D−”
or “E” men to read or understand written directions.
8. Only high-score men should be selected for tasks that require quick
learning or rapid adjustments.
9. It should not be supposed that men who receive the same mental rating
are necessarily of equal military worth. A man’s value to the service should
not be judged by his intelligence alone.
10. The intelligence rating is one of the most important aids to the
Personnel Office in the rapid sorting of the masses of men in the Depot
Brigade. In no previous war has so much depended on the prompt and
complete utilization of the mental ability of the individual soldier. It is
expected, therefore, that the psychological ratings will be regularly used as
an aid in the selection, assignment, and classification of men.
APPENDIX B
The Army “Alpha” and “Beta” Tests
In what country or state born? ______ Years in U. S.? ____ Race ____
TEST 1
Division of Psychology, Medical
Department U. S. A.
Authorized by the Surgeon General,
Feb. 8, 1918. Edition, May 20, 1918.
100,000
Instructions for Giving Alpha Test 2.
Test 2.—Arithmetical Problems
“Attention! Look at the directions at the top of the page while I read them. Get the answers to these
examples as quickly as you can. Use the side of this page to figure on if you need to. I will say stop at the
end of five minutes. You may not be able to finish all of them, but do as many as you can in the time
allowed. The two samples are already answered correctly.—Ready—Go!”
After 5 minutes, say “Stop! Turn over the page to Test 3.”
TEST 2
Get the answers to these examples as quickly as you can. Use the side of this page to figure on if you
need to.
1 How many are 5 men and 10 men? Answer ( 15)
SAMPLES 2 If you walk 4 miles an hour for 3 hours, how far do you
walk? Answer ( 12)
1 How many are 60 guns and 5 guns? Answer ( )
2 If you save $9 a month for 3 months, how much will you save? Answer ( )
3 If 48 men are divided into squads of 8, how many squads will there be? Answer ( )
4 Mike had 11 cigars. He bought 2 more and then smoked 7. How many
cigars did he have left? Answer ( )
5 A company advanced 8 miles and retreated 2 miles. How far was it then
from its first position? Answer ( )
7 How many pencils can you buy for 60 cents at the rate of 2 for 5
cents? Answer ( )
8 A regiment marched 40 miles in five days. The first day they marched 9
miles, the second day 6 miles, the third 10 miles, the fourth 6
miles. How many miles did they march the last day? Answer ( )
10 If it takes 4 men 3 days to dig a 120–foot drain, how many men are
needed to dig it in half a day? Answer ( )
11 A dealer bought some mules for $2,000. He sold them for $2,400, making
$50 on each mule. How many mules were there? Answer ( )
12 A rectangular bin holds 200 cubic feet of lime. If the bin is 10 feet
long and 5 feet wide, how deep is it? Answer ( )
13 A recruit spent one-eighth of his spare change for post cards and
twice as much for a box of letter paper, and then had $1.00 left.
How much money did he have at first? Answer ( )
14 If 3½ tons of clover cost $14, what will 6½ tons cost? Answer ( )
15 A ship has provisions to last her crew of 700 men 2 months. How long
would it last 400 men? Answer ( )
18 If 134 squads of men are to dig 3,618 yards of trench, how many yards
must be dug by each squad? Answer ( )
“‘Here the second answer is the best one and is marked with a cross.
“‘Begin with No. 1 and keep on until time is called.’—Ready—Go!” After 1½ minutes, say “Stop! Turn
over the page to Test 4.”
TEST 3
This is a test of common sense. Below are sixteen questions. Three answers are given to each question.
You are to look at the answers carefully; then make a cross in the square before the best answer to each
question, as in the sample:
1 It is wiser to put some money aside and not spend it all, so that you may
☐ prepare for old age or sickness
☐ collect all the different kinds of money
☐ gamble when you wish
2 Shoes are made of leather, because
☐ it is tanned
☐ it is tough, pliable and warm
☐ it can be blackened
3 Why do soldiers wear wrist watches rather than pocket watches? Because
☐ they keep better time
☐ they are harder to break
☐ they are handier
4 The main reason why stone is used for building purposes is because
☐ it makes a good appearance
☐ it is strong and lasting
☐ it is heavy
5 Why is beef better food than cabbage? Because
☐ it tastes better
☐ it is more nourishing
☐ it is harder to obtain
6 If some one does you a favor, what should you do?
☐ try to forget it
☐ steal for him if he asks you to
☐ return the favor
7 If you do not get a letter from home which you know was written, it may be because
☐ it was lost in the mails
☐ you forgot to tell your people to write
☐ the postal service has been discontinued
8 The main thing the farmers do is to
☐ supply luxuries
☐ make work for the unemployed
☐ feed the nation
9 If a man who can’t swim should fall into a river, he should
☐ yell for help and try to scramble out
☐ dive to the bottom and crawl out
☐ lie on his back and float
10 Glass insulators are used to fasten telegraph wires because
☐ the glass keeps the pole from being burned
☐ the glass keeps the current from escaping
☐ the glass is cheap and attractive
11 If your load of coal gets stuck in the mud, what should you do?
☐ leave it there
☐ get more horses or men to pull it out
☐ throw off the load
12 Why are criminals locked up?
☐ to protect society
☐ to get even with them
☐ to make them work
13 Why should a married man have his life insured? Because
☐ death may come at any time
☐ insurance companies are usually honest
☐ his family will not then suffer if he dies
14 In Leap Year February has 29 days because
☐ February is a short month
☐ some people are born on February 29th
☐ otherwise the calendar would not come out right
15 If you are held up and robbed in a strange city, you should
☐ apply to the police for help
☐ ask the first man you meet for money to get home
☐ borrow some money at a bank
16 Why should we have Congressmen? Because
☐ the people must be ruled
☐ it insures truly representative government
☐ the people are too many to meet and make their laws
Instructions for Giving Alpha Test 4.
Test 4.—Synonym—Antonym
“Attention! Look at the directions at the top of the page while I read them.” (Examiner.—Read slowly.)
“‘If the two words of a pair mean the same or nearly the same draw a line under “same.” If they mean
the opposite or nearly the opposite, draw a line under “opposite.” If you cannot be sure, guess. The two
samples are already marked as they should be.’—Ready—Go!”
After 1½ minutes, say “Stop! Turn over the page to Test 5.” (Pause.) “Now you have to turn your
books around this way.” (Examiner illustrates the necessary rotation.)
TEST 4
If the two words of a pair mean the same or nearly the same, draw a line under same. If they mean the
opposite or nearly the opposite, draw a line under opposite. If you cannot be sure, guess. The two
samples are already marked as they should be
SAMPLES good—bad same—opposite
little—small same—opposite
1 no—yes same—opposite 1
2 day—night same—opposite 2
3 go—leave same—opposite 3
4 begin—commence same—opposite 4
5 bitter—sweet same—opposite 5
6 assume—suppose same—opposite 6
7 command—obey same—opposite 7
8 tease—plague same—opposite 8
9 diligent—industrious same—opposite 9
10 corrupt—honest same—opposite 10
11 toward—from same—opposite 11
12 masculine—feminine same—opposite 12
13 complex—simple same—opposite 13
14 sacred—hallowed same—opposite 14
15 often—seldom same—opposite 15
16 ancient—modern same—opposite 16
17 enormous—gigantic same—opposite 17
18 confer—grant same—opposite 18
19 acquire—lose same—opposite 19
20 compute—calculate same—opposite 20
21 defile—purify same—opposite 21
22 apprehensive—fearful same—opposite 22
23 sterile—fertile same—opposite 23
24 chasm—abyss same—opposite 24
25 somber—gloomy same—opposite 25
26 vestige—trace same—opposite 26
27 vilify—praise same—opposite 27
28 finite—limited same—opposite 28
29 contradict—corroborate same—opposite 29
30 immune—susceptible same—opposite 30
31 credit—debit same—opposite 31
32 assiduous—diligent same—opposite 32
33 transient—permanent same—opposite 33
34 palliate—mitigate same—opposite 34
35 execrate—revile same—opposite 35
36 extinct—extant same—opposite 36
37 pertinent—relevant same—opposite 37
38 synchronous—simultaneous same—opposite 38
39 supercilious—disdainful same—opposite 39
40 abstruse—recondite same—opposite 40
Instructions for Giving Alpha Test 5.
Test 5.—Disarranged Sentences
“Attention! Look at the directions at the top of the page while I read them.” (Examiner.—Read slowly.)
“The words a eats cow grass in that order are mixed up and don’t make a sentence; but they would
make a sentence if put in the right order: a cow eats grass, and this statement is true.
“Again, the words horses feathers have all would make a sentence if put in the order all horses have
feathers, but this statement is false.
“Below are 24 mixed-up sentences. Some of them are true and some are false. When I say ‘go,’ take
these sentences one at a time. Think what each would say if the words were straightened out, but don’t
write them yourself. Then, if what it would say is true draw a line under the word ‘true’; if what it would
say is false, draw a line under the word ‘false.’ If you cannot be sure, guess. The two samples are already
marked as they should be. Begin with No. 1 and work right down the page until time is called. ‘Ready—
Go!’”
After 2 minutes, say “Stop! Turn over the page to Test 6.”
TEST 5
The words A EATS COW GRASS in that order are mixed up and don’t make a sentence; but they
would make a sentence if put in the right order: A COW EATS GRASS, and this statement is true.
Again, the words HORSES FEATHERS HAVE ALL would make a sentence if put in the order: ALL
HORSES HAVE FEATHERS, but this statement is false.
Below are twenty-four mixed-up sentences. Some of them are true and some are false. When I say
“go,” take these sentences one at a time. Think what each would say if the words were straightened out,
but don’t write them yourself. Then, if what it would say is true, draw a line under the word “true”; if
what it would say is false, draw a line under the word “false.” If you can not be sure, guess. The two
samples are already marked as they should be. Begin with No. 1 and work right down the page until time
is called.
SAMPLES a eats cow grass true false
horses feathers have all true false
TEST 6
2 4 6 8 10 12 14 16
9 8 7 6 5 4 3 2
SAMPLES
2 2 3 3 4 4 5 5
1 7 2 7 3 7 4 7
Look at each row of numbers below, and on the two dotted lines write the two numbers that should
come next.
3 4 5 6 7 8 ..... .....
8 7 6 5 4 3 ..... .....
10 15 20 25 30 35 ..... .....
9 9 7 7 5 5 ..... .....
3 6 9 12 15 18 ..... .....
8 1 6 1 4 1 ..... .....
5 9 13 17 21 25 ..... .....
8 9 12 13 16 17 ..... .....
27 27 23 23 19 19 ..... .....
1 2 4 8 16 32 ..... .....
19 16 14 11 9 6 ..... .....
11 13 12 14 13 15 ..... .....
2 3 5 8 12 17 ..... .....
18 14 17 13 16 12 ..... .....
29 28 26 23 19 14 ..... .....
20 17 15 14 11 9 ..... .....
81 27 9 3 1 ⅓ ..... .....
1 4 9 16 25 36 ..... .....
16 17 15 18 14 19 ..... .....
3 6 8 16 18 36 ..... .....
Instructions for Giving Alpha Test 7.
Test 7.—Analogies
“Attention! Look at the first sample at the top of the page: Sky—blue ∷ grass—table, green, warm, big.
“Notice the four words in heavy type. One of them—green—is underlined. Grass is green just as the
sky is blue.
“Look at the second sample: Fish—swims ∷ man—paper, time, walks, girl.
“Here the word walks is underlined. A man walks and a fish swims.
“Look at the third sample: Day—night ∷ white—red, black, clear, pure.
“Here the word black is underlined because black is the opposite of white just as night is the opposite
of day.
“In each of the lines below the first two words are related to each other in some way. What you are to
do in each line is to see what the relation is between the first two words and underline the word in heavy
type that is related in the same way to the third word. Begin with No. 1 and mark as many sets as you
can before time is called.—Ready—Go!”
After 3 minutes, say “Stop! Turn over the page to Test 8.”
TEST 7
SAMPLES sky—blue ∷ grass— table green warm big
fish—swims ∷ man— paper time walks girl
day—night ∷ white— red black clear pure
In each of the lines below, the first two words are related to each other in some way. What you are to
do in each line is to see what the relation is between the first two words, and underline the word in
heavy type that is related in the same way to the third word. Begin with No. 1 and mark as many sets as
you can before time is called.
1 shoe—foot ∷ hat— kitten head knife penny 1
2 pup—dog ∷ lamb— red door sheep book 2
3 spring—summer ∷ autumn— winter warm harvest rise 3
4 devil—angel ∷ bad— mean disobedient defamed good 4
5 finger—hand ∷ toe— body foot skin nail 5
TEST 8
Notice the sample sentence:
People hear with the eyes ears nose mouth
The correct word is ears, because it makes the truest sentence.
In each of the sentences below you have four choices for the last word. Only one of them is correct. In
each sentence draw a line under the one of these four words which makes the truest sentence. If you can
not be sure, guess. The two samples are already marked as they should be.
People hear with the eyes ears nose mouth
SAMPLES France is in Europe Asia
Africa Australia
General Rules
1. Each item is scored either right or wrong. No part credits are given.
2. In general, items evidently corrected stand as corrected.
3. In tests where the score is “Number Right,” only wrong items need be checked in scoring. In Tests 4
and 5, where the score is “Right minus Wrong,” wrong and omitted items must be separately checked.
4. Indicate the last item attempted by drawing a long line under that item and out into the margin.
5. Enter the score for each test in lower right-hand corner of the test page and encircle it. When the
test has been rescored, a check mark may be made beside the circle.
6. Red or blue pencil increases accuracy of scoring.
Test 1.
(Score is number right.)
1. No credit is given for any item in which more is done than the instructions require.
2. In an item where something is to be written “in” a given space, give credit if a mark crosses a line
from haste or awkwardness: give no credit if the position is really ambiguous.
3. Where something is to be underlined or crossed out, give credit if two or three underlinings are
made in the required place, and give credit for any method of crossing out.
4. Item 2.—The pencil line must begin and end either on the circumference or within the circles
indicated. It may touch the intermediate circles, but must not cut through them.
5. Item 6.—In the circle marked “not 12” there must be some number which is not 12, such as 5, 0, 27.
6. Item 9.—The proper numbers must be crossed out to receive credit.
7. Item 10.—In Form 5, “2” alone and “3” alone, but not “2 or 3,” in each of the two largest parts; “5”
alone and “6” alone, but not “5 or 6,” in the next to the smallest part, are correct. Similarly for other
forms.
8. Item 11.—The lines must cross, or at least touch, the proper numbers; they may or may not cut the
accompanying letters. Mere indication of the square, triangle, etc., is not sufficient.
9. Item 12.—Underlining in place of crossing out is wrong.
Test 2.
(Score is number right.)
1. Answer may be written on dotted line or elsewhere near its problem.
2. If two answers are given to any problem count as wrong.
3. If it seems clear that, by a slip, one answer has been put in the wrong bracket, and the next answers
are all thus misplaced, give credit for the answers that are right even if misplaced.
4. Omission of dollar sign is permissible.
5. Omission of decimal point is permissible in items, 2, 9, 13, and 14. Fraction may be expressed as
decimal in item 15.
Test 3.
(Score is number right.)
1. Any clear method of indicating answer is given full credit—underlining, checking, etc.
2. If two answers are marked, count as wrong unless one is clearly indicated as final.
Test 4.
(Score is number right minus number wrong.)
1. Any clear method of indicating answer is given credit.
2. When both “Same” and “Opposite” are underlined, counts as omitted, not as wrong.
3. If only “Same” is underlined right down the column, score for the test is zero. Similarly if
“Opposite” is underlined right down the column.
Test 5.
(Score is number right minus number wrong.)
Same rules as for Test 4.
Test 6.
(Score is number right.)
1. If only one number is written, give no credit.
2. If only one of the numbers is right, give no credit.
3. If four numbers are written, as frequently happens with certain items (i. e., 33, 11 instead of 3, 3),
give full credit.
Test 7
(Score is number right.)
1. Any clear indication other than underlining receives full credit.
2. Underlining of any of the first three words of an item does not remove credit.
3. If two or more of the last four words are marked, give no credit.
Test 8.
(Score is number right.)
Same rules as for Test 7.
The result of examination Alpha is expressed in a total score which is the sum of the raw scores of the
several tests. The raw scores are obtained as follows:
TEST METHOD OF SCORING MAXIMUM RAW SCORE
1 R 12
2 R 20
3 R 16
4 R − W 40
5 R − W 24
6 R 20
7 R 40
8 R 40
Total 212
Letter ratings are assigned on examination Alpha as follows:
RATING SCORE
A 135–212
B 105–134
C+ 75–104
C 45–74
C− 25–44
D 15–24
D−[5] 0–14
ebookgate.com