SlideShare a Scribd company logo
Software Pipelines and SOA Releasing the Power
of Multi Core Processing 1st Edition Cory
Isaacson pdf download
https://ebookgate.com/product/software-pipelines-and-soa-
releasing-the-power-of-multi-core-processing-1st-edition-cory-
isaacson/
Get Instant Ebook Downloads – Browse at https://ebookgate.com
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...
Software Development for Embedded Multi core Systems A
Practical Guide Using Embedded Intel Architecture 1st
Edition Max Domeika
https://ebookgate.com/product/software-development-for-embedded-multi-
core-systems-a-practical-guide-using-embedded-intel-architecture-1st-
edition-max-domeika/
ebookgate.com
Microprocessor 4 Core Concepts Software Aspects 1st
Edition Philippe Darche
https://ebookgate.com/product/microprocessor-4-core-concepts-software-
aspects-1st-edition-philippe-darche/
ebookgate.com
Networks on Chips Theory and Practice Embedded Multi Core
Systems 1st Edition Fayez Gebali
https://ebookgate.com/product/networks-on-chips-theory-and-practice-
embedded-multi-core-systems-1st-edition-fayez-gebali/
ebookgate.com
Bioinformatics High Performance Parallel Computer
Architectures Embedded Multi Core Systems 1st Edition
Bertil Schmidt
https://ebookgate.com/product/bioinformatics-high-performance-
parallel-computer-architectures-embedded-multi-core-systems-1st-
edition-bertil-schmidt/
ebookgate.com
Releasing Your Potential Expanded Edition Myles Munroe
https://ebookgate.com/product/releasing-your-potential-expanded-
edition-myles-munroe/
ebookgate.com
Little Brother First Edition Cory Doctorow
https://ebookgate.com/product/little-brother-first-edition-cory-
doctorow/
ebookgate.com
Node js Recipes 1st Edition Cory Gackenheimer (Auth.)
https://ebookgate.com/product/node-js-recipes-1st-edition-cory-
gackenheimer-auth/
ebookgate.com
SOA Principles of Service Design 1st Edition Thomas Erl
https://ebookgate.com/product/soa-principles-of-service-design-1st-
edition-thomas-erl/
ebookgate.com
Communication and Control in Electric Power Systems
Applications of Parallel and Distributed Processing IEEE
Press Series on Power Engineering 1st Edition Mohammad
Shahidehpour
https://ebookgate.com/product/communication-and-control-in-electric-
power-systems-applications-of-parallel-and-distributed-processing-
ieee-press-series-on-power-engineering-1st-edition-mohammad-
shahidehpour/
ebookgate.com
Software Pipelines and SOA Releasing the Power of Multi Core Processing 1st Edition Cory Isaacson
Software Pipelines and SOA Releasing the Power of Multi Core Processing 1st Edition Cory Isaacson
Praise for Software Pipelines and SOA
“Software Pipelines uncovers a new and unique way of software design for high-performance
development. Where other methodologies and frameworks have previously been describing
the problem, Software Pipelines is focusing on the solution. Simply put, Software Pipelines
addresses the developer’s needs for parallel computing and uncovers the throughput offered
by multi-core processors.”
—Filip Hanik, Senior Software Engineer, SpringSource, Inc.
“There are some books that tout vision but provide no pragmatic, hands-on details. Software
Pipelines and SOA offers a dose of both. Isaacson is an authority and practitioner, who under-
stands that the promise of SOA is not fulfilled simply by embracing an architectural style of
loosely coupled, network-based services but in how the applications and services that support
this architectural style are developed and deployed. This book will help support a pragmatic
approach to SOA.”
—Dan Malks,Vice President, Partner Engineering, JackBe
“. . . it provides insights on how to efficiently realize scalability on and across multi-core
machines in a predictable manner using patterns derived from the best practices in distributed
computing and SOA. Written in a conversational manner, one of the pioneering technology
leaders of our time provides keen insights on how to build scalable software solutions.”
—Ravi Palepu, SOA Consultant and Founder of PREDICT
“Software Pipelines paves the road in distributed, SOA, high-performance computing in the-
ory and practice with strong technical background, elegant architecture, and a usable imple-
mentation. A revolution in grid computing and service-oriented architecture.”
—Nicole Nemer, Ph.D., Superior Consulting
“Multi-core computing offers a unique opportunity to deliver dramatic scalability in modern
business applications; but the task is not an easy one, presenting significant challenges to the
software developer. Software Pipelines provides an easy-to-implement, concrete strategy that
enables service-oriented applications to really deliver on the promise of this new hardware
paradigm. A must read for any developer or architect stepping up to the challenge of high-
performance business transaction processing.”
—Henry Truong, Chief Technology Officer, TeleTech, Inc.
“Isaacson offers a fresh approach to componentize and parallelize software applications in a
way that is easy to debug and easy to maintain. Using the high-level abstraction of Software
Pipelines, development managers need not worry about the complexities of concurrent pro-
gramming or the challenges in dealing with maintaining threads, interprocess communication
or deadlocks. Any software architect dealing with performance and scalability issues with
complex transactional flows must consider the Software Pipelines design paradigm.”
—Venkat Pula, Field Application Engineer, Telelogic, an IBM Company
“Cory has captured the power of simplicity, enabling business software applications to expo-
nentially leverage the capacity and capabilities of today’s advanced chip architectures. Using
Software Pipelines, corporate IT groups are able to manage, control and fully utilize the power
of multi-core computing to improve scalability and reduce long-term costs.”
—Jim Hogan, Cognify,Vice President, Managed Services
“Having projects architected to gracefully scale from a single multi-core box all the way to a
cluster of thousands of machines is the new reality. With Software Pipelines, the development
organization can easily architect every project—from the summer intern’s toy prototype to
your flagship technology—as though it might need to scale for worldwide consumption.
Embrace this change now and the day you need that scalability will be your biggest success.
Ignore it and it will likely be your greatest failure.”
—Jackson Gibbs, CTO, Strands
Software Pipelines and SOA
Addison-Wesley Information Technology Series
Capers Jones and David S. Linthicum, Consulting Editors
The information technology (IT) industry is in the public eye now more than ever before because of a number of
major issues in which software technology and national policies are closely related. As the use of software expands,
there is a continuing need for business and software professionals to stay current with the state of the art in software
methodologies and technologies. The goal of the Addison-Wesley Information Technology Series is to cover any
and all topics that affect the IT community. These books illustrate and explore how information technology can be
aligned with business practices to achieve business goals and support business imperatives. Addison-Wesley has
created this innovative series to empower you with the benefits of the industry experts’ experience.
For more information point your browser to www.awprofessional.com/itseries
Sid Adelman, Larissa Terpeluk Moss, Data Warehouse
Project Management. ISBN: 0-201-61635-1
Sid Adelman et al., Impossible Data Warehouse
Situations: Solutions from the Experts.
ISBN: 0-201-76033-9
David Leon Clark, Enterprise Security: The Manager's
Defense Guide. ISBN: 0-201-71972-X
Frank P. Coyle, XML, Web Services, and the Data
Revolution. ISBN: 0-201-77641-3
Jill Dyché, The CRM Handbook: A Business Guide
to Customer Relationship Management.
ISBN: 0-201-73062-6
Patricia L. Ferdinandi, A Requirements Pattern:
Succeeding in the Internet Economy.
ISBN: 0-201-73826-0
David Garmus and David Herron, Function Point
Analysis: Measurement Practices for Successful
Software Projects. ISBN: 0-201-69944-3
Beth Gold-Bernstein, William Ruh, Enterprise
Integration: The Essential Guide to Integration
Solutions. 0-321-22390-X
John Harney, Application Service Providers (ASPs):
A Manager's Guide. ISBN: 0-201-72659-9
International Function Point Users Group, IT
Measurement: Practical Advice from the Experts.
ISBN: 0-201-74158-X
Cory Isaacson, Software Pipelines and SOA: Releasing
the Power of Multi-Core Processing,
ISBN: 0137137974
Capers Jones, Software Assessments, Benchmarks, and
Best Practices. ISBN: 0-201-48542-7
Ravi Kalakota and Marcia Robinson, e-Business 2.0:
Roadmap for Success. ISBN: 0-201-72165-1
Ravi Kalakota and Marcia Robinson, Services Blueprint:
Roadmap for Execution. ISBN: 0-321-15039-2
David S. Linthicum, B2B Application Integration:
e-Business-Enable Your Enterprise. ISBN: 0-201-70936-8
David S. Linthicum, Enterprise Application Integration.
ISBN: 0-201-61583-5
David S. Linthicum, Next Generation Application
Integration: From Simple Information to Web Services.
ISBN: 0-201-84456-7
Anne Thomas Manes, Web Services: A Manager’s
Guide. ISBN: 0-321-18577-3
Larissa T. Moss and Shaku Atre, Business Intelligence
Roadmap: The Complete Project Lifecycle for Decision-
Support Applications. ISBN: 0-201-78420-3
Bud Porter-Roth, Request for Proposal: A Guide to
Effective RFP Development. ISBN: 0-201-77575-1
Ronald G. Ross, Principles of the Business Rule
Approach. ISBN: 0-201-78893-4
Dan Sullivan, Proven Portals: Best Practices for
Planning, Designing, and Developing Enterprise
Portals. ISBN: 0-321-12520-7
Karl E. Wiegers, Peer Reviews in Software: A Practical
Guide. ISBN: 0-201-73485-0
Ralph R. Young, Effective Requirements Practices.
ISBN: 0-201-70912-0
Bill Zoellick, CyberRegs: A Business Guide to Web
Property, Privacy, and Patents. ISBN: 0-201-72230-5
Software Pipelines
and SOA
Releasing the Power of
Multi-Core Processing
Cory Isaacson
Upper Saddle River, NJ • Boston • Indianapolis • San Francisco
New York • Toronto • Montreal • London • Munich • Paris • Madrid
Capetown • Sydney • Tokyo • Singapore • Mexico City
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where
those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed
with initial capital letters or in all capitals.
Java, JDBC, J2EE, JNI, Javadoc, MySQL and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the
United States, other countries, or both.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. UNIX is a registered
trademark of The Open Group in the United States, other countries, or both. Microsoft, Windows, Microsoft .NET
Remoting, and Microsoft .NET connection software are either registered trademarks or trademarks of Microsoft
Corporation in the United States and/or other countries.
IBM, iSeries, and zSeries are trademarks of International Business Machines Corporation in the United States, other
countries, or both.
CORBA is a registered trademark of Object Management Group, Inc. in the United States and/or other countries.
Apache, log4j, JMeter, Ant, and Tomcat are trademarks of The Apache Software Foundation.
dbShards is a trademarks of CodeFutures Corporation, in the United States.
The Software Pipelines Reference Framework includes software developed by the Spring Framework Project
(springframework.org). Spring Framework components copyright 2002–2007 by the original author or authors. The Spring
Framework is licensed under the Apache License,Version 2.0 (the “License”).You may obtain a copy of the License at:
apache.org/licenses/LICENSE-2.0.
Other company, product, or service names mentioned may be trademarks or service marks of others.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any
kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in
connection with or arising out of the use of the information or programs contained herein.
The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may
include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus,
and branding interests. For more information, please contact: U.S. Corporate and Government Sales, (800) 382-3419,
corpsales@pearsontechgroup.com
For sales outside the United States please contact: International Sales, international@pearsoned.com
Visit us on the Web: informit.com/aw
Library of Congress Cataloging-in-Publication Data
Isaacson, Cory.
Software pipelines and SOA : releasing the power of multi-core processing
/ Cory Isaacson.—1st ed.
p. cm.
Includes bibliographical references and index.
ISBN 0-13-713797-4 (pbk. : alk. paper)
1. Parallel processing (Electronic computers) 2. Computer software—Development.
3. Web services. I. Title.
QA76.58.I82 2008
004’.35--dc22 2008040489
Copyright © 2009 Pearson Education, Inc.
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must
be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any
form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions,
write to:
Pearson Education, Inc.
Rights and Contracts Department
501 Boylston Street, Suite 900
Boston, MA 02116
Fax: (617) 671-3447
ISBN-13: 978-0-13-713797-8
ISBN-10: 0-13-713797-4
Text printed in the United States on recycled paper by RR Donnelley in Crawfordsville, Indiana.
First printing, December 2008
vii
Contents
Foreword xv
Preface xvii
Acknowledgments xxi
About the Author xxiii
Introduction xxv
Section I: Pipelines Theory 1
CHAPTER 1 Parallel Computing and Business Applications 3
Mechanical Solutions: Parallel Computing at the Operating System Level 5
Symmetric Multiprocessing 5
Clustering 5
Automated Network Routing: Parallel Computing by Predetermined Logic 6
Grid Computing: Parallel Computing by Distribution 6
Parallel Computing for Business Applications 7
The Solution: Software Pipelines 8
Fluid Dynamics 10
Software Pipelines Example 11
Summary 16
CHAPTER 2 Pipelines Law 17
The Problem of Wasted CPU Power 17
Fluid Dynamics 18
Pipelines Law: The Basic Rule 19
Corollary 1: Limitations on the Flow 20
Corollary 2: Restrictions on the Output Flow 21
Software Pipelines Rules 22
Rule 1 22
Rule 2 23
Rule 3 26
Summary 30
viii Contents
CHAPTER 3 Pipelines Examples 31
Bank ATM System (Single-Tier Distribution) 31
Pipelines 32
Pipeline Distributor 33
Bank ATM System (Multi-Tier Distribution) 35
Secondary Pipeline Tier 36
Primary Pipeline Tier 41
Summary 43
CHAPTER 4 Pipelines Patterns 45
Service Invocation Patterns 47
Push Pattern 47
Pull Pattern 47
Message Exchange Patterns 49
One-Way Pattern 49
Request-Response Pattern 49
Pipeline Routing Patterns 51
Round-Robin Routing Pattern 52
Content-Based Routing Pattern 53
Custom Routing Pattern 54
Join Pattern 55
Distributor Patterns 55
Single Distributor Pattern 56
Multi-Tier Distributor Pattern 56
Client Distributor Pattern 58
Database Sharding Distributor Pattern 58
Distributor Connector Patterns 60
Local Method Invocation Pattern 61
Socket Invocation Pattern 62
Web Service Invocation Pattern 62
Other Patterns 62
Summary 62
CHAPTER 5 Pipelines: The Organizational Impact 65
Strategic Evaluation 66
Budget Impact 68
Contents ix
Organizational Roles and Responsibilities 70
Pipelines Architect 71
Business Unit Sponsor 72
IT Management 73
Application Developer 74
Application Project Manager 75
Quality Assurance Manager 76
IT Operations 77
Summary 78
Section II: Pipelines Methodology 79
CHAPTER 6 Software Pipelines Optimization
Cycle: Overview 81
Yet Another Software Methodology? 81
SPOC Overview 82
CHAPTER 7 The Five Steps of SPOC 85
Summary 88
CHAPTER 8 Pipelines by Example: Introducing the
Pipelines Bank Corporation 89
SPOC Report Template 93
Summary 94
CHAPTER 9 SPOC Step 1: Pipelines Objectives 95
Step 1.1: Identify Business Objectives/Requirements 96
Step 1.2: Determine Input Processing Rate 102
Step 1.3: Determine Future Potential Input Processing Rate 104
Step 1.4: Measure Current Capacity 107
Step 1.5: Calculate Performance Gap 109
Step 1.6: Define Pipelines Targets 111
Summary 113
x Contents
CHAPTER 10 SPOC Step 2: Pipelines Analysis 115
Step 2.1: Map Current Process Flow 116
Step 2.2: Identify Existing Components 119
Step 2.3: Measure Processing Rate of Existing Components 121
Step 2.4: Calculate Processing Rate of Entire Flow 124
Step 2.5: Identify Restriction Points 127
Summary 129
CHAPTER 11 SPOC Step 3: Pipelines Design 131
Step 3.1: Define Service Flow Design 133
Step 3.2: Identify New Components 138
Step 3.3: Identify Pipeline Opportunities 141
Step 3.4: Define Pipelines Scheme 145
Step 3.5: Determine Distributor Rate 151
Step 3.6: Design Physical Deployment Environment 154
Step 3.7: Define/Optimize Pipelines Design 155
Pipeline the Downstream Service 156
Pipeline Services Independently 159
Pipeline the Entire Service 161
Summary 168
CHAPTER 12 SPOC Step 4: Pipelines Implementation 169
Step 4.1: Establish Software Pipelines Framework 171
Step 4.2: Modify Existing Components 173
Map Components to Service Flow 174
Evaluate Components 174
Determine How to Incorporate Components 174
Prepare Component Table 175
Develop Components 175
Step 4.3: Develop New Components 178
Step 4.4: Orchestrate Service Flows 179
Step 4.5: Instrument Service Flow 181
Step 4.6: Develop/Modify Pipeline Sets 182
Step 4.7: Test and Optimize Pipelines Implementation 190
Summary 193
Contents xi
CHAPTER 13 SPOC Step 5: Pipelines Deployment 195
Step 5.1: Plan Pipelines Deployment 196
Step 5.2: Deploy to Production Environment 197
Step 5.3: Monitor Production Environment 198
Step 5.4: Evaluate Results, Plan Next SPOC Iteration 199
Summary 201
Section III: Pipelines Examples 203
CHAPTER 14 Hello Software Pipelines 205
Define the Message 206
Build the Service 207
Configure the Distributors 209
Create the Client 212
Run the Service 215
Summary 215
CHAPTER 15 Scaling Hello Software Pipelines 217
Scale the Service 217
Develop a Scalable Test Client 219
Run the Service 223
Summary 228
CHAPTER 16 Additional Pipelines Router Configurations 229
Content-Based Router 229
Custom Pipelines Router 241
Summary 256
CHAPTER 17 Getting an Answer from Hello
Software Pipelines 257
Request-Response Messaging 257
Use Request-Response with Hello Software Pipelines 261
Summary 273
xii Contents
CHAPTER 18 Additional Distributor Connector Patterns 275
Define and Configure a Connector 275
Socket Connector 278
Web Service Connector 280
Summary 282
CHAPTER 19 Using a Multi-Tier Distributor 283
Configure the Multi-Tier Distributors 284
Create the Client 289
Run the Service 292
Summary 293
CHAPTER 20 Database Sharding Distributor 295
Database Shards Example 297
Create the Database Shards 299
Build the Service 299
Configure the Distributor 303
Configure the Sharding Driver 304
Create the Client 305
Run the Service 307
Summary 309
CHAPTER 21 Pipelines Framework Overview 311
Interface Overview 311
AbstractMessage 312
PipelinesDistributor 313
PipelinesConnector 313
PipelinesRouter 313
Pipeline 314
PipelineService 314
Pipelines Instrumentor 314
Summary 322
Contents xiii
CHAPTER 22 Pipelines Bank Corporation (PBCOR) Example 323
Account Transaction 323
Pipelines Configuration 328
Spring Framework 332
Database Access 333
AuthorizeTransactionService 339
Connect Services 342
ValidateService 345
DebitTransactionService 345
Run the Test 348
Summary 349
Section IV: The Future of Software
Pipelines 351
CHAPTER 23 The Future of Software Pipelines 353
Final Words of Advice 353
Ideas for the Future 354
APPENDIX Pipelines Reference Framework
Javadoc 357
Index 375
This page intentionally left blank
xv
Foreword
Multi-core hardware is the new normal. Major computer chip vendors have
essentially halted the regular increase in CPU clock speeds that reigned for almost
a half century in response to issues like power consumption, heat output, and
unpredictability of quantum physics (to paraphrase Einstein, CPUs shouldn’t
play dice …).
Instead, they are using multi-core architectures to deliver increased process-
ing power in place of faster clock speeds. Although this is a logical move, a large
percentage of existing software applications cannot take advantage of the pro-
cessing power on the additional cores, and they often run even slower due to
reduced clock speeds in multi-core CPUs, setting up what could be called the
Multi-core Dilemma.
In general, the Multi-core Dilemma applies across the spectrum of program-
ming languages—Java, C#, C++, etc. This is why major technology vendors are
investing heavily in research intended to lead to the next generation of program-
ming environments. But what about the software that has already been written?
The reality for any software application is that to benefit from multi-core, the
application must either be written to be multi-threaded, or it must be in a con-
tainer that effectively makes it multi-threaded.
There is no “plug-and-play” solution, but there are development tools and
containers available that can help with the Multi-core Dilemma for many use
cases. There are not, however, many good methodologies for solving this prob-
lem. In Software Pipelines and SOA, Cory Isaacson outlines a systematic, logical
approach for planning and executing the move to multi-core.
This hardware trend will create a tectonic shift in the software industry as
billions of lines of code are migrated, optimized, or rewritten to take advantage
of multi-core hardware. Practical, logical approaches will be essential to making
this transition smoothly.
Now that parallel computing has moved from being an edge case to being a
common requirement for enterprise software, enabling applications to run in
parallel can’t be limited to only the most experienced programmers. Software
Pipelines and SOA describes several techniques for bringing parallel computing to
mainstream software development.
xvi Foreword
For example, one technique for making parallel computing happen through-
out your development group is to separate your concurrency model from the
application logic, much as you have your data and UI layer separate from the
main business logic. Doing so allows feature developers to focus on the applica-
tion functionality without having to worry about explicitly threading at design
time. In addition, it can be an effective technique for migrating existing single-
threaded applications into multi-core environments.
In addition, Software Pipelines and SOA discusses the connection between ser-
vice-oriented architectures and multi-core. The basic approach is to treat your
application as a collection of services and deploy a container that can run multi-
ple instances of those services.
Using this link between SOA and multi-core, services can be a key part of
your concurrency model. By separating concurrency from application logic, you
can make the migration of existing applications to multi-core much simpler and
enable more effective building of new parallel applications. It also makes it much
easier to reconfigure (rather than recode) your applications, then continue to
optimize them and move to new generations of hardware—from 2 and 4 cores to
8, 16, 32 … 128, and beyond. Designing enterprise applications in a service-
oriented architecture makes it easier to separate concurrency from application
logic, so that they work together.
There is work involved if you have a monolithic application, but it is still sig-
nificantly less than rewriting. If you plan to use a container, make sure that it can
handle your business application requirements, which might include message
ordering, forks and joins in the business process, human interaction, and long-
running processes.
Most parallel computing approaches use traditional multi-threaded pro-
gramming, a “thread-level” approach. Software Pipelines and SOA describes a “ser-
vice-level” approach that can provide a way to move to multi-core that requires
less effort and is more configurable. It complements, rather than replaces, the
traditional thread-level approaches.
Moving your existing applications to multi-core takes some planning, but it
might not be as much work as you think. Design a solid concurrency model, and
your existing applications can continue to serve you for years to come. Software
Pipelines and SOA provides a great road map for getting there.
Patrick Leonard
VP, Engineering & Product Strategy
Rogue Wave Software
pleonard@roguewave.com
xvii
Preface
We’re now in the multi-core era. As consumers of computing power, we’ve all
come to expect a never-ending increase in power, and CPU manufacturers are
now using multi-core processors to continue that long-standing trend. If we want
to take full advantage of this enormous capacity, our business applications must
“do more than one thing at a time.” However, traditional parallel computing
methods (such as multi-threading, SMP, and clustering) are either limiting or
extremely difficult to implement—especially when used on top of application
components that weren’t originally designed for a parallel world.
Software Pipelines architecture is a new architecture that specifically
addresses the problem of using parallel processing in the multi-core era. It is a
new approach to the problem. Pipeline technology abstracts the complexities of
parallel computing and makes it possible to use the power of the new CPUs for
business applications.
We wrote this book primarily for software architects, application developers,
and application development managers who need high-performance, scalable
business applications. Project managers, software quality assurance specialists,
and IT operations managers will also find it useful; however, the main focus is
software development. Our intention was to make the book as applicable as pos-
sible, and to provide tools that you can quickly learn and apply to your own
development challenges.
The book is divided into four sections, which we’ll describe in this preface.
Pipelines Theory
The Pipelines Theory section, Chapters 1 through 5, covers the following topics:
• How pipelines work, including the fundamental concepts and underlying
theory of Software Pipelines
• What pipelines can accomplish
• Methods for applying Software Pipelines
• Pipelines Patterns, including various ways to apply Software Pipelines in busi-
ness application scenarios, setting the stage for the examples in later chapters
xviii Preface
As the foundation for the remainder of the book, this section is appropriate for
all readers. If you’re a software architect or an application developer, you should
definitely study this section first. If you’re reading the book from a managerial
perspective, or if your interest is more general and less technical, you can focus
on just this section.
Pipelines Methodology
The Pipelines Methodology section, Chapters 6 through 13, shows how to imple-
ment Software Pipelines by using the step-by-step Software Pipelines
Optimization Cycle (SPOC). To illustrate how the methodology works, we use it
to solve a business problem for a fictitious example company, the Pipelines Bank
Corporation (PBCOR). In each chapter we present a new step, then show you
how we used the step in our PBCOR example.
This section will be of interest to all primary audiences of the book, includ-
ing project managers. The PBCOR examples get into a fair amount of technical
detail; therefore, application development managers might want to skip over the
more complex examples.
Pipelines Examples
The Pipelines Examples section, Chapters 14 through 22, contains code examples
based on the reference Pipelines Framework we developed for the book. We’ve
included examples for each main Pipelines Pattern from the Pipelines Theory
section. You can use these as guides for applying Software Pipelines directly to
your own real-world applications.
This section is for software architects and application developers, the roles
directly involved in pipelines implementation. In addition, IT operations manag-
ers will find it helpful to read the configuration sections, which show how to
modify the scalability of an application without modifying the actual application
components.
We recommend that you read the first three chapters of this section in detail.
These basic chapters include Chapter 14,“Hello Software Pipelines”; Chapter 15,
“Scaling Hello Software Pipelines”; and Chapter 16,“Additional Pipelines Router
Configurations.” After that, you might prefer to scan the more advanced exam-
ples in Chapters 17 through 22, then concentrate on the ones that most apply to
your specific application scenarios.
Preface xix
The Future of Software Pipelines
In the final section we tell you about the future we envision for Software Pipelines
architecture. There are plenty of greenfield areas that can be developed, and it is
our hope that this section will inspire readers to help move the technology for-
ward into the mainstream.
Conventions
In our examples, when we present a section of code or XML, refer to a command,
or refer to a code element, we’ll use a monospaced font, for example, <pipe-
lines-distributor>. For names of components, such as services, clients,
and distributors, we’ll use an italic monospaced font, for example,
Distributor1.
The Web Site
We’ve established a Web site for Software Pipelines technology at softwarepipe-
lines.org. The site is for readers of the book and for anyone else who is interested
in using or advancing the Software Pipelines architecture. You can download the
following items from the site:
• Tools and sample report templates for the Software Pipelines Optimization
Cycle (SPOC) methodology
• Source code for the reference Pipelines Framework
• Complete source code for all examples in the book
• Articles and discussions on pipelines technology and its applications
We hope you find Software Pipelines as exciting as we’ve found it, and that
you take this opportunity to capitalize on its capabilities and use it to help over-
come your own performance and scalability challenges.
This page intentionally left blank
xxi
Acknowledgments
There are many individuals who have contributed to the evolution of Software
Pipelines, and who have helped with the creation of this first book. I am deeply
indebted to all of them for the ideas, input, and, most of all, encouragement and
support on the project. I cannot mention everyone, but here are some of the
many contributors who made this work possible:
Ravi Palepu, great friend and business associate, spent countless hours with
me discussing pipelines ideas and helping to develop the initial concepts and
outline for the current work.
Patrick Leonard and David Haney of Rogue Wave Software worked with me
to formulate the original core pipelines concepts, forming the foundation of the
current work.
I also want to acknowledge the entire Rogue Wave Software organization, for
its support during and after my tenure there as president of the company.
Barbara Howell was the illustrator and incredibly dedicated editor for my
draft of the book; without her I never could have gotten the job done. Her persis-
tence, attention to detail, and talent for helping me communicate the key con-
cepts through the diagrams and graphics you see in the book were invaluable.
Colin Holm provided the majority of development for the code examples, as
well as the reference Pipelines Framework presented in the third section. Colin’s
insight and work on this were critical to the book’s final content, and his ability
to create the examples from the viewpoint of a “real-world” business application
developer helped transform Software Pipelines from concept to reality.
Last, I must thank my family, especially my wife, Kim, for putting up with
the enormous amount of work required to complete the book. I also want to
thank my talented and understanding children for their cooperation and under-
standing. In fact, my older son, Devyn (a genuine math whiz), helped clarify the
early formulas for Pipelines Law, and my younger son, Tyler, was often a sound-
ing board for the various ideas in the book and how to present them.
This page intentionally left blank
xxiii
About the Author
Cory Isaacson is CEO of Prelude Innovations, Inc., a firm specializing in the
incubation and introduction of leading software technology products. Actively
involved in leading information technologies for over 20 years, Cory served as
technical editor and columnist for WebSphere Advisor Magazine, has spoken at
hundreds of public events and seminars, and authored numerous articles on
architecture and practicalities of employing technology. Cory has provided guid-
ance to hundreds of top architects and professional developers in the financial
services, entertainment, telco, and software industries on the development and
implementation of powerful business applications.
Most recently Cory was president of Rogue Wave Software, managing the
organization for over three years, building new product strategies, and culminat-
ing in a successful acquisition in mid-2007 by a leading private equity firm. Cory
has focused on efficiently addressing development and deployment challenges of
emerging technologies such as SOA, virtualization, and commoditization of
resources to support real-world business applications. Cory’s expertise with high-
performance transactional applications has helped leading IT organizations
respond to the challenges of dramatic growth in business and data volumes, while
still managing cost pressures. Most recently, Cory has been an active evangelist
on the need for using concurrent processing and scalable database techniques in
order to improve application performance on multi-core architectures.
Cory received his B.A. degree from the University of California at Santa
Barbara.
This page intentionally left blank
xxv
Introduction
Throughout IT history,professional developers have searched for ways to enhance
the performance of critical business applications. The computer industry has
tried to provide the answer time and time again, and we’ve seen plenty of solu-
tions, architectures, and approaches. Obviously, the problem is not a minor one.
In today’s information-based economy, companies often succeed or fail because
of their software performance. There are abundant examples: banking systems,
trading systems, call center operations, reporting services, and many others—
they all depend on applications with high-performance requirements. In these
industries, viability is directly tied to the speed at which a company conducts
business. A slow, inadequate, or unresponsive application is damaging to opera-
tions and the bottom line; ultimately, it can literally kill or impair the organiza-
tion that relies on it. And there is no end in sight; as we depend more and more
on the exchange of information to do business, performance will lag behind
demand even further.
There’s an additional problem. Simply achieving faster performance of indi-
vidual components isn’t always enough. If your company installs a new applica-
tion, if your business expands, or if your data volume rises, you may suddenly
need an order-of-magnitude increase in performance—five, ten, twenty times or
more.
Another vector is also critical: How fast can you adapt your software to meet
new needs and competitive threats? The popularity and rapid adoption of ser-
vice-oriented architecture (SOA) is hard evidence of the demand for more flexi-
ble software systems.
SOA is a superior technology. Compared to earlier trends in IT architecture,
SOA delivers better on its promises. But it presents its own challenges. If you’re
using SOA for development, it’s even more important to address performance
and scalability, because of the following factors:
• In general observation, SOA demands significantly more computing power
from a system than earlier monolithic or tightly coupled designs.
xxvi Introduction
• The very notion of loosely coupled services implies message-centric applica-
tion development. Developers not only have to write traditional processing
logic; they also have to handle message transmission, validation, interpreta-
tion, and generation—all of which are CPU- and process-intensive.
• As more organizations use SOA, we can expect messaging volume to explode
and put a tremendous load on existing IT systems. The potential for adverse
effects will escalate.
Predictions show that over the next year or two, organizations using SOA
will run into performance issues. This is nothing new; historically, each time the
business world adopts a new software architecture, it suffers through growing
pains. In the past twenty years, the shakeout period for each new major paradigm
shift in software development has lasted about one to three years for a given evo-
lutionary phase (any early J2EE user can attest to that). During that time, busi-
nesses gradually adopt the new design, and while doing so, they face significant
performance- and scalability-related problems. In many cases software develop-
ers cannot overcome the steep learning curve; many projects end in outright fail-
ure when the deployed application doesn’t perform as expected.
Until recently, hardware was the saving grace for such immature architec-
tures. Whenever the computer industry made a significant advance, mostly in
CPU performance, performance bottlenecks could be fixed by plugging in a faster
chip or by using some other mechanical solution. That advantage is now gone.
We’ve hit a plateau in microprocessor technology, which comes from physical
factors such as power consumption, heat generation, and quantum mechanics.
The industry can no longer easily increase the clock speed of single CPUs.
Therefore, for now and the foreseeable future, CPU vendors are relying on multi-
core designs to increase horsepower. The catch is that if you want to take advan-
tage of these new multi-core chips, your software must implement parallel
processing—not a common capability in the majority of today’s applications.
Let’s sum up what today’s businesses really need from their software archi-
tecture:
• A practical approach to parallel processing, for performance and scalability
• Flexibility, to enable the business to adapt to market and other environmen-
tal changes
Introduction xxvii
Creating an application with these characteristics is not easy, especially when
using traditional means. Further, making such a paradigm shift work in the real
world requires the talent, business knowledge, and technical expertise of the pro-
fessional developer. In short, the professional developer needs a set of tools
designed to meet these objectives, enabling a new level of parallel processing for
business applications.
Therefore, what is needed is a flexible, sensible, and practical approach to
parallel processing. The Software Pipelines technology was developed to be that
approach, offering the professional developer a usable set of tools and capabili-
ties to enable scalable processing for today’s competitive business application
environment.
What Do People Think about Parallel Processing?
As part of our research for this book, we wanted to find out what the software
community thinks about parallel processing, so we conducted a statistical analy-
sis of associated Web documents. Our analysis tool compares the usage of terms
in Web documents, along with their frequency, in order to indicate the overall
trend for a given subject. The results are intriguing; they confirm the importance
of parallel processing as a solution for modern computing challenges.
To run the analysis, we based our search on the subject“software”and looked
for references to related terms in the context of that subject. We started with the
following terms:
• Multi-core
• Multi-threaded
• Parallel processing
• Parallel programming
xxviii Introduction
We’ve included several charts in this section to show you the results. The first
chart, Figure I.1, shows how often people use each term. As you can see, parallel
programming is the most popular term, followed by multi-core, and then parallel
processing. This gives us a good idea of how the software community talks about
the subject.
To get a more detailed query, we cross-linked each term with the following
attributes:
• Complex
• Hard
• Important
• Knowledge
• Useful
Figure I.1 Software query
Introduction xxix
In Figure I.2 you can see the relationship of each attribute to parallel process-
ing. Parallel processing is perceived as “useful” and “important,” its two strongest
attributes.
Figure I.2 Attributes for parallel processing
xxx Introduction
Figure I.3 shows parallel programming and its attributes. Parallel program-
ming is definitely “important,” but a high percentage of documents also mention
that it is “hard.” It’s interesting that “knowledge” has a high rank, which is not
surprising, given the difficulty of parallel programming and the general lack of
experience with its techniques.
Figure I.3 Attributes for parallel programming
Introduction xxxi
Figures I.4 and I.5 show the attributes for multi-core and then multi-threaded.
Both charts show responses similar to what we found for parallel programming.
Figure I.5 Attributes for multi-threaded
Figure I.4 Attributes for multi-core
xxxii Introduction
In Figure I.6 we’ve included a chart with all terms and attributes to show the
relative strength of each combination.You can see that parallel processing is con-
sidered “useful,” and that parallel programming is both “important” and “hard.”
What conclusion could you draw from all of this? It appears that people who
talk about software are saying that parallel processing is important, but it’s not
easy. We’re hoping we can help make it easier. The goal of Software Pipelines, and
our goal in writing this book, is to provide a practical and useful set of techniques
to address the challenge, and our intention is that you will find it helpful in your
own application development and business management.
Figure I.6 Attributes for all terms
S E C T I O N I
1
Pipelines Theory
The first section of this book covers the fundamentals of Software Pipelines.
In Chapter 1, “Parallel Computing and Business Applications,” we investigate the
existing methods for parallel processing. This beginning discussion is useful as a frame of
reference for comparing Software Pipelines to other technologies with which you’re famil-
iar. After that, we introduce you to the most basic principles of the pipelines architecture,
and then we present our first example of a pipelined application.
The following chapter, “Pipelines Law,” describes the basic theory of pipelines and
explains how to “do the math” for predicting and managing pipelines performance. We
introduce Pipelines Law by drawing an analogy to fluid dynamics, a long-standing engi-
neering discipline that provides insights into gauging the performance of business trans-
action applications. From these simple principles you’ll get the tools for modeling your
own applications and for identifying areas where you can improve performance.
Chapter 3, “Pipelines Examples,” contains a simplified automated teller machine
(ATM) example. We use this basic example to show you how the theoretical foundation
fits into a real-world application. In later sections we expand the banking application con-
cept to more detailed, advanced examples.
We’ve included a number of common, useful patterns for pipelines implementations
in Chapter 4, “Pipelines Patterns.” You can implement Software Pipelines in many ways.
In this chapter you’ll learn about several aspects and their options. Later in the book we
cover these patterns in much more detail. You’ll learn how they work and how you can
apply them to solve various problems in performance and scalability.
In the final chapter of the section,“Pipelines: The Organizational Impact,” we present
the issues with which IT and business organizations must deal when using Software
Pipelines technology. We cover all the critical points, including strategy, resources, and
budget.
This page intentionally left blank
3
C H A P T E R O N E
Parallel Computing and
Business Applications
If you own, manage, or work with a critical business appli-
cation, you’re most likely dealing with performance prob-
lems. The application can’t handle the ever-increasing
data volume, it can’t scale to meet new demand, or its per-
formance is never good enough or fast enough. You need
a higher level of performance; or even more daunting,
you may need an order-of-magnitude increase so you can
multiply the number of transactions your application can
handle. In today’s computing environment, there’s really
only one way to get there: Utilize a parallel architecture to
run multiple tasks at the same time.
The fundamental concept of parallel architecture is
this: Given a series of tasks to perform, divide those tasks
into discrete elements, some or all of which can be pro-
cessed at the same time on a set of computing resources.
Figure 1.1 illustrates this process.
To do this, you have to break the application into a
series of steps,some of which can run in parallel.However,
that’s really hard to do if you’re working with existing
business applications that do not lend themselves to such
decomposition. Whether monolithic or object-oriented,
most modern applications are tightly coupled, and that
makes it hard to decompose a given process into steps.
Over the years, computer scientists have performed
extensive research into parallel architecture and they’ve
developed many techniques, but until now they focused
on techniques that don’t easily lend themselves to busi-
4 1. Parallel Computing and Business Applications
ness systems. At the same time, demand for greater performance started over-
reaching the limit of most business applications, and the recent trend toward a
service-oriented approach has made the challenge even greater. Parallel process-
ing can fix the problem, but common existing techniques are either too complex
to adapt to typical business transactions, or they don’t even apply to the business
arena.
Before we show you the solution, let’s look at the existing techniques for par-
allel computing. The three main approaches are
• Mechanical solutions used at the operating system level, such as symmetric
multiprocessing (SMP) and clustering
• Automated network routing, such as round-robin distribution of requests
• Software-controlled grid computing
Figure 1.1 The fundamental concept of parallel architecture
Mechanical Solutions: Parallel Computing at the Operating System Level 5
Mechanical Solutions: Parallel Computing at the Operating
System Level
Symmetric Multiprocessing
SMP automatically distributes application tasks onto multiple processors inside
a single physical computer; the tasks share memory and other hardware resources.
This approach is highly efficient and easy to implement, because you don’t need
specific, detailed knowledge of how SMP divides the workload.
Mechanical solutions such as SMP are very useful as generic one-size-fits-all
techniques. To get the most out of SMP, however, you have to write applications
with multi-threaded logic. This is a tricky job at best and is not, in general, the
forte of most corporate IT developers. Plus, SMP is a black-box approach, which
can make it very difficult to debug resource contention. For example, if you have
shared software components and run into a problem, finding the cause of the
bug may be very hard and time-consuming.
There’s another drawback: Resource sharing between processors is tightly
coupled and is not optimized for any particular application. This puts a lid on
potential performance gain, and when you start scaling an application, shared
resources will bottleneck at some point. So you might scale an application to
eight processors with great results, but when you go to 16, you don’t see any real
gain in performance.
Clustering
In clustering, another widely used mechanical solution, separate physical com-
puters share the workload of an application over a network. This technique pro-
vides some capabilities for automatic parallel processing and is often used for
fail-over and redundancy.
Clustering techniques are automated and contain some inefficient function-
ality. If you’re not using centralized resources, the system has to copy critical
information (or in some cases, all information) from one node to another when-
ever a change in state occurs, which can become a serious bottleneck. As is the
case with SMP, clustering is often effective up to a point—then adding hardware
results in severely diminished returns.
6 1. Parallel Computing and Business Applications
Automated Network Routing: Parallel Computing
by Predetermined Logic
In this technique you use some type of predetermined logic to divide application
requests. One common approach is round-robin routing, where the system dis-
tributes requests evenly, one after the next, among a set of physical computers.
Each computer provides exactly the same application functionality. A good
example and use case for round-robin is a Web application, in which the system
shunts each Web page request to one of several available processors.
Although this approach is useful for certain applications and can be useful as
part of a Software Pipelines design, it is also very limited; the router has no logic
for determining the best route for a given request, and all downstream processors
perform identical tasks. Further, business applications often demand strict“order
of processing” requirements, something that simple round-robin logic cannot
accommodate.
Grid Computing: Parallel Computing by Distribution
All of the techniques covered so far have their uses, but you can’t use them for
massive scalability, and they don’t work for transaction-based, message-oriented
applications. You can scale them mechanically and automatically to a certain
level, at which point the overhead of maintaining shared or redundant resources
limits performance gains. If you need greater scalability, grid computing is a bet-
ter choice.
In grid computing the system distributes discrete tasks across many machines
in a network. Typical grid architecture includes a centralized task scheduler,
which distributes and coordinates tasks with other computing facilities across
the network.
Grid computing can deliver far higher throughput than the automated
approaches described earlier, but it puts a significant burden on the developer.
You must explicitly write the code for dividing tasks, for distributing tasks, and
for reassembling the processed results.
Most importantly, grid computing is primarily designed to solve the“embar-
rassingly parallel” problem—long-running, computation-intensive processes as
found in scientific or engineering applications. Grids are very beneficial for the
typical use cases, such as modeling fluid dynamics, tracing the human genome,
and complex financial analytics simulations. In each of these applications you
divide a massive, long-running computation among multiple nodes. This divides
Parallel Computing for Business Applications 7
the problem into smaller, similar tasks, which interact predictably with computa-
tional resources. However, this is not as useful for business applications, given
their transactional nature, mixed workload requirements, and ever-changing vol-
ume demands.
Parallel Computing for Business Applications
Business applications are very different from engineering or scientific applica-
tions. They have the following traits:
• They process transactions.
• They process tasks with mixed workloads. Quite often you can’t predict the
size of each task, or what the processing requirements might be.
• The workload varies widely throughout a given time period. It might even
change from day to day, or from one hour to the next.
• They often have requirements that defy the very concept of performing mul-
tiple tasks in parallel. For example, first in/first out (FIFO) transactions
(which are very commonly used) must be done in an exact, ordered
sequence.
• They almost always use a database or other centralized resource that bottle-
necks and caps off transaction throughput.
Up to now, research on parallel computing concentrated mostly on mechan-
ical solutions with limited scalability, or on grid-based scientific and engineering
applications that lie outside the business domain. What we need is a new, simpler
way to implement parallel computing for businesses. This new approach must
support the following requirements:
• It must handle a wide variety of business application needs.
• It must provide ultimate scalability.
• It must maintain critical business requirements.
• It must be easy to implement by corporate IT developers.
In reality, there’s no automagic answer for scaling business applications,
because each organization has very different needs and requirements. The ulti-
mate solution requires the right tools, architecture, and approach, and it must
focus on business applications. But more importantly, the solution requires the
expertise of the professional developer—the invaluable corporate resource who
possesses both a full understanding of the technology and an intimate knowledge
of the business domain.
8 1. Parallel Computing and Business Applications
The challenge of finding a business-oriented approach to parallel processing
is answered by Software Pipelines. The architecture is highly scalable and flexible.
It executes business services independent of location, and in such a way as to
maximize throughput on available computing resources, while easily meeting a
vast array of complex business application requirements.
The Solution: Software Pipelines
Imagine the ideal implementation for a business environment:
You can divide any application process or portion of a process into dis-
crete tasks or services and perform them anywhere in a given network
(local or remote), in parallel with other tasks whenever possible.You can
define the granularity of tasks to fit the specific needs of each applica-
tion; the size can range from coarse-grained (such as Web services) down
to fine-grained (such as class/method calls). In addition, the system
optimizes resource utilization of all available facilities, because it dynam-
ically shifts available resources to handle current demand.
The idea is simple, but the details are often complex, with a multitude of
potential variations and design patterns. The solution is Software Pipelines archi-
tecture, which supports the following features and capabilities:
• You can decompose business processes into specific tasks, then execute them
in parallel.
• It has virtually unlimited peer-to-peer scalability.
• It’s easier on the developer because it provides an easy method for distribut-
ing and executing tasks in parallel—on one server, or across many servers.
• It’s specifically designed for business applications, particularly those that use,
or can use, SOA.
• It handles a high volume of transactions, both large and small, and is there-
fore ideal for mixed-workload processing.
• The design gives you control of throughput and task distribution, which
means that you can maximize your computing resources.
• You can scale upward by using parallel architecture, while still guaranteeing
the order of processing—a key business requirement in many mission-
critical applications. This is a huge benefit over previous approaches.
• Because the architecture supports so many configurations and patterns, you
can create a wide variety of application designs.
The Solution: Software Pipelines 9
These features also allow you to take full advantage of today’s multi-core proces-
sors, distributing transactions within and across servers at will.
The fundamental component in Software Pipelines is the pipeline itself,
defined as follows:
An execution facility for invoking the discrete tasks of a business process
in an order-controlled manner. You can control the order by using pri-
ority, order of message input (for example, FIFO), or both.
Essentially, a pipeline is a control mechanism that receives and performs del-
egated tasks, with the option of then delegating tasks in turn to other pipelines in
the system as required. This means you can use pipelines as building blocks to
create an unlimited variety of configurations for accomplishing your specific
application objectives.
You can group multiple pipelines into fully distributed, peer-to-peer pools;
each pipeline processes a portion of an application or process. And because you
can configure each pool to run on a specific local or remote server, the system can
execute tasks anywhere on a network.
A pipeline can route tasks to other pipelines through a Pipeline Distributor,
its companion component. The Pipeline Distributor is defined as follows:
A virtual routing facility for distributing a given service request to the
appropriate pipeline (which in turn executes the request) within a pipeline
pool. The distributor is colocated with its pool of pipelines and effectively
front-ends incoming service requests.
The distributor routes service requests by evaluating message content.
Routing is based on configuration rules, which you can easily modify with-
out changing individual business services. You can route requests by using
priority, order of message input (such as FIFO), or both.
In Figure 1.2 you can see how pipelines work with distributors. Requests go
to the first distributor, which splits them off onto three pipelines. The second
pipeline delegates a request to the third pipeline, and the third pipeline sends a
request to another distributor, which in turn splits requests onto five pipelines.
By using pipeline and distributor components, you can build a fully distrib-
uted, multilevel series of interlinked pipelines—and achieve massive scalability
through parallel processing.
10 1. Parallel Computing and Business Applications
Fluid Dynamics
It’s easy to visualize Software Pipelines by comparing them to a network of
hydraulic pipelines, which transport and direct the delivery of water or oil. Such
a system has physical limitations:
• The input source delivers a particular maximum volume to downstream
resources.
• Each downstream pipeline or receptacle (including subsidiary downstream
pipelines and downstream destinations that process the delivered stream)
must accommodate the input volume, or the entire system backs up.
In other words, all channels in the system must accommodate the maximum
volume of flow. If they can’t, the flow stops or slows down, or even breaks the
system.
Figure 1.2 The Pipeline Distributor and its relationship to pipelines
Software Pipelines Example 11
The same principles apply to Software Pipelines, but it’s far easier to avoid
bottlenecks.All you have to do is move some of the processing load to other pipe-
lines. The example in the next section shows how to do this.
Software Pipelines Example
To show you how Software Pipelines work, we’ll use a banking example. A large
bank has a distributed network of ATMs, which access a centralized resource to
process account transactions. Transaction volume is highly variable, response
times are critical, and key business rules must be enforced—all of which make
the bank’s back-end application an ideal use case for parallel pipelines. We must
apply the following business requirements:
• Make sure each transaction is performed by an authorized user.
• Make sure each transaction is valid. For example, if the transaction is a with-
drawal, make sure the account has sufficient funds to handle the transaction.
• Guarantee that multiple transactions on each account are performed sequen-
tially. The bank wants to prevent any customer from overdrawing his or her
account by using near-simultaneous transactions. Therefore, FIFO order is
mandatory for withdrawal transactions.
Before we cover pipeline design, let’s take a look at the traditional design for
a monolithic, tightly coupled, centralized software component. You can see the
main flow for this design in Figure 1.3.
The simplicity of this design has several benefits:
• It’s very easy to implement.
• All business rules are in a single set of code.
• Sequence of transactions is guaranteed.
However, this design forces every user transaction to wait for any previous
transactions to complete. If the volume of transactions shoots up (as it does in
peak periods) and the input flow outstrips the load capacity of this single com-
ponent, a lot of customers end up waiting for their transactions to process. All
too often, waiting customers mean lost customers—an intolerable condition for
a successful bank.
To use Software Pipelines to solve this problem, we’ll do a pipeline analysis.
The first step is to divide the process into logical units of parallel work. We’ll start
by decomposing the steps required for processing. Figure 1.4 shows the steps of
the ATM process.
12 1. Parallel Computing and Business Applications
The steps are
• Authenticate the user (customer).
• Ensure the transaction is valid. For example, if the transaction is a with-
drawal, make sure the account has sufficient funds to handle the transaction.
• Process the transaction and update the ATM daily record for the account.
Now that we understand the steps of the business process, we can identify
the pipelines we’ll use for parallel processing. To do this, we determine which
portions of the business process can execute in parallel.
For the initial ATM design (Figure 1.5), it seems safe to authenticate users in
a separate pipeline. This task performs its work in a separate system, and after it
Figure 1.3 Traditional design for an ATM application
Figure 1.4 Steps in the ATM process
Other documents randomly have
different content
itself under a totally different aspect; its origin ceased to be of the
earth; the prince was not the representative of the public
sovereignty, but the image of God, the delegate and representative
of Heaven. Power came down to him from on high, whilst in the
imperial royalty it had come up from below. These two positions
were quite distinct, and had analogous results. The rights of liberty
and political guarantees were difficult to combine with the principle
of religious royalty; but the principle itself was elevated, moral, and
salutary. Let us see the idea formed of the prince in the seventh
century, amid the system of religious royalty. I take it from the
canons of the council of Toledo.
'The king is called king (rex) because he governs justly (recte).
If he acts with justice (recte), he possesses legitimately the
name of king; if he acts with injustice, he perishes miserably.
Therefore our fathers rightly said, "Thou wilt be king if thou
perform just actions; but if thou do not so act, king thou wilt
not be." [Footnote 12] The two principal royal virtues are justice
and truth (the science of truth, reason).
[Footnote 12: Rex ejus eris si recta facis; si autem non
facis, non eris. (The reverend fathers of Toledo have
here indulged a sort of play on the words rex and
recta.)]
'The royal power is bound, like the whole body of the people, to
pay respect to the laws. Obeying the behests of Heaven, we
give, as well to ourselves as to our subjects, wise laws, to which
our own majesty and that of our successors is bound to render
submission, as well as all the population of our kingdom.
'God, the creator of all things, in disposing the structure of the
human body, has placed the head on high, and has willed that
thence should proceed the nerves of all its members. And he
has placed in the head the torch of the eyes, in order that
thence should be discerned all things that might be noxious.
And he has there established the seat of intelligence, imposing
on it the duty of governing all the members, and discreetly
regulating their action. Therefore is it necessary, in the first
place, to make order for what concerns princes, to provide for
their safety and protect their lives, and afterwards to prescribe
what affects the people; so that by guaranteeing, as is fitting,
the safety of kings, that of the people may be at the same time
and more effectually secured.' [Footnote 13]
[Footnote 13: Forum Judicum, tit. i. 1. 2; tit. i. 1. 2. 1.
4.]
But another element besides royalty itself almost always intruded
itself into the system of religious royalty. A new power seated itself
by its side, a power more connected with God, and therefore with
the source whence the royalty emanated, than royalty itself. This
was the ecclesiastical power, which came forward to interpose
between God and kings, and between kings and people, so that
royalty, the image of the Divinity, ran the chance of sinking to a
mere instrument of human interpreters of the Divine will. Here was
a new cause of diversity in the destinies and effects of the
institution.
Such were the various orders of royalty which manifested
themselves amid the wreck of the Roman Empire in the fifth
century—namely, the barbarian royalty, the imperial royalty, and the
rising religious royalty. Their fortunes were as diverse as their
principles.
In France, under the first race, the barbarian royalty prevailed.
There were several attempts on the part of the clergy to impress
on it the imperial or the religious character; but election in the
royal family, with some mixture of hereditary right and religious
ideas, remained predominant.
In Italy, amongst the Ostrogoths, the imperial royalty overcame the
barbarian manners. Theodoric asserted himself the successor of the
emperors. The pages of Cassiodorius bear sufficient evidence to
this character of his government.
In Spain, royalty appeared more religious than elsewhere. As the
councils of Toledo were, I will not say the masters, but the
influencing power, the religious character held the sway, if not in
the government, properly so called, of the Visigoth kings, at least in
the laws with which the clergy inspired them, and the language it
caused them to hold.
In England, amongst the Saxons, the barbarian manners subsisted
almost entire. The kingdoms of the heptarchy were no more than
the domains of different bands having each its chief. Military
election was more clearly displayed there than anywhere else. The
Anglo-Saxon royalty was the most faithful type of the barbarian.
Thus, from the fifth to the seventh century, whilst the three sorts of
royalty manifested themselves in general affairs, some one
prevailed, according to circumstances, in each of the different
states of Europe.
The confusion was such at that epoch, that nothing general or
permanent could be established; and through a maze of vicissitudes
we arrive at the eighth century, without finding that royalty had
taken a definitive character in any quarter.
Towards the middle of the eighth century, upon the triumph of the
second race of Frank kings, affairs become more generalised and
capable of explication. Inasmuch as events were accomplished
upon a larger scale, their results were proportionately increased,
and they themselves more easy to be understood. We then
distinctly perceive the different royalties succeed and combine with
each other in a short space of time.
At the period that the Carlovingians supplanted the Merovingians, a
return to the barbarian royalty is visible; the system of election
reappears. Pepin got himself elected at Soissons. When the first
Carlovingians gave kingdoms to their sons, they took care to have
them accepted by the great men of the countries which they
assigned them; and whenever they made a partition, they were
anxious to have it sanctioned in national assemblies. In a word, the
elective principle, under the form of a general acceptation,
reassumed some reality. It will be borne in mind that this change of
dynasty was like a new invasion of Germans into the west of
Europe, bringing back a certain portion of their ancient institutions
and manners.
In the same period the religious principle was more unequivocally
introduced into royalty, and exercised a greater influence upon it.
Pepin was acknowledged and crowned by the Pope. He had need of
a religious sanction; it was already a tower of strength, and he
availed himself of it. Charlemagne took the same precaution; the
religious royalty was gaining development. But under Charlemagne
that character did not grow predominant, for the imperial royalty
was what he attempted to resuscitate. Although he closely allied
himself with the clergy, he made use of them, and was not their
instrument. The idea of a universal state, of one prodigious political
unity—in fact, the resurrection of the Roman Empire—was the
favourite contemplation and dream of Charlemagne.
Louis le Debonnaire (the Good-hearted) succeeded him. Every one
knows the character the royal power momentarily assumed in his
reign. He fell into the hands of the clergy, who censured, deposed,
re-established, and governed him. The subordinate religious royalty
seemed on the point of organisation.
Thus, from the middle of the eighth to the middle of the ninth
century, the variety of the three royal systems was exemplified in
considerable, connected, and palpable events.
After the death of Louis le Debonnaire, the three sorts of royalty
almost equally disappeared amid the anarchy into which Europe
was plunged; everything was jumbled together. After a certain
interval, when the feudal system prevailed, a fourth royalty
presented itself, different from all those we have hitherto
contemplated—namely, the feudal royalty. This species is very
confused and difficult to define. It has been said that the king, in
the feudal system, was the suzerain of suzerains, the chief of
chiefs; that he was held by fixed ties, through the different
degrees, to the whole society; and that in calling around him his
vassals, then the vassals of his vassals, and so on, he called the
whole nation, and showed himself truly a king. I do not deny that
this was the theory of the feudal royalty; but it was a mere theory,
which never governed facts. That general influence of the king by
means of the graduated organisation, those ties which united
royalty to the entire feudal society, exist only in the dreams of
publicists. In fact, the majority of the feudal lords were at that
epoch completely independent of royalty; many of them scarcely
knew it by name, and had no, or very trifling, relations with it. All
the sovereignties were local and separate. The name of king, borne
by one of the feudal chiefs, expressed a thing past rather than
present.
This is the state in which royalty presented itself in the course of
the tenth and eleventh centuries. In the twelfth, in the reign of
Louis the Fat, things began to change in aspect; the name of the
king was more frequently invoked, his influence penetrated into
places to which it had previously never approached, and in fact his
part in society became decidedly more active. Yet we do not find
that this increased sway was owing to any one of the titles by
which royalty had been accustomed to make good its claims. It was
not as inheritor of the emperors, or under colour of the imperial
royalty, that it waxed in strength, and settled into a firmer
consistence. Neither was it by virtue of election, or as an
emanation of the Divine power; every appearance of an elective
nature had vanished, and the principle of hereditary succession to
the throne definitively established; and although religion sanctioned
the accession of kings, the minds of men were not at all awed by
any religious character in the royalty of Louis the Fat. A new
element or character, hitherto unknown, came forth in royalty at
that period. A new royalty commenced.
It is scarcely necessary to observe that society was at that epoch in
a state of deplorable disorder, and a prey to continual violence.
Society had in itself no means of successfully grappling with this
shocking condition, or of regaining any regularity or unity. The
feudal institutions, those baronial parliaments and seignorial courts,
all those forms under which feudalism has been portrayed in
modern times, as a systematic and well-ordered regime, were
absolutely null and powerless, possessing nothing which could at all
conduce to the re-establishment of order and justice; so that, in
the midst of this social desolation, none knew to whom recourse
might be had to get reparation for wrong, or to apply a remedy to
crying evils—in a word, to constitute a state to however small an
extent. The name of king still remained, borne by one of the chiefs;
some addressed themselves to him. The various titles by which
royalty had previously been recommended were not quite
eradicated from all minds, although they had long ceased to
exercise any great sway; yet on some occasions they were
adduced. It often happened that recourse was had to the king to
repress some scandalous course of violence, or to establish some
degree of order, in a locality approximate to his own residence, or
to terminate a long-standing dispute, so that he was called upon to
interfere in affairs that were not strictly his own; and in these
interventions he came forward as the protector of public order, as
an arbiter, and as a redresser of wrongs. The moral authority which
still lingered around his name gradually drew to him this power.
Such was the character that royalty began to assume under Louis
the Fat, and under the administration of Suger. Then, for the first
time, we perceive arising in the minds of men an idea, although
still imperfect, confused, and feeble, of a public power superior to
the local powers which had possession of society, invested with
authority to render justice to those who could not obtain it by
ordinary means, and capable of establishing, or at least of
commanding, order; the idea of a great magistracy, whose essential
province was to maintain peace, to protect the weak, and to decide
differences which none other could terminate. This was the
perfectly new character under which royalty presented itself in
Europe, and especially France, dating from the twelfth century. It
was not in the light either of a barbarian, religious, or imperial
royalty, that it exercised its empire; the power it possessed was
very limited, imperfect, and occasional; the power, in some degree
(I know not any expression more exact), of a great justice of the
peace for the whole country.
This is the veritable origin of modern royalty, its vital principle, so
to speak; that which has been developed in the course of its career,
and which, I do not hesitate to affirm, has been the cause of its
prosperity. In the different eras of history we perceive the various
characters of royalty, the distinct orders that I have described,
endeavouring by turns to reassume preponderance. Thus the clergy
have always preached up the religious royalty; jurisconsults have
laboured to resuscitate the imperial royalty; and the nobles have
sometimes been inclined to renew the elective royalty, or to assert
its feudal character. And not only have the clergy, the publicists,
and the nobility, striven to make predominant in royalty such or
such a character, but it has itself rendered them all subservient to
the aggrandisement of its power. Kings have asserted themselves
sometimes the delegates of the Almighty, sometimes the successors
of the emperors, or the first nobles of the land, according to the
exigency or the whim of the moment; they have illegitimately
availed themselves of these different titles, but not one of them has
been the true title of modern royalty, or the source of its
preponderating influence. It is, I once again assert, as the
depositary and protector of the public order, of general justice, and
of the common interests—under the features of a great magistracy,
the centre and nucleus of society—that it has exhibited itself to the
eyes of nations, and has monopolised their force by obtaining their
adhesion.
As we proceed onwards, we shall see this character of modern
European royalty, which commenced with the reign of Louis the Fat
in the twelfth century, gain strength, develop itself, and finally
become, so to speak, its political physiognomy. It is through it that
royalty has contributed to the great result which characterises
European societies, the reduction of all the social elements to two—
the government and the nation.
Thus, then, Europe, after the termination of the crusades, entered
upon the track which was to lead it to its actual state, and we have
now seen that royalty took its appropriate part in that great
transition. We shall next survey the different attempts at political
organisation that were made, from the twelfth to the sixteenth
century, with the object of maintaining, by rendering it more
regular, the order of things then in vogue, but ready to crumble.
We shall inquire into the efforts of feudalism, the church, and even
the boroughs, to constitute society after its ancient principles, and
under its primitive forms, and thus defend themselves against the
general metamorphosis which was in preparation.
Lecture X.
Union Of Elements Of Modern Society.
I think it proper preliminarily to determine the precise object of this
lecture.
It will be recollected that one of the most striking facts in the
elements of the ancient European society is their diversity,
separation, and independence. The feudal nobility, the clergy, and
the boroughs, had each a position, laws, and manners, entirely
distinct; they were so many separate societies, each governing
itself for its own behoof, and by its individual rules and power. They
were in mutual relation and contact, but not in a veritable union,
nor did they form a nation or state, properly so called.
The fusion of all these societies into one has been accomplished;
this is distinctly, as has been seen, the distinguishing fact, the
essential character, of modern society. The old social elements have
been reduced to two—the government and the nation—that is to
say, diversity having ceased, similarity produced union. But before
this result was consummated, and indeed to avert it, numerous
efforts were tried to render it possible for all these particular
societies to live and act in common, without destroying their
diversity or independence. Their object was not to make any attack
of moment on their individual position, their privileges, or their
special nature, and yet to unite them into one single state, to form
from them the substance of a nation, and to rally them under one
and the same government.
All these attempts failed. The result which I have just mentioned,
the unity of modern society, attests their bad success. Even in
those countries of Europe where there still subsist some traces of
the ancient diversity in the social elements—in Germany, for
example, where there are yet a true feudal nobility and a true
burgher order, and in England, where a national church is in
possession of special revenues and a peculiar jurisdiction—it is clear
that this distinct existence is but a semblance and pretence, and
that these particular societies are politically confounded in the
general society, absorbed in the nation, governed by the public
recognised powers, in subjection to one system, and drawn along
in the current of the prevailing ideas and manners. Therefore, I
repeat, the separation and independence of the old social elements
have no sort of reality, even where they are formally sustained.
Nevertheless, these attempts to make them co-ordinate without
changing them, to link them to a national unity without abolishing
their variety, hold an important place in the history of Europe. They
partly fill the epoch upon which we are now engaged, that epoch
which divides primitive from modern Europe, and in which was
accomplished the metamorphosis of European society. They have,
furthermore, had a vast influence upon posterior events, upon the
manner in which the reduction of all the social elements to two,
government and nation, has been effected. It is therefore of great
consequence to investigate and thoroughly understand all the
essays at political organisation, from the twelfth to the sixteenth
century, designed to create nations and governments, without
rooting out the diversity in character of the secondary societies
placed side by side. Such is our present task.
It is a difficult and even a painful task. All these attempts at
political organisation were assuredly not conceived and framed with
good intentions; several were instigated by views of selfishness and
tyranny. More than one, however, was pure and disinterested; more
than one had really for its object the moral and social wellbeing of
mankind. The state of incohesiveness, violence, and injustice in
which society was then plunged, was disgusting to great and
elevated minds, and they were incessantly devising means to
emancipate it. Yet the very best of those noble efforts failed; all
that amount of courage, sacrifices, energy, and virtue, was utterly
thrown away. Is not this a mournful consideration? And there is
upon this point something still more painful, ground for still deeper
sadness, when we reflect that not only did these experiments for
social amelioration miscarry, but an enormous mass of errors and of
evil accompanied them. In spite of good intentions, the greater part
were absurd, and avouch a profound ignorance of what reason and
justice required, of the rights of humanity, and the conditions upon
which the social state is founded; so that not only did the men fail
in success, but they deserved their discomfiture. We have here,
therefore, the spectacle both of the hard fate of humanity, and of
its weakness. And we have also placed in striking light how the
smallest portion of truth suffices so completely to dazzle the
greatest minds, that they lose sight of all the rest, and become
blind to what is not comprised within the narrow scope of their
ideas; and so that there be a particle of justice in their cause, to
what extent men may overlook all the injustice which that cause
involves and sanctions. The contemplation of such a display of the
faults and imperfection of human nature is, in my opinion, still
more sad than the evil of its condition, for its errors are more
afflictive to me than its sufferings. The efforts of which I have to
speak will present us with both spectacles. It behoves us, however,
to encounter them, and at the same time to be just towards those
men and those times that have so often mistaken the right course,
and been so signally worsted, but have nevertheless displayed
many great virtues, made many noble struggles, and have merited
well of fame.
The attempts at political organisation formed between the twelfth
and sixteenth centuries were of two sorts. The first, those that had
for their object the giving predominance to some one of the social
elements, making all the others subordinate to it, and producing
unity at that sacrifice; the clergy, the feudal nobility, and the
boroughs, each in turn attempted this. The next, those that were
designed to make all the particular societies harmonise and act
together, leaving to each its independence, and securing to it an
adequate share of influence.
The first description of efforts is, much more than the second, open
to the suspicion of selfishness and tyranny. They were, in fact,
more frequently tainted with those vices; indeed, from their very
nature, they were essentially tyrannical in their modes of action.
Some of them, nevertheless, might be, and in truth were,
conceived in the pure spirit of promoting the good and the
advancement of humanity.
The first which offers itself to our notice was the attempt at
theocratic organisation—that is to say, the design of subjecting the
different societies to the principles and empire of the ecclesiastical
society.
What I said upon the history of the church will be recollected. I
there endeavoured to demonstrate what principles had gained
development within its own pale, what share of legitimacy each of
those principles possessed, how naturally they flowed from the
course of events, and what services they rendered, and what evil
they perpetrated. I there characterised also the different states
through which the church had passed from the eighth to the
twelfth century, under its various aspects, as the imperial, the
barbarian, the feudal, and finally the theocratic church. Those
circumstances must be borne in mind whilst I am on the topic of
what the clergy did to monopolise power in Europe, and the causes
of their miscarriage.
The theocratic organisation was very early attempted, as is evinced
both in the acts of the court of Rome and in those of the general
body of the clergy. It resulted naturally from the political and moral
superiority of the church; but from the commencement of its
efforts, it encountered obstacles which it never succeeded in
breaking through, even in its greatest vigour.
The principal opposition arose from the nature of Christianity itself.
Very different from the majority of religious creeds, Christianity was
established by persuasion alone, simply by moral influences. From
its earliest stages it was never armed with force; it prevailed in the
first ages by the Word alone, and it prevailed only over minds.
Hence it happened that even after its triumph, when the church
was in possession of great wealth and consideration, it never found
itself invested with the direct government of society. The purely
moral origin of the church, and the merely persuasive character of
its action, pervaded its condition at all times. It had considerable
influence, but did not wield power. It insinuated itself into the
municipal magistracies, and exercised great sway over the
emperors and all their agents; but the actual administration of
public affairs, the government, properly so called, was never
possessed by the church. Now, a system of government, theocracy
or any other, cannot be established in an indirect manner, or by
means of mere influence; it must perform the functions of judge,
administrator, and commander, gather taxes, disburse revenues; in
a word, govern and take positive possession of society. When
action is limited to persuasion, much certainly may be effected, and
great control exercised, both over nations and governments; but a
system of rule or political supremacy is not thereby founded, nor
future stability sufficiently provided for. This was the position of the
Christian church on account of its very origin; it was always on a
level with the actual government of society, but it never could
thrust it aside and take its place. This great obstacle to its attempts
at theocratic organisation it never was able to surmount.
Very early in its career, also, the church encountered a second.
When the Roman Empire fell, and the barbarian states were
founded, the church was composed of the vanquished race. Its first
object was to emerge from this position by converting the
conquerors, and thus raising itself to their rank. When this labour
was accomplished, and when the church aspired to dominion, it
encountered the disdain and resistance of the feudal nobility. This
was a prodigious service which lay-feudalism rendered to Europe.
In the eleventh century, the people were almost completely
subjugated by the church, and the sovereigns were scarcely able to
stand up against it. The feudal nobility alone scorned the yoke of
the clergy, and refused to bow before them. It is sufficient to recall
the general features of the middle age, to be convinced of the
singular mixture of pride and submissiveness, of blind belief and
freedom of spirit, that prevailed in the relations of the lay lords with
the priests. In this we discern some remnants of their relative
primitive situation. It will recur to the mind of the reader that I
have previously endeavoured to describe the origin of feudalism, its
first elements, and the manner in which the earliest feudal society
was formed around the abode of the fief-holder. I then remarked
upon the fact of the priest being at that period under the lord. Now
there always remained in the minds of the feudal nobility a
remembrance or fueling of that position, and they always regarded
themselves not only as independent of the church, but as superior
to it, and as alone entitled to possess and actually govern the
country. They were always disposed to live on good terms with the
church, but not to abandon their own claims, or give in to those set
up by it. Thus, during many ages, it was the lay aristocracy which
maintained the independence of society with regard to the church;
it proudly defended itself, when monarchs and people were tamely
crouching. It was the first to enter an opposition, and it contributed
more perhaps than any other force to render the attempt to give
society a theocratic organisation abortive.
A third obstacle stood equally opposed to it, one upon which, in
general, very little stress has been laid, and even its effects
erroneously judged.
Wherever a body of priests has seized upon society, and subjected
it to a theocratical organisation, we find that this empire has
devolved upon a married clergy, recruiting itself within its own
folds, and rearing children from their infancy in, and for, the same
profession. Look at Asia and Egypt: all the great theocracies were
the work of a clergy forming of itself a complete society, sufficing
for all its own purposes, and dependent for nothing from without.
The Christian clergy were placed in a totally different situation,
owing to the celibacy of the priests. In order to perpetuate their
own body, they were obliged to have perpetual recourse to the lay
society, and to seek their means of durability from out all the social
positions and callings. Doubtless great pains were taken to
assimilate these foreign elements, by infusing into them the spirit
of the institution, but not with full success: something of the origin
of the new-comers always remained: whether burghers or nobles,
they invariably preserved some trace of their ancient spirit and
primitive condition. There is no question but that this celibacy, by
giving to the Catholic clergy a situation altogether peculiar, and
divested of participation with the interests and general life of
mankind, was a powerful promoter of their isolation; but it has also
forced them into constant and close connection with the lay society,
to recruit and renew their members, and thus exposed them to
receive and undergo some portion of the moral revolutions which
were accomplished in that society. Therefore I do not hesitate to
aver that this ever-recurring necessity has infinitely more impeded
the success of the attempt at theocratical organisation, than the
spirit engendered by the institution, and strongly maintained by
celibacy, has been able to promote it.
The church finally encountered, within its own bosom, powerful
adversaries to its attempt. The unity of the church is a thing
perpetually talked of, and it is true enough that it has diligently
laboured to attain it, and has done so in certain respects. But let us
not be led away by imposing words, or a few partial facts. What
society has been torn by more civil dissensions, or suffered more
disruptions, than the clerical? What nation has been more divided,
broken up, or varied, than the ecclesiastical nation? The national
churches, in the majority of the countries of Europe, have been in
almost constant strife with the court of Rome; councils have risen
against popes; heresies have been innumerable and
inextinguishable; and schisms have incessantly prevailed: nowhere
has there been so much diversity in opinion, so much bitterness
and fury in contest, or so much splitting up of power. The internal
existence of the church, the dissensions which have broken loose
within it, and the revolutions which have shaken it, have been
perhaps the greatest obstacle to the triumph of that theocratical
organisation which it has striven to impose on society.
All these impediments were in action, and are discernible from the
fifth century, at the very commencement of the great attempt
which now occupies our attention. They did not, however, prevent
it continuing its course, or being in progress for several centuries.
Its most glorious moment, its critical day, so to speak, was the
reign of Gregory VII., at the end of the eleventh century. It has
been already remarked that the predominant idea of Gregory VII.
was to subject the world to the clergy, and the clergy to the Papacy
—Europe to one vast and regular theocracy. In working out this
design, that great man committed, in my opinion, as far as it is
permitted us to judge at such a distance from the events, two
capital faults, the one in his speculative, the other in his
revolutionary character. The first consisted in pompously
proclaiming his plan, and systematically parading his principles
upon the nature and the rights of the spiritual power, and deducing
from them beforehand, as an unbending logician, the most remote
consequences. He thus menaced and attacked all the lay
sovereignties of Europe, before he had made sure of his means to
subdue them. Success in human affairs is not obtained by such a
dictatorial process, or by the sanction of a mere philosophical
argument. In the next place, Gregory fell into the common error of
revolutionists, which is, to attempt more than they can execute,
and not to take the possible as the measure and limit of their
efforts. To hasten the dominion of his ideas, he engaged in contest
with the Empire, with all sovereigns, and with the clergy
themselves. He insisted upon consequences being immediate,
scorning all regard for existing interests, haughtily proclaiming that
he would reign over all kingdoms as well as over all minds, and
thus rousing against himself not only the temporal powers, which
perceived themselves in imminent peril, but also the freethinkers,
who were beginning to come out, and already felt apprehensive of
tyranny on thought. On the whole, therefore, Gregory VII. perhaps
compromised more than he advanced the cause he was wishful to
serve.
Nevertheless, it continued to prosper during the whole course of
the twelfth, and up to the middle of the thirteenth century. This
was the period in which the church possessed its greatest power
and splendour. Yet I do not think it can be strictly said to have
made at that epoch any very great progress. To the end of the
reign of Innocent III., it had rather been parading than extending
its glory and power. It was at the moment of its greatest apparent
success that a popular reaction arose against it in a considerable
portion of Europe. In the south of France, the heresy of the
Albigenses exploded, which carried off a numerous and powerful
society. About the same period, ideas and desires of a similar
nature were broached in the north and in Flanders. A little later,
Wickliffe, in England, made a talented attack upon the power of the
church, and founded a sect which is not yet extinct. The sovereigns
were not long in entering upon the same course as the people. It
was at the commencement of the thirteenth century that the most
powerful and able monarchs of Europe, the emperors of the house
of Hohenstaufen, succumbed in their contest with the Papacy.
Before that century was over, Saint Louis, the most pious of kings,
proclaimed the independence of the temporal power, and
promulgated the first pragmatic sanction, which became the base
of all the succeeding ones. At the opening of the fourteenth
century, the quarrel between Philip the Handsome and Boniface
VIII. began to rage, whilst the king of England, Edward I., was not
more docile towards Rome. It is clear, therefore, that at this epoch
the attempt at theocratic organisation had failed, that the church
was thenceforth put upon the defensive, and had so much difficulty
in preserving what it had conquered, as to stop all further
endeavour to impose its system on Europe. Hence the true date of
the emancipation of the lay European society is from the end of the
thirteenth century; it was then that the church ceased its
pretensions to monopolise it.
For a long time previously, it had renounced that attempt in the
very sphere in which it seemed to have the best chance of success.
At the very threshold of the church, around its throne in Italy,
theocracy had been completely discomfited, and given place to a
very different system, to that attempt at democratic organisation of
which the Italian republics are the type, and which played so
distinguished a part in Europe from the eleventh to the sixteenth
century.
What I have already stated upon the history of the boroughs, and
the manner in which they were formed, will be recollected. Their
establishment was more precocious and powerful in Italy than
anywhere else; the towns there were much more numerous and
wealthy than in Gaul, Britain, or Spain, and the Roman municipal
system had remained there in greater force and regularity. The
districts of Italy, besides, were much less suited for the habitation
of its new masters than those of the rest of Europe. They had been
all cleared, drained, and cultivated, and were no longer covered by
forests, so that the barbarians were unable to follow the exciting
hazards of the chase, or to lead a life at all analogous to that of
their old Germany. Furthermore, a part of that territory did not
belong to them. The south of Italy, the Campagna di Romagna, and
Ravenna, continued to depend upon the Greek emperors. In this
portion of the country the republican system very early gained
strength and development, favoured as it was by the distance of
the sovereign, and by the vicissitudes of almost constant war. But
in addition to the circumstance of Italy not being wholly in the
power of the barbarians, those hordes that overran it never
remained its undisturbed and definitive possessors. The Ostrogoths
were hunted down and destroyed by Belisarius and Narses. The
Lombards had little better success with regard to their kingdom:
the Franks destroyed it; and at the period of their overthrow, Pepin
and Charlemagne judged it expedient, instead of exterminating the
Lombard population, to form an alliance with the old Italian
population to keep down the recently-subdued Lombards. Therefore
the barbarians never were exclusive and tranquil masters of the
territory and society of Italy, as they were elsewhere. For this
reason, only a very feeble, thin, and scattered feudalism was
established beyond the Alps. The preponderance, instead of passing
to the inhabitants of the country districts, as had happened in Gaul,
for example, continued to adhere to the towns. When this fact
unequivocally declared itself, a considerable proportion of the fief-
holders, either of their own accord, or impelled by necessity,
forsook the country, and settled within the walls of the cities. The
barbarian nobles then became burghers. It may be easily imagined
how great was the strength and superiority which the towns of
Italy gained by this single circumstance, in comparison with the
other boroughs in Europe. What was chiefly remarkable in the
latter, as has been observed, was the inferior condition and the
timidity of their inhabitants. Those burghers, we have seen, were
like desperate freedmen, courageously but painfully struggling
against a master always at their gates. Very different was the lot of
the Italian burghers; the conquering and the conquered populations
were mingled together within the same walls; they had no
neighbouring master to defend themselves against; and the
majority of the citizens were men free from all time, who asserted
their independence and their rights against distant and foreign
sovereigns, sometimes against the Frank kings, and sometimes
against the emperors of Germany. From these causes sprang the
great and precocious superiority of the Italian towns; and whilst
miserable boroughs were formed elsewhere with much difficulty,
they at once emerged into important republics and states.
Thus the success of the attempt at republican organisation in this
part of Europe is explained. It early swamped the feudal element,
and became the predominant form of the society. But it was little
calculated to extend, or be perpetuated, for it contained but very
few seeds of amelioration, a condition necessary to extension and
durability.
When we contemplate the history of the Italian republics from the
eleventh to the fifteenth century, we are struck with two facts
apparently contradictory, and yet incontestable. We perceive an
admirable development of courage, activity, and genius, and, as its
consequence, great prosperity. A movement and a liberty were
there in operation, which were utterly wanting to the rest of
Europe. Now, let us ask, what was the real lot of the inhabitants,
how were their lives passed, and what was their share of
happiness? In this respect the aspect of things is instantly changed.
No history, perhaps, is more mournful and gloomy, nor has there
ever been an epoch, or a country, in which the destiny of man
appears to have been more beset with alarms and disorder, more
liable to deplorable hazards, or more afflicted by dissensions,
crimes, and calamities. At the same time, there is another fact
equally striking. In the political system of the major part of those
republics liberty was always diminishing. The deficiency of security
was such, that the community was driven to seek for refuge in
some system less boisterous and popular than that with which the
state commenced. Take the history of Florence, Venice, Genoa,
Milan, or Pisa; it is everywhere clear that the general course of
events, instead of developing liberty, and enlarging the circle of the
institutions, tended to coop up and concentrate power in the hands
of a decreasing number of men. In a word, two things were
wanting in those republics, so energetic, brilliant, and wealthy, in
their outward aspect—namely, security for life, the first condition of
the social state, and progressive action in the institutions.
Thence sprang a new evil, which served as an effectual barrier to
the farther spread of the attempt at republican organisation. It
brought down interference from without, and thenceforth the
greatest danger incurred by Italy arose from foreign sovereigns. Yet
this peril never succeeded in reconciling the different republics, and
making them act in common. Thus several of the most enlightened
and patriotic Italians of the present time, deplore the republican
system of Italy in the middle ages as the true cause of hindrance
to its becoming a nation. It was parcelled out, say they, into a
multitude of petty states, so bent on the gratification of their
several momentary designs, as to be incapable of confederating
together and constituting a united people. It is to them a subject of
regret that their country has not passed, like the rest of Europe,
through a despotic centralisation, which would have formed it into
one nation, and rendered it independent of the stranger. It
therefore appears that the republican organisation, even in the
most favourable circumstances, did not contain at that era the
principle of advancement, of durability, or of extension, and that it
was deficient in what regarded futurity. The organisation of Italy in
the middle ages may be compared to a certain extent with that of
ancient Greece. Greece was likewise a country strewed with small
republics, always rivals, often enemies, and occasionally uniting in a
common object. The advantage of the comparison rests entirely
with Greece. There was undoubtedly much more order, security,
and justice in the interior of Athens, Sparta, or Thebes, although
history presents us with many instances of iniquity, than in the
republics of Italy. Yet we see how short was the political existence
of Greece, and how surely weakness followed its minute
subdivisions of territory and power. Whenever Greece came in
contact with powerful neighbours—Macedonia and Rome, for
instance—she yielded at once. Those small republics, so glorious,
and still so flourishing, were unable to coalesce for a common
resistance. How much more, then, was the same result sure to
happen in Italy, where society and intellect were far less developed,
and infinitely weaker, than amongst the Greeks!
If the attempt at republican organisation had so few chances of
stability in Italy, where it had originally triumphed, and where the
feudal system had been vanquished, it may be readily conceived
that in other parts of Europe it was destined to meet a yet more
speedy overthrow.
I will take a rapid glance at its fate in various places.
There was a portion of Europe which greatly resembled Italy;
namely, the south of France, and the provinces of Spain adjoining it
—Catalonia, Navarre, and Biscay. The towns had there likewise
gained considerable development, importance, and wealth. Several
petty feudal chiefs had allied themselves with the burghers, and a
part of the clergy had also embraced their cause, so that the
country was actually in a situation very analogous to that of Italy.
We therefore find that in the course of the eleventh, and at the
commencement of the twelfth century, the towns of Provence,
Languedoc, and Aquitaine were disposed to try a political essay,
and form themselves into independent republics, upon the model of
those beyond the Alps. But the south of France was in contact with
a very powerful feudalism, predominant in the north. And upon the
occasion of the heresy of the Albigenses, war broke out between
feudal and municipal France. The history of the crusade against the
Albigenses, commanded by Simon do Montfort, is well known. It
was an attack by northern feudalism upon the southern attempt at
democratic organisation. In spite of the heroism of southern
patriotism, the north carried the victory. It was promoted by the
want of political unity, and civilisation was not sufficiently advanced
for men to be aware that the deficiency might be remedied by
skilful concert. The experiment at republican organisation was
therefore put down, and a crusade re-established the feudal system
in the south of France.
At a later date, the republican movement succeeded better on the
mountains of Switzerland. There the theatre was very contracted,
and it had to struggle only against a foreign sovereign who,
although possessing superior strength to the Swiss, was not one of
the most formidable monarchs of Europe. The contest was
maintained with infinite courage. The Swiss feudal nobility also
joined in a great measure with the towns; bringing certainly
powerful aid, but altering the nature of the revolution which they
supported, and imparting to it a more aristocratical and stationary
character than it seemed destined to bear. [Footnote 14]
[Footnote 14: M. Guizot has allowed himself to be
carried away by his speculative deduction from history in
this description of the early attempts of the Swiss to
establish their independence. The movement began in
the most rural part of Switzerland, in the three forest
cantons of Schweiz, Uri, and Underwalden, and not in
towns, and was almost throughout conducted by
peasants. It was only in a portion of Switzerland that
feudalism prevailed. Besides, the Swiss cantons are only
partially aristocratic—See Muller's Hist. de la Suisse.]
I pass to the north of France, to the boroughs of Flanders, to those
on the banks of the Rhine, and to the Hanseatic League. There the
democratic organisation completely triumphed within the walls of
the town; but we can discern from its commencement that it was
not destined to extend or to take possession of all society. The
boroughs of the north were surrounded and hemmed in by
feudalism, by chiefs and sovereigns, so that they were constantly
put upon the defensive. They were not calculated to make
conquests; their great object was to protect themselves. In this
they succeeded; they maintained their privileges, but they were
confined to their own precincts. Thus the democratic organisation
was shut up and stopped; it never spread over the face of the
country.
Such, then, was the state of the republican experiment; triumphant
in Italy, but with few chances of durability and expansion;
suppressed in the south of France; victorious, on a small stage, in
the Swiss mountains; and restricted to the walls of the towns in the
north, in Flanders, on the Rhine, and in the Hanseatic League.
Nevertheless, whilst in this state, so palpably inferior in strength to
the other elements of society, it inspired the feudal nobility with
prodigious alarm. The barons were not only envious of the wealth
of the boroughs, but they were afraid of their power; the
democratic spirit penetrated into the rural districts, and
insurrections among the peasants became more frequent and
stubborn. Hence a great coalition was formed by the feudal nobility,
throughout almost all Europe, against the boroughs. The contest
was not at all equal, for the boroughs were isolated, and had no
understanding or intercourse amongst themselves. Doubtless there
existed a certain sympathy between the burghers of different
countries; the successes or the reverses of the Flemish towns, at
war with the Dukes of Burgundy, excited a lively sensation in the
French towns, but it was an emotion transitory, and without result;
no veritable bond or union was established amongst the different
boroughs, nor did they lend any strength to each other. Feudalism,
therefore, had an immense advantage over them; but it was itself
divided and irreflective, and was far from succeeding in destroying
them. When the contest had lasted a certain time, and it had
become clear that a complete victory was impossible, there arose a
necessity for consenting to recognise these small burgher republics,
to negotiate with them, and to receive them as members of the
state. Then commenced a new order of things, and a new attempt
at political organisation—to wit, the attempt at a mixed
organisation, which had for its object the reconciling the different
elements of society, the feudal nobility, the boroughs, the clergy,
and the sovereigns, and, notwithstanding their mutual deep-rooted
antipathy, bringing them to live and act together. This branch of the
subject remains to be investigated.
The purposes of the states-general in France, the cortes in Spain
and Portugal, the parliament in England, and the diets in Germany,
are sufficiently well known. The elements of these different
assemblies were the feudal nobility, the clergy, and the burghers,
who collected together with the view of uniting themselves into one
single society, into one and the same state, and under an identical
law and power. This was the tendency and design of them all,
under different names.
I will take as the type of this attempt at organisation the states-
general of France, as being the most familiarly known. I say
familiarly known, and yet the name of the states-general calls up
none but vague and imperfect ideas. There is no one who can state
with any precision what was fixed or regular in the states-general
of France, what was the number of their members, what the
subjects of deliberation, or what the periods of convocation, and
the duration of their sessions. We know nothing of all these things;
it is impossible to draw from history any clear and general results
on tins subject. When we inquire into the character of these
assemblies in the history of France, they appear to have been
purely accidental, a sort of political shift, on the part of the people
as well as on that of the kings: a last shift to the kings when they
had no money, and were at their wits' ends for expedients; and a
last shift to the people, when evil became so intolerable, that the
usual remedies for alleviation were exhausted in vain. The nobility
and the clergy each took part in the states-general, but they came
there with reluctance, and distrustfully, as they were well aware
that it was not in them their best means of action lay, or that they
could thereby promote their real participation in the government.
The burghers themselves were not more eager for the sitting; it
was not a right which they exercised with alacrity, but rather a
necessity to which they submitted. We find these facts exemplified
in the character of the political actions of those assemblies. They
were sometimes perfectly insignificant, and sometimes vastly
terrible. If the king was the strongest, their humility and docility
were extreme; if the situation of the crown was disastrous, if it had
an absolute occasion for the assistance of the states, they fell into
factious opposition, and became the instruments either of some
aristocratic intrigue, or of some ambitious schemers. In a word,
they were sometimes mere assemblies of notables, and sometimes
veritable conventions. Thus their labours seldom or ever survived
them; they promised and attempted much, but did nothing. Not
one of the great measures which have really acted on society in
France, not one important reform in government, legislation, or
administration, has emanated from the states-general. We must
not, however, too rashly conclude that they have been without
utility or effect. They have served a moral purpose, which has been
generally overlooked, by operating, from time to time, as a
protestation against political servitude, and distinctly proclaiming
certain tutelary principles; such, for example, as that the country
has the right to impose taxes, to interfere in affairs, and to make
the agents of power responsible. That these maxims have never
perished in France, is chiefly owing to the states-general; and it is
certainly not a small service to render to a nation, the keeping up
in its manners, and reviving in its recollection, the name and dues
of liberty. The states-general effected that good, but they never
were a means of government, nor ever entered into a political
organisation. They never attained the object for which they were
formed—namely, the fusion into one single body of the different
societies which subdivided the country.
The cortes of Spain and Portugal present the same result. There
are, however, a thousand different attendant circumstances. The
importance of the cortes varied according to the kingdoms and the
times; in Arragon and Biscay, and amid the contests for the
succession to the crown, or the struggles against the Moors, they
were more frequently convoked, and more powerful than in other
places and periods. In certain cortes—for example, in those of
Castile in 1370 and in 1373—the nobles and the clergy were not
summoned. There is a multitude of circumstances to be taken into
account, if we were to look more narrowly into the events; but in
the generalising system, to which I am forced to restrict myself, it
is sufficient to affirm that the cortes, like the states-general of
France, were but an accident in history, and never a system, a
political organisation, or a regular means of government.
The destiny of England was different. I will not enter upon the
subject of England at any great length now, as it is my purpose to
devote a lecture specially to an inquiry into its political career. I
shall only say a few words upon the causes which imparted to it a
direction so completely different from that of the continent.
In the first place, there were no great vassals, no subjects in a
state individually to oppose royalty, in England. The barons, the
great lords, were obliged, at a very early date, to coalesce together,
in order to form a common resistance. Thus the principle of
association, and manners essentially political, prevailed in the high
aristocracy. In the next place, English feudalism, or the possessors
of small fiefs, were led be a series of events to which I cannot do
more than allude at the present moment, to unite themselves to
the burghers, and to sit with them in the House of Commons,
which thus possessed a strength far superior to that enjoyed by the
continental boroughs, a strength capable of really influencing the
government of the country. Now, in the fourteenth century, the
state of the British parliament was as follows:—The House of Lords
was the king's great council, and effectively associated with the
exercise of power; the House of Commons, composed of the
deputies of the possessors of small fiefs, and the burgesses, took
scarcely any part in the government, properly so called, but it
conduced to the establishment of rights, and energetically defended
private and local interests. The parliament, considered as a whole,
did not yet govern, but it was already a regular institution, adopted
in principle as a means of government, and in fact often
indispensable. Thus the attempt to reconcile and ally together the
different elements of society, in order to form a single political body
and veritable state, succeeded in England, whilst it miscarried on
the continent.
I will say but one word upon Germany, merely to point out the
predominant character of its history. There the attempts to promote
a general fusion, unity, and a common political organisation, were
followed up with little ardour. The various social elements remained
much more distinct and independent than in the rest of Europe. If
any proof of this were required, it will be found even in modern
times. Germany is the only country of Europe in which the feudal
election long prevailed in the creation of royalty. I do not include
Poland or the Slavonian nations, which entered at so late a period
into the system of European civilisation. Germany is likewise the
only country in Europe in which ecclesiastical sovereignties
remained, and which preserved free towns having a political and
really independent existence. It is therefore clear that the attempt
to mould into a single society the elements of the primitive
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!
ebookgate.com

More Related Content

PDF
Software Pipelines and SOA Releasing the Power of Multi Core Processing 1st E...
PDF
Full Download Software Pipelines and SOA Releasing the Power of Multi Core Pr...
PDF
fieldwork
PDF
Essay On Workplace Telecommunications
PDF
How to modernize legacy application infrastructure?
PDF
The Essentials Of Project Management
PDF
Supercharging the Cloud for an Agile Enterprise
PDF
Symphony Driver Essay
Software Pipelines and SOA Releasing the Power of Multi Core Processing 1st E...
Full Download Software Pipelines and SOA Releasing the Power of Multi Core Pr...
fieldwork
Essay On Workplace Telecommunications
How to modernize legacy application infrastructure?
The Essentials Of Project Management
Supercharging the Cloud for an Agile Enterprise
Symphony Driver Essay

Similar to Software Pipelines and SOA Releasing the Power of Multi Core Processing 1st Edition Cory Isaacson (20)

PPTX
Azure Biz
PPTX
Polysynthetic Data Center Vision v1.2
PDF
Microservices Architecture for e-Commerce
PPTX
Shrinking the Custom Application Development Cycle with Low-Code Platforms
PDF
Build Agile Business Processes With Power Apps in Modern Workplace
PDF
How to Transform Corporate IT into the Driver for Digital Transformation
PDF
Encanvas executive Briefing 2017
PDF
Introduction to CAAD Codeless Applications Development Methodology
PDF
The Benefits Of Software Creation
PDF
Web Application Architecture: A Comprehensive Guide for Success in 2023
PDF
The next-generation data center
PDF
New Frontiers In Information And Software As Services Service And Application...
PDF
A Comprehensive Guide to Web Application Architecture
DOCX
Service oriented cloud computing
PDF
NZS-2990 Made with IBM - Mobile-ready Systems of Record
PDF
whitepaper_workday_technology_platform_devt_process
DOCX
A research on- Sales force Project- documentation
PDF
Bringing Your Web Apps to IBM Digital Experience
PPT
Aralanet Ict Briefing V11
PDF
Enterprise Integration Patterns Revisited (EIP) for the Era of Big Data, Inte...
Azure Biz
Polysynthetic Data Center Vision v1.2
Microservices Architecture for e-Commerce
Shrinking the Custom Application Development Cycle with Low-Code Platforms
Build Agile Business Processes With Power Apps in Modern Workplace
How to Transform Corporate IT into the Driver for Digital Transformation
Encanvas executive Briefing 2017
Introduction to CAAD Codeless Applications Development Methodology
The Benefits Of Software Creation
Web Application Architecture: A Comprehensive Guide for Success in 2023
The next-generation data center
New Frontiers In Information And Software As Services Service And Application...
A Comprehensive Guide to Web Application Architecture
Service oriented cloud computing
NZS-2990 Made with IBM - Mobile-ready Systems of Record
whitepaper_workday_technology_platform_devt_process
A research on- Sales force Project- documentation
Bringing Your Web Apps to IBM Digital Experience
Aralanet Ict Briefing V11
Enterprise Integration Patterns Revisited (EIP) for the Era of Big Data, Inte...
Ad

Recently uploaded (20)

PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Presentation on HIE in infants and its manifestations
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
O7-L3 Supply Chain Operations - ICLT Program
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Pharma ospi slides which help in ospi learning
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Cell Types and Its function , kingdom of life
Microbial disease of the cardiovascular and lymphatic systems
Abdominal Access Techniques with Prof. Dr. R K Mishra
Anesthesia in Laparoscopic Surgery in India
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Presentation on HIE in infants and its manifestations
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
2.FourierTransform-ShortQuestionswithAnswers.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Microbial diseases, their pathogenesis and prophylaxis
O7-L3 Supply Chain Operations - ICLT Program
Ad

Software Pipelines and SOA Releasing the Power of Multi Core Processing 1st Edition Cory Isaacson

  • 1. Software Pipelines and SOA Releasing the Power of Multi Core Processing 1st Edition Cory Isaacson pdf download https://ebookgate.com/product/software-pipelines-and-soa- releasing-the-power-of-multi-core-processing-1st-edition-cory- isaacson/ Get Instant Ebook Downloads – Browse at https://ebookgate.com
  • 2. Instant digital products (PDF, ePub, MOBI) available Download now and explore formats that suit you... Software Development for Embedded Multi core Systems A Practical Guide Using Embedded Intel Architecture 1st Edition Max Domeika https://ebookgate.com/product/software-development-for-embedded-multi- core-systems-a-practical-guide-using-embedded-intel-architecture-1st- edition-max-domeika/ ebookgate.com Microprocessor 4 Core Concepts Software Aspects 1st Edition Philippe Darche https://ebookgate.com/product/microprocessor-4-core-concepts-software- aspects-1st-edition-philippe-darche/ ebookgate.com Networks on Chips Theory and Practice Embedded Multi Core Systems 1st Edition Fayez Gebali https://ebookgate.com/product/networks-on-chips-theory-and-practice- embedded-multi-core-systems-1st-edition-fayez-gebali/ ebookgate.com Bioinformatics High Performance Parallel Computer Architectures Embedded Multi Core Systems 1st Edition Bertil Schmidt https://ebookgate.com/product/bioinformatics-high-performance- parallel-computer-architectures-embedded-multi-core-systems-1st- edition-bertil-schmidt/ ebookgate.com
  • 3. Releasing Your Potential Expanded Edition Myles Munroe https://ebookgate.com/product/releasing-your-potential-expanded- edition-myles-munroe/ ebookgate.com Little Brother First Edition Cory Doctorow https://ebookgate.com/product/little-brother-first-edition-cory- doctorow/ ebookgate.com Node js Recipes 1st Edition Cory Gackenheimer (Auth.) https://ebookgate.com/product/node-js-recipes-1st-edition-cory- gackenheimer-auth/ ebookgate.com SOA Principles of Service Design 1st Edition Thomas Erl https://ebookgate.com/product/soa-principles-of-service-design-1st- edition-thomas-erl/ ebookgate.com Communication and Control in Electric Power Systems Applications of Parallel and Distributed Processing IEEE Press Series on Power Engineering 1st Edition Mohammad Shahidehpour https://ebookgate.com/product/communication-and-control-in-electric- power-systems-applications-of-parallel-and-distributed-processing- ieee-press-series-on-power-engineering-1st-edition-mohammad- shahidehpour/ ebookgate.com
  • 6. Praise for Software Pipelines and SOA “Software Pipelines uncovers a new and unique way of software design for high-performance development. Where other methodologies and frameworks have previously been describing the problem, Software Pipelines is focusing on the solution. Simply put, Software Pipelines addresses the developer’s needs for parallel computing and uncovers the throughput offered by multi-core processors.” —Filip Hanik, Senior Software Engineer, SpringSource, Inc. “There are some books that tout vision but provide no pragmatic, hands-on details. Software Pipelines and SOA offers a dose of both. Isaacson is an authority and practitioner, who under- stands that the promise of SOA is not fulfilled simply by embracing an architectural style of loosely coupled, network-based services but in how the applications and services that support this architectural style are developed and deployed. This book will help support a pragmatic approach to SOA.” —Dan Malks,Vice President, Partner Engineering, JackBe “. . . it provides insights on how to efficiently realize scalability on and across multi-core machines in a predictable manner using patterns derived from the best practices in distributed computing and SOA. Written in a conversational manner, one of the pioneering technology leaders of our time provides keen insights on how to build scalable software solutions.” —Ravi Palepu, SOA Consultant and Founder of PREDICT “Software Pipelines paves the road in distributed, SOA, high-performance computing in the- ory and practice with strong technical background, elegant architecture, and a usable imple- mentation. A revolution in grid computing and service-oriented architecture.” —Nicole Nemer, Ph.D., Superior Consulting “Multi-core computing offers a unique opportunity to deliver dramatic scalability in modern business applications; but the task is not an easy one, presenting significant challenges to the software developer. Software Pipelines provides an easy-to-implement, concrete strategy that enables service-oriented applications to really deliver on the promise of this new hardware paradigm. A must read for any developer or architect stepping up to the challenge of high- performance business transaction processing.” —Henry Truong, Chief Technology Officer, TeleTech, Inc.
  • 7. “Isaacson offers a fresh approach to componentize and parallelize software applications in a way that is easy to debug and easy to maintain. Using the high-level abstraction of Software Pipelines, development managers need not worry about the complexities of concurrent pro- gramming or the challenges in dealing with maintaining threads, interprocess communication or deadlocks. Any software architect dealing with performance and scalability issues with complex transactional flows must consider the Software Pipelines design paradigm.” —Venkat Pula, Field Application Engineer, Telelogic, an IBM Company “Cory has captured the power of simplicity, enabling business software applications to expo- nentially leverage the capacity and capabilities of today’s advanced chip architectures. Using Software Pipelines, corporate IT groups are able to manage, control and fully utilize the power of multi-core computing to improve scalability and reduce long-term costs.” —Jim Hogan, Cognify,Vice President, Managed Services “Having projects architected to gracefully scale from a single multi-core box all the way to a cluster of thousands of machines is the new reality. With Software Pipelines, the development organization can easily architect every project—from the summer intern’s toy prototype to your flagship technology—as though it might need to scale for worldwide consumption. Embrace this change now and the day you need that scalability will be your biggest success. Ignore it and it will likely be your greatest failure.” —Jackson Gibbs, CTO, Strands
  • 9. Addison-Wesley Information Technology Series Capers Jones and David S. Linthicum, Consulting Editors The information technology (IT) industry is in the public eye now more than ever before because of a number of major issues in which software technology and national policies are closely related. As the use of software expands, there is a continuing need for business and software professionals to stay current with the state of the art in software methodologies and technologies. The goal of the Addison-Wesley Information Technology Series is to cover any and all topics that affect the IT community. These books illustrate and explore how information technology can be aligned with business practices to achieve business goals and support business imperatives. Addison-Wesley has created this innovative series to empower you with the benefits of the industry experts’ experience. For more information point your browser to www.awprofessional.com/itseries Sid Adelman, Larissa Terpeluk Moss, Data Warehouse Project Management. ISBN: 0-201-61635-1 Sid Adelman et al., Impossible Data Warehouse Situations: Solutions from the Experts. ISBN: 0-201-76033-9 David Leon Clark, Enterprise Security: The Manager's Defense Guide. ISBN: 0-201-71972-X Frank P. Coyle, XML, Web Services, and the Data Revolution. ISBN: 0-201-77641-3 Jill Dyché, The CRM Handbook: A Business Guide to Customer Relationship Management. ISBN: 0-201-73062-6 Patricia L. Ferdinandi, A Requirements Pattern: Succeeding in the Internet Economy. ISBN: 0-201-73826-0 David Garmus and David Herron, Function Point Analysis: Measurement Practices for Successful Software Projects. ISBN: 0-201-69944-3 Beth Gold-Bernstein, William Ruh, Enterprise Integration: The Essential Guide to Integration Solutions. 0-321-22390-X John Harney, Application Service Providers (ASPs): A Manager's Guide. ISBN: 0-201-72659-9 International Function Point Users Group, IT Measurement: Practical Advice from the Experts. ISBN: 0-201-74158-X Cory Isaacson, Software Pipelines and SOA: Releasing the Power of Multi-Core Processing, ISBN: 0137137974 Capers Jones, Software Assessments, Benchmarks, and Best Practices. ISBN: 0-201-48542-7 Ravi Kalakota and Marcia Robinson, e-Business 2.0: Roadmap for Success. ISBN: 0-201-72165-1 Ravi Kalakota and Marcia Robinson, Services Blueprint: Roadmap for Execution. ISBN: 0-321-15039-2 David S. Linthicum, B2B Application Integration: e-Business-Enable Your Enterprise. ISBN: 0-201-70936-8 David S. Linthicum, Enterprise Application Integration. ISBN: 0-201-61583-5 David S. Linthicum, Next Generation Application Integration: From Simple Information to Web Services. ISBN: 0-201-84456-7 Anne Thomas Manes, Web Services: A Manager’s Guide. ISBN: 0-321-18577-3 Larissa T. Moss and Shaku Atre, Business Intelligence Roadmap: The Complete Project Lifecycle for Decision- Support Applications. ISBN: 0-201-78420-3 Bud Porter-Roth, Request for Proposal: A Guide to Effective RFP Development. ISBN: 0-201-77575-1 Ronald G. Ross, Principles of the Business Rule Approach. ISBN: 0-201-78893-4 Dan Sullivan, Proven Portals: Best Practices for Planning, Designing, and Developing Enterprise Portals. ISBN: 0-321-12520-7 Karl E. Wiegers, Peer Reviews in Software: A Practical Guide. ISBN: 0-201-73485-0 Ralph R. Young, Effective Requirements Practices. ISBN: 0-201-70912-0 Bill Zoellick, CyberRegs: A Business Guide to Web Property, Privacy, and Patents. ISBN: 0-201-72230-5
  • 10. Software Pipelines and SOA Releasing the Power of Multi-Core Processing Cory Isaacson Upper Saddle River, NJ • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sydney • Tokyo • Singapore • Mexico City
  • 11. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. Java, JDBC, J2EE, JNI, Javadoc, MySQL and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States, other countries, or both. Microsoft, Windows, Microsoft .NET Remoting, and Microsoft .NET connection software are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. IBM, iSeries, and zSeries are trademarks of International Business Machines Corporation in the United States, other countries, or both. CORBA is a registered trademark of Object Management Group, Inc. in the United States and/or other countries. Apache, log4j, JMeter, Ant, and Tomcat are trademarks of The Apache Software Foundation. dbShards is a trademarks of CodeFutures Corporation, in the United States. The Software Pipelines Reference Framework includes software developed by the Spring Framework Project (springframework.org). Spring Framework components copyright 2002–2007 by the original author or authors. The Spring Framework is licensed under the Apache License,Version 2.0 (the “License”).You may obtain a copy of the License at: apache.org/licenses/LICENSE-2.0. Other company, product, or service names mentioned may be trademarks or service marks of others. The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U.S. Corporate and Government Sales, (800) 382-3419, corpsales@pearsontechgroup.com For sales outside the United States please contact: International Sales, international@pearsoned.com Visit us on the Web: informit.com/aw Library of Congress Cataloging-in-Publication Data Isaacson, Cory. Software pipelines and SOA : releasing the power of multi-core processing / Cory Isaacson.—1st ed. p. cm. Includes bibliographical references and index. ISBN 0-13-713797-4 (pbk. : alk. paper) 1. Parallel processing (Electronic computers) 2. Computer software—Development. 3. Web services. I. Title. QA76.58.I82 2008 004’.35--dc22 2008040489 Copyright © 2009 Pearson Education, Inc. All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to: Pearson Education, Inc. Rights and Contracts Department 501 Boylston Street, Suite 900 Boston, MA 02116 Fax: (617) 671-3447 ISBN-13: 978-0-13-713797-8 ISBN-10: 0-13-713797-4 Text printed in the United States on recycled paper by RR Donnelley in Crawfordsville, Indiana. First printing, December 2008
  • 12. vii Contents Foreword xv Preface xvii Acknowledgments xxi About the Author xxiii Introduction xxv Section I: Pipelines Theory 1 CHAPTER 1 Parallel Computing and Business Applications 3 Mechanical Solutions: Parallel Computing at the Operating System Level 5 Symmetric Multiprocessing 5 Clustering 5 Automated Network Routing: Parallel Computing by Predetermined Logic 6 Grid Computing: Parallel Computing by Distribution 6 Parallel Computing for Business Applications 7 The Solution: Software Pipelines 8 Fluid Dynamics 10 Software Pipelines Example 11 Summary 16 CHAPTER 2 Pipelines Law 17 The Problem of Wasted CPU Power 17 Fluid Dynamics 18 Pipelines Law: The Basic Rule 19 Corollary 1: Limitations on the Flow 20 Corollary 2: Restrictions on the Output Flow 21 Software Pipelines Rules 22 Rule 1 22 Rule 2 23 Rule 3 26 Summary 30
  • 13. viii Contents CHAPTER 3 Pipelines Examples 31 Bank ATM System (Single-Tier Distribution) 31 Pipelines 32 Pipeline Distributor 33 Bank ATM System (Multi-Tier Distribution) 35 Secondary Pipeline Tier 36 Primary Pipeline Tier 41 Summary 43 CHAPTER 4 Pipelines Patterns 45 Service Invocation Patterns 47 Push Pattern 47 Pull Pattern 47 Message Exchange Patterns 49 One-Way Pattern 49 Request-Response Pattern 49 Pipeline Routing Patterns 51 Round-Robin Routing Pattern 52 Content-Based Routing Pattern 53 Custom Routing Pattern 54 Join Pattern 55 Distributor Patterns 55 Single Distributor Pattern 56 Multi-Tier Distributor Pattern 56 Client Distributor Pattern 58 Database Sharding Distributor Pattern 58 Distributor Connector Patterns 60 Local Method Invocation Pattern 61 Socket Invocation Pattern 62 Web Service Invocation Pattern 62 Other Patterns 62 Summary 62 CHAPTER 5 Pipelines: The Organizational Impact 65 Strategic Evaluation 66 Budget Impact 68
  • 14. Contents ix Organizational Roles and Responsibilities 70 Pipelines Architect 71 Business Unit Sponsor 72 IT Management 73 Application Developer 74 Application Project Manager 75 Quality Assurance Manager 76 IT Operations 77 Summary 78 Section II: Pipelines Methodology 79 CHAPTER 6 Software Pipelines Optimization Cycle: Overview 81 Yet Another Software Methodology? 81 SPOC Overview 82 CHAPTER 7 The Five Steps of SPOC 85 Summary 88 CHAPTER 8 Pipelines by Example: Introducing the Pipelines Bank Corporation 89 SPOC Report Template 93 Summary 94 CHAPTER 9 SPOC Step 1: Pipelines Objectives 95 Step 1.1: Identify Business Objectives/Requirements 96 Step 1.2: Determine Input Processing Rate 102 Step 1.3: Determine Future Potential Input Processing Rate 104 Step 1.4: Measure Current Capacity 107 Step 1.5: Calculate Performance Gap 109 Step 1.6: Define Pipelines Targets 111 Summary 113
  • 15. x Contents CHAPTER 10 SPOC Step 2: Pipelines Analysis 115 Step 2.1: Map Current Process Flow 116 Step 2.2: Identify Existing Components 119 Step 2.3: Measure Processing Rate of Existing Components 121 Step 2.4: Calculate Processing Rate of Entire Flow 124 Step 2.5: Identify Restriction Points 127 Summary 129 CHAPTER 11 SPOC Step 3: Pipelines Design 131 Step 3.1: Define Service Flow Design 133 Step 3.2: Identify New Components 138 Step 3.3: Identify Pipeline Opportunities 141 Step 3.4: Define Pipelines Scheme 145 Step 3.5: Determine Distributor Rate 151 Step 3.6: Design Physical Deployment Environment 154 Step 3.7: Define/Optimize Pipelines Design 155 Pipeline the Downstream Service 156 Pipeline Services Independently 159 Pipeline the Entire Service 161 Summary 168 CHAPTER 12 SPOC Step 4: Pipelines Implementation 169 Step 4.1: Establish Software Pipelines Framework 171 Step 4.2: Modify Existing Components 173 Map Components to Service Flow 174 Evaluate Components 174 Determine How to Incorporate Components 174 Prepare Component Table 175 Develop Components 175 Step 4.3: Develop New Components 178 Step 4.4: Orchestrate Service Flows 179 Step 4.5: Instrument Service Flow 181 Step 4.6: Develop/Modify Pipeline Sets 182 Step 4.7: Test and Optimize Pipelines Implementation 190 Summary 193
  • 16. Contents xi CHAPTER 13 SPOC Step 5: Pipelines Deployment 195 Step 5.1: Plan Pipelines Deployment 196 Step 5.2: Deploy to Production Environment 197 Step 5.3: Monitor Production Environment 198 Step 5.4: Evaluate Results, Plan Next SPOC Iteration 199 Summary 201 Section III: Pipelines Examples 203 CHAPTER 14 Hello Software Pipelines 205 Define the Message 206 Build the Service 207 Configure the Distributors 209 Create the Client 212 Run the Service 215 Summary 215 CHAPTER 15 Scaling Hello Software Pipelines 217 Scale the Service 217 Develop a Scalable Test Client 219 Run the Service 223 Summary 228 CHAPTER 16 Additional Pipelines Router Configurations 229 Content-Based Router 229 Custom Pipelines Router 241 Summary 256 CHAPTER 17 Getting an Answer from Hello Software Pipelines 257 Request-Response Messaging 257 Use Request-Response with Hello Software Pipelines 261 Summary 273
  • 17. xii Contents CHAPTER 18 Additional Distributor Connector Patterns 275 Define and Configure a Connector 275 Socket Connector 278 Web Service Connector 280 Summary 282 CHAPTER 19 Using a Multi-Tier Distributor 283 Configure the Multi-Tier Distributors 284 Create the Client 289 Run the Service 292 Summary 293 CHAPTER 20 Database Sharding Distributor 295 Database Shards Example 297 Create the Database Shards 299 Build the Service 299 Configure the Distributor 303 Configure the Sharding Driver 304 Create the Client 305 Run the Service 307 Summary 309 CHAPTER 21 Pipelines Framework Overview 311 Interface Overview 311 AbstractMessage 312 PipelinesDistributor 313 PipelinesConnector 313 PipelinesRouter 313 Pipeline 314 PipelineService 314 Pipelines Instrumentor 314 Summary 322
  • 18. Contents xiii CHAPTER 22 Pipelines Bank Corporation (PBCOR) Example 323 Account Transaction 323 Pipelines Configuration 328 Spring Framework 332 Database Access 333 AuthorizeTransactionService 339 Connect Services 342 ValidateService 345 DebitTransactionService 345 Run the Test 348 Summary 349 Section IV: The Future of Software Pipelines 351 CHAPTER 23 The Future of Software Pipelines 353 Final Words of Advice 353 Ideas for the Future 354 APPENDIX Pipelines Reference Framework Javadoc 357 Index 375
  • 20. xv Foreword Multi-core hardware is the new normal. Major computer chip vendors have essentially halted the regular increase in CPU clock speeds that reigned for almost a half century in response to issues like power consumption, heat output, and unpredictability of quantum physics (to paraphrase Einstein, CPUs shouldn’t play dice …). Instead, they are using multi-core architectures to deliver increased process- ing power in place of faster clock speeds. Although this is a logical move, a large percentage of existing software applications cannot take advantage of the pro- cessing power on the additional cores, and they often run even slower due to reduced clock speeds in multi-core CPUs, setting up what could be called the Multi-core Dilemma. In general, the Multi-core Dilemma applies across the spectrum of program- ming languages—Java, C#, C++, etc. This is why major technology vendors are investing heavily in research intended to lead to the next generation of program- ming environments. But what about the software that has already been written? The reality for any software application is that to benefit from multi-core, the application must either be written to be multi-threaded, or it must be in a con- tainer that effectively makes it multi-threaded. There is no “plug-and-play” solution, but there are development tools and containers available that can help with the Multi-core Dilemma for many use cases. There are not, however, many good methodologies for solving this prob- lem. In Software Pipelines and SOA, Cory Isaacson outlines a systematic, logical approach for planning and executing the move to multi-core. This hardware trend will create a tectonic shift in the software industry as billions of lines of code are migrated, optimized, or rewritten to take advantage of multi-core hardware. Practical, logical approaches will be essential to making this transition smoothly. Now that parallel computing has moved from being an edge case to being a common requirement for enterprise software, enabling applications to run in parallel can’t be limited to only the most experienced programmers. Software Pipelines and SOA describes several techniques for bringing parallel computing to mainstream software development.
  • 21. xvi Foreword For example, one technique for making parallel computing happen through- out your development group is to separate your concurrency model from the application logic, much as you have your data and UI layer separate from the main business logic. Doing so allows feature developers to focus on the applica- tion functionality without having to worry about explicitly threading at design time. In addition, it can be an effective technique for migrating existing single- threaded applications into multi-core environments. In addition, Software Pipelines and SOA discusses the connection between ser- vice-oriented architectures and multi-core. The basic approach is to treat your application as a collection of services and deploy a container that can run multi- ple instances of those services. Using this link between SOA and multi-core, services can be a key part of your concurrency model. By separating concurrency from application logic, you can make the migration of existing applications to multi-core much simpler and enable more effective building of new parallel applications. It also makes it much easier to reconfigure (rather than recode) your applications, then continue to optimize them and move to new generations of hardware—from 2 and 4 cores to 8, 16, 32 … 128, and beyond. Designing enterprise applications in a service- oriented architecture makes it easier to separate concurrency from application logic, so that they work together. There is work involved if you have a monolithic application, but it is still sig- nificantly less than rewriting. If you plan to use a container, make sure that it can handle your business application requirements, which might include message ordering, forks and joins in the business process, human interaction, and long- running processes. Most parallel computing approaches use traditional multi-threaded pro- gramming, a “thread-level” approach. Software Pipelines and SOA describes a “ser- vice-level” approach that can provide a way to move to multi-core that requires less effort and is more configurable. It complements, rather than replaces, the traditional thread-level approaches. Moving your existing applications to multi-core takes some planning, but it might not be as much work as you think. Design a solid concurrency model, and your existing applications can continue to serve you for years to come. Software Pipelines and SOA provides a great road map for getting there. Patrick Leonard VP, Engineering & Product Strategy Rogue Wave Software pleonard@roguewave.com
  • 22. xvii Preface We’re now in the multi-core era. As consumers of computing power, we’ve all come to expect a never-ending increase in power, and CPU manufacturers are now using multi-core processors to continue that long-standing trend. If we want to take full advantage of this enormous capacity, our business applications must “do more than one thing at a time.” However, traditional parallel computing methods (such as multi-threading, SMP, and clustering) are either limiting or extremely difficult to implement—especially when used on top of application components that weren’t originally designed for a parallel world. Software Pipelines architecture is a new architecture that specifically addresses the problem of using parallel processing in the multi-core era. It is a new approach to the problem. Pipeline technology abstracts the complexities of parallel computing and makes it possible to use the power of the new CPUs for business applications. We wrote this book primarily for software architects, application developers, and application development managers who need high-performance, scalable business applications. Project managers, software quality assurance specialists, and IT operations managers will also find it useful; however, the main focus is software development. Our intention was to make the book as applicable as pos- sible, and to provide tools that you can quickly learn and apply to your own development challenges. The book is divided into four sections, which we’ll describe in this preface. Pipelines Theory The Pipelines Theory section, Chapters 1 through 5, covers the following topics: • How pipelines work, including the fundamental concepts and underlying theory of Software Pipelines • What pipelines can accomplish • Methods for applying Software Pipelines • Pipelines Patterns, including various ways to apply Software Pipelines in busi- ness application scenarios, setting the stage for the examples in later chapters
  • 23. xviii Preface As the foundation for the remainder of the book, this section is appropriate for all readers. If you’re a software architect or an application developer, you should definitely study this section first. If you’re reading the book from a managerial perspective, or if your interest is more general and less technical, you can focus on just this section. Pipelines Methodology The Pipelines Methodology section, Chapters 6 through 13, shows how to imple- ment Software Pipelines by using the step-by-step Software Pipelines Optimization Cycle (SPOC). To illustrate how the methodology works, we use it to solve a business problem for a fictitious example company, the Pipelines Bank Corporation (PBCOR). In each chapter we present a new step, then show you how we used the step in our PBCOR example. This section will be of interest to all primary audiences of the book, includ- ing project managers. The PBCOR examples get into a fair amount of technical detail; therefore, application development managers might want to skip over the more complex examples. Pipelines Examples The Pipelines Examples section, Chapters 14 through 22, contains code examples based on the reference Pipelines Framework we developed for the book. We’ve included examples for each main Pipelines Pattern from the Pipelines Theory section. You can use these as guides for applying Software Pipelines directly to your own real-world applications. This section is for software architects and application developers, the roles directly involved in pipelines implementation. In addition, IT operations manag- ers will find it helpful to read the configuration sections, which show how to modify the scalability of an application without modifying the actual application components. We recommend that you read the first three chapters of this section in detail. These basic chapters include Chapter 14,“Hello Software Pipelines”; Chapter 15, “Scaling Hello Software Pipelines”; and Chapter 16,“Additional Pipelines Router Configurations.” After that, you might prefer to scan the more advanced exam- ples in Chapters 17 through 22, then concentrate on the ones that most apply to your specific application scenarios.
  • 24. Preface xix The Future of Software Pipelines In the final section we tell you about the future we envision for Software Pipelines architecture. There are plenty of greenfield areas that can be developed, and it is our hope that this section will inspire readers to help move the technology for- ward into the mainstream. Conventions In our examples, when we present a section of code or XML, refer to a command, or refer to a code element, we’ll use a monospaced font, for example, <pipe- lines-distributor>. For names of components, such as services, clients, and distributors, we’ll use an italic monospaced font, for example, Distributor1. The Web Site We’ve established a Web site for Software Pipelines technology at softwarepipe- lines.org. The site is for readers of the book and for anyone else who is interested in using or advancing the Software Pipelines architecture. You can download the following items from the site: • Tools and sample report templates for the Software Pipelines Optimization Cycle (SPOC) methodology • Source code for the reference Pipelines Framework • Complete source code for all examples in the book • Articles and discussions on pipelines technology and its applications We hope you find Software Pipelines as exciting as we’ve found it, and that you take this opportunity to capitalize on its capabilities and use it to help over- come your own performance and scalability challenges.
  • 26. xxi Acknowledgments There are many individuals who have contributed to the evolution of Software Pipelines, and who have helped with the creation of this first book. I am deeply indebted to all of them for the ideas, input, and, most of all, encouragement and support on the project. I cannot mention everyone, but here are some of the many contributors who made this work possible: Ravi Palepu, great friend and business associate, spent countless hours with me discussing pipelines ideas and helping to develop the initial concepts and outline for the current work. Patrick Leonard and David Haney of Rogue Wave Software worked with me to formulate the original core pipelines concepts, forming the foundation of the current work. I also want to acknowledge the entire Rogue Wave Software organization, for its support during and after my tenure there as president of the company. Barbara Howell was the illustrator and incredibly dedicated editor for my draft of the book; without her I never could have gotten the job done. Her persis- tence, attention to detail, and talent for helping me communicate the key con- cepts through the diagrams and graphics you see in the book were invaluable. Colin Holm provided the majority of development for the code examples, as well as the reference Pipelines Framework presented in the third section. Colin’s insight and work on this were critical to the book’s final content, and his ability to create the examples from the viewpoint of a “real-world” business application developer helped transform Software Pipelines from concept to reality. Last, I must thank my family, especially my wife, Kim, for putting up with the enormous amount of work required to complete the book. I also want to thank my talented and understanding children for their cooperation and under- standing. In fact, my older son, Devyn (a genuine math whiz), helped clarify the early formulas for Pipelines Law, and my younger son, Tyler, was often a sound- ing board for the various ideas in the book and how to present them.
  • 28. xxiii About the Author Cory Isaacson is CEO of Prelude Innovations, Inc., a firm specializing in the incubation and introduction of leading software technology products. Actively involved in leading information technologies for over 20 years, Cory served as technical editor and columnist for WebSphere Advisor Magazine, has spoken at hundreds of public events and seminars, and authored numerous articles on architecture and practicalities of employing technology. Cory has provided guid- ance to hundreds of top architects and professional developers in the financial services, entertainment, telco, and software industries on the development and implementation of powerful business applications. Most recently Cory was president of Rogue Wave Software, managing the organization for over three years, building new product strategies, and culminat- ing in a successful acquisition in mid-2007 by a leading private equity firm. Cory has focused on efficiently addressing development and deployment challenges of emerging technologies such as SOA, virtualization, and commoditization of resources to support real-world business applications. Cory’s expertise with high- performance transactional applications has helped leading IT organizations respond to the challenges of dramatic growth in business and data volumes, while still managing cost pressures. Most recently, Cory has been an active evangelist on the need for using concurrent processing and scalable database techniques in order to improve application performance on multi-core architectures. Cory received his B.A. degree from the University of California at Santa Barbara.
  • 30. xxv Introduction Throughout IT history,professional developers have searched for ways to enhance the performance of critical business applications. The computer industry has tried to provide the answer time and time again, and we’ve seen plenty of solu- tions, architectures, and approaches. Obviously, the problem is not a minor one. In today’s information-based economy, companies often succeed or fail because of their software performance. There are abundant examples: banking systems, trading systems, call center operations, reporting services, and many others— they all depend on applications with high-performance requirements. In these industries, viability is directly tied to the speed at which a company conducts business. A slow, inadequate, or unresponsive application is damaging to opera- tions and the bottom line; ultimately, it can literally kill or impair the organiza- tion that relies on it. And there is no end in sight; as we depend more and more on the exchange of information to do business, performance will lag behind demand even further. There’s an additional problem. Simply achieving faster performance of indi- vidual components isn’t always enough. If your company installs a new applica- tion, if your business expands, or if your data volume rises, you may suddenly need an order-of-magnitude increase in performance—five, ten, twenty times or more. Another vector is also critical: How fast can you adapt your software to meet new needs and competitive threats? The popularity and rapid adoption of ser- vice-oriented architecture (SOA) is hard evidence of the demand for more flexi- ble software systems. SOA is a superior technology. Compared to earlier trends in IT architecture, SOA delivers better on its promises. But it presents its own challenges. If you’re using SOA for development, it’s even more important to address performance and scalability, because of the following factors: • In general observation, SOA demands significantly more computing power from a system than earlier monolithic or tightly coupled designs.
  • 31. xxvi Introduction • The very notion of loosely coupled services implies message-centric applica- tion development. Developers not only have to write traditional processing logic; they also have to handle message transmission, validation, interpreta- tion, and generation—all of which are CPU- and process-intensive. • As more organizations use SOA, we can expect messaging volume to explode and put a tremendous load on existing IT systems. The potential for adverse effects will escalate. Predictions show that over the next year or two, organizations using SOA will run into performance issues. This is nothing new; historically, each time the business world adopts a new software architecture, it suffers through growing pains. In the past twenty years, the shakeout period for each new major paradigm shift in software development has lasted about one to three years for a given evo- lutionary phase (any early J2EE user can attest to that). During that time, busi- nesses gradually adopt the new design, and while doing so, they face significant performance- and scalability-related problems. In many cases software develop- ers cannot overcome the steep learning curve; many projects end in outright fail- ure when the deployed application doesn’t perform as expected. Until recently, hardware was the saving grace for such immature architec- tures. Whenever the computer industry made a significant advance, mostly in CPU performance, performance bottlenecks could be fixed by plugging in a faster chip or by using some other mechanical solution. That advantage is now gone. We’ve hit a plateau in microprocessor technology, which comes from physical factors such as power consumption, heat generation, and quantum mechanics. The industry can no longer easily increase the clock speed of single CPUs. Therefore, for now and the foreseeable future, CPU vendors are relying on multi- core designs to increase horsepower. The catch is that if you want to take advan- tage of these new multi-core chips, your software must implement parallel processing—not a common capability in the majority of today’s applications. Let’s sum up what today’s businesses really need from their software archi- tecture: • A practical approach to parallel processing, for performance and scalability • Flexibility, to enable the business to adapt to market and other environmen- tal changes
  • 32. Introduction xxvii Creating an application with these characteristics is not easy, especially when using traditional means. Further, making such a paradigm shift work in the real world requires the talent, business knowledge, and technical expertise of the pro- fessional developer. In short, the professional developer needs a set of tools designed to meet these objectives, enabling a new level of parallel processing for business applications. Therefore, what is needed is a flexible, sensible, and practical approach to parallel processing. The Software Pipelines technology was developed to be that approach, offering the professional developer a usable set of tools and capabili- ties to enable scalable processing for today’s competitive business application environment. What Do People Think about Parallel Processing? As part of our research for this book, we wanted to find out what the software community thinks about parallel processing, so we conducted a statistical analy- sis of associated Web documents. Our analysis tool compares the usage of terms in Web documents, along with their frequency, in order to indicate the overall trend for a given subject. The results are intriguing; they confirm the importance of parallel processing as a solution for modern computing challenges. To run the analysis, we based our search on the subject“software”and looked for references to related terms in the context of that subject. We started with the following terms: • Multi-core • Multi-threaded • Parallel processing • Parallel programming
  • 33. xxviii Introduction We’ve included several charts in this section to show you the results. The first chart, Figure I.1, shows how often people use each term. As you can see, parallel programming is the most popular term, followed by multi-core, and then parallel processing. This gives us a good idea of how the software community talks about the subject. To get a more detailed query, we cross-linked each term with the following attributes: • Complex • Hard • Important • Knowledge • Useful Figure I.1 Software query
  • 34. Introduction xxix In Figure I.2 you can see the relationship of each attribute to parallel process- ing. Parallel processing is perceived as “useful” and “important,” its two strongest attributes. Figure I.2 Attributes for parallel processing
  • 35. xxx Introduction Figure I.3 shows parallel programming and its attributes. Parallel program- ming is definitely “important,” but a high percentage of documents also mention that it is “hard.” It’s interesting that “knowledge” has a high rank, which is not surprising, given the difficulty of parallel programming and the general lack of experience with its techniques. Figure I.3 Attributes for parallel programming
  • 36. Introduction xxxi Figures I.4 and I.5 show the attributes for multi-core and then multi-threaded. Both charts show responses similar to what we found for parallel programming. Figure I.5 Attributes for multi-threaded Figure I.4 Attributes for multi-core
  • 37. xxxii Introduction In Figure I.6 we’ve included a chart with all terms and attributes to show the relative strength of each combination.You can see that parallel processing is con- sidered “useful,” and that parallel programming is both “important” and “hard.” What conclusion could you draw from all of this? It appears that people who talk about software are saying that parallel processing is important, but it’s not easy. We’re hoping we can help make it easier. The goal of Software Pipelines, and our goal in writing this book, is to provide a practical and useful set of techniques to address the challenge, and our intention is that you will find it helpful in your own application development and business management. Figure I.6 Attributes for all terms
  • 38. S E C T I O N I 1 Pipelines Theory The first section of this book covers the fundamentals of Software Pipelines. In Chapter 1, “Parallel Computing and Business Applications,” we investigate the existing methods for parallel processing. This beginning discussion is useful as a frame of reference for comparing Software Pipelines to other technologies with which you’re famil- iar. After that, we introduce you to the most basic principles of the pipelines architecture, and then we present our first example of a pipelined application. The following chapter, “Pipelines Law,” describes the basic theory of pipelines and explains how to “do the math” for predicting and managing pipelines performance. We introduce Pipelines Law by drawing an analogy to fluid dynamics, a long-standing engi- neering discipline that provides insights into gauging the performance of business trans- action applications. From these simple principles you’ll get the tools for modeling your own applications and for identifying areas where you can improve performance. Chapter 3, “Pipelines Examples,” contains a simplified automated teller machine (ATM) example. We use this basic example to show you how the theoretical foundation fits into a real-world application. In later sections we expand the banking application con- cept to more detailed, advanced examples. We’ve included a number of common, useful patterns for pipelines implementations in Chapter 4, “Pipelines Patterns.” You can implement Software Pipelines in many ways. In this chapter you’ll learn about several aspects and their options. Later in the book we cover these patterns in much more detail. You’ll learn how they work and how you can apply them to solve various problems in performance and scalability. In the final chapter of the section,“Pipelines: The Organizational Impact,” we present the issues with which IT and business organizations must deal when using Software Pipelines technology. We cover all the critical points, including strategy, resources, and budget.
  • 40. 3 C H A P T E R O N E Parallel Computing and Business Applications If you own, manage, or work with a critical business appli- cation, you’re most likely dealing with performance prob- lems. The application can’t handle the ever-increasing data volume, it can’t scale to meet new demand, or its per- formance is never good enough or fast enough. You need a higher level of performance; or even more daunting, you may need an order-of-magnitude increase so you can multiply the number of transactions your application can handle. In today’s computing environment, there’s really only one way to get there: Utilize a parallel architecture to run multiple tasks at the same time. The fundamental concept of parallel architecture is this: Given a series of tasks to perform, divide those tasks into discrete elements, some or all of which can be pro- cessed at the same time on a set of computing resources. Figure 1.1 illustrates this process. To do this, you have to break the application into a series of steps,some of which can run in parallel.However, that’s really hard to do if you’re working with existing business applications that do not lend themselves to such decomposition. Whether monolithic or object-oriented, most modern applications are tightly coupled, and that makes it hard to decompose a given process into steps. Over the years, computer scientists have performed extensive research into parallel architecture and they’ve developed many techniques, but until now they focused on techniques that don’t easily lend themselves to busi-
  • 41. 4 1. Parallel Computing and Business Applications ness systems. At the same time, demand for greater performance started over- reaching the limit of most business applications, and the recent trend toward a service-oriented approach has made the challenge even greater. Parallel process- ing can fix the problem, but common existing techniques are either too complex to adapt to typical business transactions, or they don’t even apply to the business arena. Before we show you the solution, let’s look at the existing techniques for par- allel computing. The three main approaches are • Mechanical solutions used at the operating system level, such as symmetric multiprocessing (SMP) and clustering • Automated network routing, such as round-robin distribution of requests • Software-controlled grid computing Figure 1.1 The fundamental concept of parallel architecture
  • 42. Mechanical Solutions: Parallel Computing at the Operating System Level 5 Mechanical Solutions: Parallel Computing at the Operating System Level Symmetric Multiprocessing SMP automatically distributes application tasks onto multiple processors inside a single physical computer; the tasks share memory and other hardware resources. This approach is highly efficient and easy to implement, because you don’t need specific, detailed knowledge of how SMP divides the workload. Mechanical solutions such as SMP are very useful as generic one-size-fits-all techniques. To get the most out of SMP, however, you have to write applications with multi-threaded logic. This is a tricky job at best and is not, in general, the forte of most corporate IT developers. Plus, SMP is a black-box approach, which can make it very difficult to debug resource contention. For example, if you have shared software components and run into a problem, finding the cause of the bug may be very hard and time-consuming. There’s another drawback: Resource sharing between processors is tightly coupled and is not optimized for any particular application. This puts a lid on potential performance gain, and when you start scaling an application, shared resources will bottleneck at some point. So you might scale an application to eight processors with great results, but when you go to 16, you don’t see any real gain in performance. Clustering In clustering, another widely used mechanical solution, separate physical com- puters share the workload of an application over a network. This technique pro- vides some capabilities for automatic parallel processing and is often used for fail-over and redundancy. Clustering techniques are automated and contain some inefficient function- ality. If you’re not using centralized resources, the system has to copy critical information (or in some cases, all information) from one node to another when- ever a change in state occurs, which can become a serious bottleneck. As is the case with SMP, clustering is often effective up to a point—then adding hardware results in severely diminished returns.
  • 43. 6 1. Parallel Computing and Business Applications Automated Network Routing: Parallel Computing by Predetermined Logic In this technique you use some type of predetermined logic to divide application requests. One common approach is round-robin routing, where the system dis- tributes requests evenly, one after the next, among a set of physical computers. Each computer provides exactly the same application functionality. A good example and use case for round-robin is a Web application, in which the system shunts each Web page request to one of several available processors. Although this approach is useful for certain applications and can be useful as part of a Software Pipelines design, it is also very limited; the router has no logic for determining the best route for a given request, and all downstream processors perform identical tasks. Further, business applications often demand strict“order of processing” requirements, something that simple round-robin logic cannot accommodate. Grid Computing: Parallel Computing by Distribution All of the techniques covered so far have their uses, but you can’t use them for massive scalability, and they don’t work for transaction-based, message-oriented applications. You can scale them mechanically and automatically to a certain level, at which point the overhead of maintaining shared or redundant resources limits performance gains. If you need greater scalability, grid computing is a bet- ter choice. In grid computing the system distributes discrete tasks across many machines in a network. Typical grid architecture includes a centralized task scheduler, which distributes and coordinates tasks with other computing facilities across the network. Grid computing can deliver far higher throughput than the automated approaches described earlier, but it puts a significant burden on the developer. You must explicitly write the code for dividing tasks, for distributing tasks, and for reassembling the processed results. Most importantly, grid computing is primarily designed to solve the“embar- rassingly parallel” problem—long-running, computation-intensive processes as found in scientific or engineering applications. Grids are very beneficial for the typical use cases, such as modeling fluid dynamics, tracing the human genome, and complex financial analytics simulations. In each of these applications you divide a massive, long-running computation among multiple nodes. This divides
  • 44. Parallel Computing for Business Applications 7 the problem into smaller, similar tasks, which interact predictably with computa- tional resources. However, this is not as useful for business applications, given their transactional nature, mixed workload requirements, and ever-changing vol- ume demands. Parallel Computing for Business Applications Business applications are very different from engineering or scientific applica- tions. They have the following traits: • They process transactions. • They process tasks with mixed workloads. Quite often you can’t predict the size of each task, or what the processing requirements might be. • The workload varies widely throughout a given time period. It might even change from day to day, or from one hour to the next. • They often have requirements that defy the very concept of performing mul- tiple tasks in parallel. For example, first in/first out (FIFO) transactions (which are very commonly used) must be done in an exact, ordered sequence. • They almost always use a database or other centralized resource that bottle- necks and caps off transaction throughput. Up to now, research on parallel computing concentrated mostly on mechan- ical solutions with limited scalability, or on grid-based scientific and engineering applications that lie outside the business domain. What we need is a new, simpler way to implement parallel computing for businesses. This new approach must support the following requirements: • It must handle a wide variety of business application needs. • It must provide ultimate scalability. • It must maintain critical business requirements. • It must be easy to implement by corporate IT developers. In reality, there’s no automagic answer for scaling business applications, because each organization has very different needs and requirements. The ulti- mate solution requires the right tools, architecture, and approach, and it must focus on business applications. But more importantly, the solution requires the expertise of the professional developer—the invaluable corporate resource who possesses both a full understanding of the technology and an intimate knowledge of the business domain.
  • 45. 8 1. Parallel Computing and Business Applications The challenge of finding a business-oriented approach to parallel processing is answered by Software Pipelines. The architecture is highly scalable and flexible. It executes business services independent of location, and in such a way as to maximize throughput on available computing resources, while easily meeting a vast array of complex business application requirements. The Solution: Software Pipelines Imagine the ideal implementation for a business environment: You can divide any application process or portion of a process into dis- crete tasks or services and perform them anywhere in a given network (local or remote), in parallel with other tasks whenever possible.You can define the granularity of tasks to fit the specific needs of each applica- tion; the size can range from coarse-grained (such as Web services) down to fine-grained (such as class/method calls). In addition, the system optimizes resource utilization of all available facilities, because it dynam- ically shifts available resources to handle current demand. The idea is simple, but the details are often complex, with a multitude of potential variations and design patterns. The solution is Software Pipelines archi- tecture, which supports the following features and capabilities: • You can decompose business processes into specific tasks, then execute them in parallel. • It has virtually unlimited peer-to-peer scalability. • It’s easier on the developer because it provides an easy method for distribut- ing and executing tasks in parallel—on one server, or across many servers. • It’s specifically designed for business applications, particularly those that use, or can use, SOA. • It handles a high volume of transactions, both large and small, and is there- fore ideal for mixed-workload processing. • The design gives you control of throughput and task distribution, which means that you can maximize your computing resources. • You can scale upward by using parallel architecture, while still guaranteeing the order of processing—a key business requirement in many mission- critical applications. This is a huge benefit over previous approaches. • Because the architecture supports so many configurations and patterns, you can create a wide variety of application designs.
  • 46. The Solution: Software Pipelines 9 These features also allow you to take full advantage of today’s multi-core proces- sors, distributing transactions within and across servers at will. The fundamental component in Software Pipelines is the pipeline itself, defined as follows: An execution facility for invoking the discrete tasks of a business process in an order-controlled manner. You can control the order by using pri- ority, order of message input (for example, FIFO), or both. Essentially, a pipeline is a control mechanism that receives and performs del- egated tasks, with the option of then delegating tasks in turn to other pipelines in the system as required. This means you can use pipelines as building blocks to create an unlimited variety of configurations for accomplishing your specific application objectives. You can group multiple pipelines into fully distributed, peer-to-peer pools; each pipeline processes a portion of an application or process. And because you can configure each pool to run on a specific local or remote server, the system can execute tasks anywhere on a network. A pipeline can route tasks to other pipelines through a Pipeline Distributor, its companion component. The Pipeline Distributor is defined as follows: A virtual routing facility for distributing a given service request to the appropriate pipeline (which in turn executes the request) within a pipeline pool. The distributor is colocated with its pool of pipelines and effectively front-ends incoming service requests. The distributor routes service requests by evaluating message content. Routing is based on configuration rules, which you can easily modify with- out changing individual business services. You can route requests by using priority, order of message input (such as FIFO), or both. In Figure 1.2 you can see how pipelines work with distributors. Requests go to the first distributor, which splits them off onto three pipelines. The second pipeline delegates a request to the third pipeline, and the third pipeline sends a request to another distributor, which in turn splits requests onto five pipelines. By using pipeline and distributor components, you can build a fully distrib- uted, multilevel series of interlinked pipelines—and achieve massive scalability through parallel processing.
  • 47. 10 1. Parallel Computing and Business Applications Fluid Dynamics It’s easy to visualize Software Pipelines by comparing them to a network of hydraulic pipelines, which transport and direct the delivery of water or oil. Such a system has physical limitations: • The input source delivers a particular maximum volume to downstream resources. • Each downstream pipeline or receptacle (including subsidiary downstream pipelines and downstream destinations that process the delivered stream) must accommodate the input volume, or the entire system backs up. In other words, all channels in the system must accommodate the maximum volume of flow. If they can’t, the flow stops or slows down, or even breaks the system. Figure 1.2 The Pipeline Distributor and its relationship to pipelines
  • 48. Software Pipelines Example 11 The same principles apply to Software Pipelines, but it’s far easier to avoid bottlenecks.All you have to do is move some of the processing load to other pipe- lines. The example in the next section shows how to do this. Software Pipelines Example To show you how Software Pipelines work, we’ll use a banking example. A large bank has a distributed network of ATMs, which access a centralized resource to process account transactions. Transaction volume is highly variable, response times are critical, and key business rules must be enforced—all of which make the bank’s back-end application an ideal use case for parallel pipelines. We must apply the following business requirements: • Make sure each transaction is performed by an authorized user. • Make sure each transaction is valid. For example, if the transaction is a with- drawal, make sure the account has sufficient funds to handle the transaction. • Guarantee that multiple transactions on each account are performed sequen- tially. The bank wants to prevent any customer from overdrawing his or her account by using near-simultaneous transactions. Therefore, FIFO order is mandatory for withdrawal transactions. Before we cover pipeline design, let’s take a look at the traditional design for a monolithic, tightly coupled, centralized software component. You can see the main flow for this design in Figure 1.3. The simplicity of this design has several benefits: • It’s very easy to implement. • All business rules are in a single set of code. • Sequence of transactions is guaranteed. However, this design forces every user transaction to wait for any previous transactions to complete. If the volume of transactions shoots up (as it does in peak periods) and the input flow outstrips the load capacity of this single com- ponent, a lot of customers end up waiting for their transactions to process. All too often, waiting customers mean lost customers—an intolerable condition for a successful bank. To use Software Pipelines to solve this problem, we’ll do a pipeline analysis. The first step is to divide the process into logical units of parallel work. We’ll start by decomposing the steps required for processing. Figure 1.4 shows the steps of the ATM process.
  • 49. 12 1. Parallel Computing and Business Applications The steps are • Authenticate the user (customer). • Ensure the transaction is valid. For example, if the transaction is a with- drawal, make sure the account has sufficient funds to handle the transaction. • Process the transaction and update the ATM daily record for the account. Now that we understand the steps of the business process, we can identify the pipelines we’ll use for parallel processing. To do this, we determine which portions of the business process can execute in parallel. For the initial ATM design (Figure 1.5), it seems safe to authenticate users in a separate pipeline. This task performs its work in a separate system, and after it Figure 1.3 Traditional design for an ATM application Figure 1.4 Steps in the ATM process
  • 50. Other documents randomly have different content
  • 51. itself under a totally different aspect; its origin ceased to be of the earth; the prince was not the representative of the public sovereignty, but the image of God, the delegate and representative of Heaven. Power came down to him from on high, whilst in the imperial royalty it had come up from below. These two positions were quite distinct, and had analogous results. The rights of liberty and political guarantees were difficult to combine with the principle of religious royalty; but the principle itself was elevated, moral, and salutary. Let us see the idea formed of the prince in the seventh century, amid the system of religious royalty. I take it from the canons of the council of Toledo. 'The king is called king (rex) because he governs justly (recte). If he acts with justice (recte), he possesses legitimately the name of king; if he acts with injustice, he perishes miserably. Therefore our fathers rightly said, "Thou wilt be king if thou perform just actions; but if thou do not so act, king thou wilt not be." [Footnote 12] The two principal royal virtues are justice and truth (the science of truth, reason). [Footnote 12: Rex ejus eris si recta facis; si autem non facis, non eris. (The reverend fathers of Toledo have here indulged a sort of play on the words rex and recta.)] 'The royal power is bound, like the whole body of the people, to pay respect to the laws. Obeying the behests of Heaven, we give, as well to ourselves as to our subjects, wise laws, to which our own majesty and that of our successors is bound to render submission, as well as all the population of our kingdom. 'God, the creator of all things, in disposing the structure of the human body, has placed the head on high, and has willed that thence should proceed the nerves of all its members. And he has placed in the head the torch of the eyes, in order that thence should be discerned all things that might be noxious.
  • 52. And he has there established the seat of intelligence, imposing on it the duty of governing all the members, and discreetly regulating their action. Therefore is it necessary, in the first place, to make order for what concerns princes, to provide for their safety and protect their lives, and afterwards to prescribe what affects the people; so that by guaranteeing, as is fitting, the safety of kings, that of the people may be at the same time and more effectually secured.' [Footnote 13] [Footnote 13: Forum Judicum, tit. i. 1. 2; tit. i. 1. 2. 1. 4.] But another element besides royalty itself almost always intruded itself into the system of religious royalty. A new power seated itself by its side, a power more connected with God, and therefore with the source whence the royalty emanated, than royalty itself. This was the ecclesiastical power, which came forward to interpose between God and kings, and between kings and people, so that royalty, the image of the Divinity, ran the chance of sinking to a mere instrument of human interpreters of the Divine will. Here was a new cause of diversity in the destinies and effects of the institution.
  • 53. Such were the various orders of royalty which manifested themselves amid the wreck of the Roman Empire in the fifth century—namely, the barbarian royalty, the imperial royalty, and the rising religious royalty. Their fortunes were as diverse as their principles. In France, under the first race, the barbarian royalty prevailed. There were several attempts on the part of the clergy to impress on it the imperial or the religious character; but election in the royal family, with some mixture of hereditary right and religious ideas, remained predominant. In Italy, amongst the Ostrogoths, the imperial royalty overcame the barbarian manners. Theodoric asserted himself the successor of the emperors. The pages of Cassiodorius bear sufficient evidence to this character of his government. In Spain, royalty appeared more religious than elsewhere. As the councils of Toledo were, I will not say the masters, but the influencing power, the religious character held the sway, if not in the government, properly so called, of the Visigoth kings, at least in the laws with which the clergy inspired them, and the language it caused them to hold. In England, amongst the Saxons, the barbarian manners subsisted almost entire. The kingdoms of the heptarchy were no more than the domains of different bands having each its chief. Military election was more clearly displayed there than anywhere else. The Anglo-Saxon royalty was the most faithful type of the barbarian. Thus, from the fifth to the seventh century, whilst the three sorts of royalty manifested themselves in general affairs, some one prevailed, according to circumstances, in each of the different states of Europe.
  • 54. The confusion was such at that epoch, that nothing general or permanent could be established; and through a maze of vicissitudes we arrive at the eighth century, without finding that royalty had taken a definitive character in any quarter. Towards the middle of the eighth century, upon the triumph of the second race of Frank kings, affairs become more generalised and capable of explication. Inasmuch as events were accomplished upon a larger scale, their results were proportionately increased, and they themselves more easy to be understood. We then distinctly perceive the different royalties succeed and combine with each other in a short space of time. At the period that the Carlovingians supplanted the Merovingians, a return to the barbarian royalty is visible; the system of election reappears. Pepin got himself elected at Soissons. When the first Carlovingians gave kingdoms to their sons, they took care to have them accepted by the great men of the countries which they assigned them; and whenever they made a partition, they were anxious to have it sanctioned in national assemblies. In a word, the elective principle, under the form of a general acceptation, reassumed some reality. It will be borne in mind that this change of dynasty was like a new invasion of Germans into the west of Europe, bringing back a certain portion of their ancient institutions and manners. In the same period the religious principle was more unequivocally introduced into royalty, and exercised a greater influence upon it. Pepin was acknowledged and crowned by the Pope. He had need of a religious sanction; it was already a tower of strength, and he availed himself of it. Charlemagne took the same precaution; the religious royalty was gaining development. But under Charlemagne that character did not grow predominant, for the imperial royalty was what he attempted to resuscitate. Although he closely allied himself with the clergy, he made use of them, and was not their instrument. The idea of a universal state, of one prodigious political
  • 55. unity—in fact, the resurrection of the Roman Empire—was the favourite contemplation and dream of Charlemagne. Louis le Debonnaire (the Good-hearted) succeeded him. Every one knows the character the royal power momentarily assumed in his reign. He fell into the hands of the clergy, who censured, deposed, re-established, and governed him. The subordinate religious royalty seemed on the point of organisation. Thus, from the middle of the eighth to the middle of the ninth century, the variety of the three royal systems was exemplified in considerable, connected, and palpable events. After the death of Louis le Debonnaire, the three sorts of royalty almost equally disappeared amid the anarchy into which Europe was plunged; everything was jumbled together. After a certain interval, when the feudal system prevailed, a fourth royalty presented itself, different from all those we have hitherto contemplated—namely, the feudal royalty. This species is very confused and difficult to define. It has been said that the king, in the feudal system, was the suzerain of suzerains, the chief of chiefs; that he was held by fixed ties, through the different degrees, to the whole society; and that in calling around him his vassals, then the vassals of his vassals, and so on, he called the whole nation, and showed himself truly a king. I do not deny that this was the theory of the feudal royalty; but it was a mere theory, which never governed facts. That general influence of the king by means of the graduated organisation, those ties which united royalty to the entire feudal society, exist only in the dreams of publicists. In fact, the majority of the feudal lords were at that epoch completely independent of royalty; many of them scarcely knew it by name, and had no, or very trifling, relations with it. All the sovereignties were local and separate. The name of king, borne by one of the feudal chiefs, expressed a thing past rather than present.
  • 56. This is the state in which royalty presented itself in the course of the tenth and eleventh centuries. In the twelfth, in the reign of Louis the Fat, things began to change in aspect; the name of the king was more frequently invoked, his influence penetrated into places to which it had previously never approached, and in fact his part in society became decidedly more active. Yet we do not find that this increased sway was owing to any one of the titles by which royalty had been accustomed to make good its claims. It was not as inheritor of the emperors, or under colour of the imperial royalty, that it waxed in strength, and settled into a firmer consistence. Neither was it by virtue of election, or as an emanation of the Divine power; every appearance of an elective nature had vanished, and the principle of hereditary succession to the throne definitively established; and although religion sanctioned the accession of kings, the minds of men were not at all awed by any religious character in the royalty of Louis the Fat. A new element or character, hitherto unknown, came forth in royalty at that period. A new royalty commenced. It is scarcely necessary to observe that society was at that epoch in a state of deplorable disorder, and a prey to continual violence. Society had in itself no means of successfully grappling with this shocking condition, or of regaining any regularity or unity. The feudal institutions, those baronial parliaments and seignorial courts, all those forms under which feudalism has been portrayed in modern times, as a systematic and well-ordered regime, were absolutely null and powerless, possessing nothing which could at all conduce to the re-establishment of order and justice; so that, in the midst of this social desolation, none knew to whom recourse might be had to get reparation for wrong, or to apply a remedy to crying evils—in a word, to constitute a state to however small an extent. The name of king still remained, borne by one of the chiefs; some addressed themselves to him. The various titles by which royalty had previously been recommended were not quite eradicated from all minds, although they had long ceased to exercise any great sway; yet on some occasions they were
  • 57. adduced. It often happened that recourse was had to the king to repress some scandalous course of violence, or to establish some degree of order, in a locality approximate to his own residence, or to terminate a long-standing dispute, so that he was called upon to interfere in affairs that were not strictly his own; and in these interventions he came forward as the protector of public order, as an arbiter, and as a redresser of wrongs. The moral authority which still lingered around his name gradually drew to him this power. Such was the character that royalty began to assume under Louis the Fat, and under the administration of Suger. Then, for the first time, we perceive arising in the minds of men an idea, although still imperfect, confused, and feeble, of a public power superior to the local powers which had possession of society, invested with authority to render justice to those who could not obtain it by ordinary means, and capable of establishing, or at least of commanding, order; the idea of a great magistracy, whose essential province was to maintain peace, to protect the weak, and to decide differences which none other could terminate. This was the perfectly new character under which royalty presented itself in Europe, and especially France, dating from the twelfth century. It was not in the light either of a barbarian, religious, or imperial royalty, that it exercised its empire; the power it possessed was very limited, imperfect, and occasional; the power, in some degree (I know not any expression more exact), of a great justice of the peace for the whole country. This is the veritable origin of modern royalty, its vital principle, so to speak; that which has been developed in the course of its career, and which, I do not hesitate to affirm, has been the cause of its prosperity. In the different eras of history we perceive the various characters of royalty, the distinct orders that I have described, endeavouring by turns to reassume preponderance. Thus the clergy have always preached up the religious royalty; jurisconsults have laboured to resuscitate the imperial royalty; and the nobles have sometimes been inclined to renew the elective royalty, or to assert
  • 58. its feudal character. And not only have the clergy, the publicists, and the nobility, striven to make predominant in royalty such or such a character, but it has itself rendered them all subservient to the aggrandisement of its power. Kings have asserted themselves sometimes the delegates of the Almighty, sometimes the successors of the emperors, or the first nobles of the land, according to the exigency or the whim of the moment; they have illegitimately availed themselves of these different titles, but not one of them has been the true title of modern royalty, or the source of its preponderating influence. It is, I once again assert, as the depositary and protector of the public order, of general justice, and of the common interests—under the features of a great magistracy, the centre and nucleus of society—that it has exhibited itself to the eyes of nations, and has monopolised their force by obtaining their adhesion. As we proceed onwards, we shall see this character of modern European royalty, which commenced with the reign of Louis the Fat in the twelfth century, gain strength, develop itself, and finally become, so to speak, its political physiognomy. It is through it that royalty has contributed to the great result which characterises European societies, the reduction of all the social elements to two— the government and the nation. Thus, then, Europe, after the termination of the crusades, entered upon the track which was to lead it to its actual state, and we have now seen that royalty took its appropriate part in that great transition. We shall next survey the different attempts at political organisation that were made, from the twelfth to the sixteenth century, with the object of maintaining, by rendering it more regular, the order of things then in vogue, but ready to crumble. We shall inquire into the efforts of feudalism, the church, and even the boroughs, to constitute society after its ancient principles, and under its primitive forms, and thus defend themselves against the general metamorphosis which was in preparation.
  • 59. Lecture X. Union Of Elements Of Modern Society. I think it proper preliminarily to determine the precise object of this lecture. It will be recollected that one of the most striking facts in the elements of the ancient European society is their diversity, separation, and independence. The feudal nobility, the clergy, and the boroughs, had each a position, laws, and manners, entirely distinct; they were so many separate societies, each governing itself for its own behoof, and by its individual rules and power. They were in mutual relation and contact, but not in a veritable union, nor did they form a nation or state, properly so called. The fusion of all these societies into one has been accomplished; this is distinctly, as has been seen, the distinguishing fact, the essential character, of modern society. The old social elements have been reduced to two—the government and the nation—that is to say, diversity having ceased, similarity produced union. But before this result was consummated, and indeed to avert it, numerous efforts were tried to render it possible for all these particular societies to live and act in common, without destroying their diversity or independence. Their object was not to make any attack of moment on their individual position, their privileges, or their special nature, and yet to unite them into one single state, to form from them the substance of a nation, and to rally them under one and the same government. All these attempts failed. The result which I have just mentioned, the unity of modern society, attests their bad success. Even in those countries of Europe where there still subsist some traces of the ancient diversity in the social elements—in Germany, for example, where there are yet a true feudal nobility and a true burgher order, and in England, where a national church is in
  • 60. possession of special revenues and a peculiar jurisdiction—it is clear that this distinct existence is but a semblance and pretence, and that these particular societies are politically confounded in the general society, absorbed in the nation, governed by the public recognised powers, in subjection to one system, and drawn along in the current of the prevailing ideas and manners. Therefore, I repeat, the separation and independence of the old social elements have no sort of reality, even where they are formally sustained. Nevertheless, these attempts to make them co-ordinate without changing them, to link them to a national unity without abolishing their variety, hold an important place in the history of Europe. They partly fill the epoch upon which we are now engaged, that epoch which divides primitive from modern Europe, and in which was accomplished the metamorphosis of European society. They have, furthermore, had a vast influence upon posterior events, upon the manner in which the reduction of all the social elements to two, government and nation, has been effected. It is therefore of great consequence to investigate and thoroughly understand all the essays at political organisation, from the twelfth to the sixteenth century, designed to create nations and governments, without rooting out the diversity in character of the secondary societies placed side by side. Such is our present task. It is a difficult and even a painful task. All these attempts at political organisation were assuredly not conceived and framed with good intentions; several were instigated by views of selfishness and tyranny. More than one, however, was pure and disinterested; more than one had really for its object the moral and social wellbeing of mankind. The state of incohesiveness, violence, and injustice in which society was then plunged, was disgusting to great and elevated minds, and they were incessantly devising means to emancipate it. Yet the very best of those noble efforts failed; all that amount of courage, sacrifices, energy, and virtue, was utterly thrown away. Is not this a mournful consideration? And there is upon this point something still more painful, ground for still deeper
  • 61. sadness, when we reflect that not only did these experiments for social amelioration miscarry, but an enormous mass of errors and of evil accompanied them. In spite of good intentions, the greater part were absurd, and avouch a profound ignorance of what reason and justice required, of the rights of humanity, and the conditions upon which the social state is founded; so that not only did the men fail in success, but they deserved their discomfiture. We have here, therefore, the spectacle both of the hard fate of humanity, and of its weakness. And we have also placed in striking light how the smallest portion of truth suffices so completely to dazzle the greatest minds, that they lose sight of all the rest, and become blind to what is not comprised within the narrow scope of their ideas; and so that there be a particle of justice in their cause, to what extent men may overlook all the injustice which that cause involves and sanctions. The contemplation of such a display of the faults and imperfection of human nature is, in my opinion, still more sad than the evil of its condition, for its errors are more afflictive to me than its sufferings. The efforts of which I have to speak will present us with both spectacles. It behoves us, however, to encounter them, and at the same time to be just towards those men and those times that have so often mistaken the right course, and been so signally worsted, but have nevertheless displayed many great virtues, made many noble struggles, and have merited well of fame. The attempts at political organisation formed between the twelfth and sixteenth centuries were of two sorts. The first, those that had for their object the giving predominance to some one of the social elements, making all the others subordinate to it, and producing unity at that sacrifice; the clergy, the feudal nobility, and the boroughs, each in turn attempted this. The next, those that were designed to make all the particular societies harmonise and act together, leaving to each its independence, and securing to it an adequate share of influence.
  • 62. The first description of efforts is, much more than the second, open to the suspicion of selfishness and tyranny. They were, in fact, more frequently tainted with those vices; indeed, from their very nature, they were essentially tyrannical in their modes of action. Some of them, nevertheless, might be, and in truth were, conceived in the pure spirit of promoting the good and the advancement of humanity. The first which offers itself to our notice was the attempt at theocratic organisation—that is to say, the design of subjecting the different societies to the principles and empire of the ecclesiastical society. What I said upon the history of the church will be recollected. I there endeavoured to demonstrate what principles had gained development within its own pale, what share of legitimacy each of those principles possessed, how naturally they flowed from the course of events, and what services they rendered, and what evil they perpetrated. I there characterised also the different states through which the church had passed from the eighth to the twelfth century, under its various aspects, as the imperial, the barbarian, the feudal, and finally the theocratic church. Those circumstances must be borne in mind whilst I am on the topic of what the clergy did to monopolise power in Europe, and the causes of their miscarriage. The theocratic organisation was very early attempted, as is evinced both in the acts of the court of Rome and in those of the general body of the clergy. It resulted naturally from the political and moral superiority of the church; but from the commencement of its efforts, it encountered obstacles which it never succeeded in breaking through, even in its greatest vigour. The principal opposition arose from the nature of Christianity itself. Very different from the majority of religious creeds, Christianity was established by persuasion alone, simply by moral influences. From
  • 63. its earliest stages it was never armed with force; it prevailed in the first ages by the Word alone, and it prevailed only over minds. Hence it happened that even after its triumph, when the church was in possession of great wealth and consideration, it never found itself invested with the direct government of society. The purely moral origin of the church, and the merely persuasive character of its action, pervaded its condition at all times. It had considerable influence, but did not wield power. It insinuated itself into the municipal magistracies, and exercised great sway over the emperors and all their agents; but the actual administration of public affairs, the government, properly so called, was never possessed by the church. Now, a system of government, theocracy or any other, cannot be established in an indirect manner, or by means of mere influence; it must perform the functions of judge, administrator, and commander, gather taxes, disburse revenues; in a word, govern and take positive possession of society. When action is limited to persuasion, much certainly may be effected, and great control exercised, both over nations and governments; but a system of rule or political supremacy is not thereby founded, nor future stability sufficiently provided for. This was the position of the Christian church on account of its very origin; it was always on a level with the actual government of society, but it never could thrust it aside and take its place. This great obstacle to its attempts at theocratic organisation it never was able to surmount. Very early in its career, also, the church encountered a second. When the Roman Empire fell, and the barbarian states were founded, the church was composed of the vanquished race. Its first object was to emerge from this position by converting the conquerors, and thus raising itself to their rank. When this labour was accomplished, and when the church aspired to dominion, it encountered the disdain and resistance of the feudal nobility. This was a prodigious service which lay-feudalism rendered to Europe. In the eleventh century, the people were almost completely subjugated by the church, and the sovereigns were scarcely able to stand up against it. The feudal nobility alone scorned the yoke of
  • 64. the clergy, and refused to bow before them. It is sufficient to recall the general features of the middle age, to be convinced of the singular mixture of pride and submissiveness, of blind belief and freedom of spirit, that prevailed in the relations of the lay lords with the priests. In this we discern some remnants of their relative primitive situation. It will recur to the mind of the reader that I have previously endeavoured to describe the origin of feudalism, its first elements, and the manner in which the earliest feudal society was formed around the abode of the fief-holder. I then remarked upon the fact of the priest being at that period under the lord. Now there always remained in the minds of the feudal nobility a remembrance or fueling of that position, and they always regarded themselves not only as independent of the church, but as superior to it, and as alone entitled to possess and actually govern the country. They were always disposed to live on good terms with the church, but not to abandon their own claims, or give in to those set up by it. Thus, during many ages, it was the lay aristocracy which maintained the independence of society with regard to the church; it proudly defended itself, when monarchs and people were tamely crouching. It was the first to enter an opposition, and it contributed more perhaps than any other force to render the attempt to give society a theocratic organisation abortive. A third obstacle stood equally opposed to it, one upon which, in general, very little stress has been laid, and even its effects erroneously judged. Wherever a body of priests has seized upon society, and subjected it to a theocratical organisation, we find that this empire has devolved upon a married clergy, recruiting itself within its own folds, and rearing children from their infancy in, and for, the same profession. Look at Asia and Egypt: all the great theocracies were the work of a clergy forming of itself a complete society, sufficing for all its own purposes, and dependent for nothing from without.
  • 65. The Christian clergy were placed in a totally different situation, owing to the celibacy of the priests. In order to perpetuate their own body, they were obliged to have perpetual recourse to the lay society, and to seek their means of durability from out all the social positions and callings. Doubtless great pains were taken to assimilate these foreign elements, by infusing into them the spirit of the institution, but not with full success: something of the origin of the new-comers always remained: whether burghers or nobles, they invariably preserved some trace of their ancient spirit and primitive condition. There is no question but that this celibacy, by giving to the Catholic clergy a situation altogether peculiar, and divested of participation with the interests and general life of mankind, was a powerful promoter of their isolation; but it has also forced them into constant and close connection with the lay society, to recruit and renew their members, and thus exposed them to receive and undergo some portion of the moral revolutions which were accomplished in that society. Therefore I do not hesitate to aver that this ever-recurring necessity has infinitely more impeded the success of the attempt at theocratical organisation, than the spirit engendered by the institution, and strongly maintained by celibacy, has been able to promote it. The church finally encountered, within its own bosom, powerful adversaries to its attempt. The unity of the church is a thing perpetually talked of, and it is true enough that it has diligently laboured to attain it, and has done so in certain respects. But let us not be led away by imposing words, or a few partial facts. What society has been torn by more civil dissensions, or suffered more disruptions, than the clerical? What nation has been more divided, broken up, or varied, than the ecclesiastical nation? The national churches, in the majority of the countries of Europe, have been in almost constant strife with the court of Rome; councils have risen against popes; heresies have been innumerable and inextinguishable; and schisms have incessantly prevailed: nowhere has there been so much diversity in opinion, so much bitterness and fury in contest, or so much splitting up of power. The internal
  • 66. existence of the church, the dissensions which have broken loose within it, and the revolutions which have shaken it, have been perhaps the greatest obstacle to the triumph of that theocratical organisation which it has striven to impose on society. All these impediments were in action, and are discernible from the fifth century, at the very commencement of the great attempt which now occupies our attention. They did not, however, prevent it continuing its course, or being in progress for several centuries. Its most glorious moment, its critical day, so to speak, was the reign of Gregory VII., at the end of the eleventh century. It has been already remarked that the predominant idea of Gregory VII. was to subject the world to the clergy, and the clergy to the Papacy —Europe to one vast and regular theocracy. In working out this design, that great man committed, in my opinion, as far as it is permitted us to judge at such a distance from the events, two capital faults, the one in his speculative, the other in his revolutionary character. The first consisted in pompously proclaiming his plan, and systematically parading his principles upon the nature and the rights of the spiritual power, and deducing from them beforehand, as an unbending logician, the most remote consequences. He thus menaced and attacked all the lay sovereignties of Europe, before he had made sure of his means to subdue them. Success in human affairs is not obtained by such a dictatorial process, or by the sanction of a mere philosophical argument. In the next place, Gregory fell into the common error of revolutionists, which is, to attempt more than they can execute, and not to take the possible as the measure and limit of their efforts. To hasten the dominion of his ideas, he engaged in contest with the Empire, with all sovereigns, and with the clergy themselves. He insisted upon consequences being immediate, scorning all regard for existing interests, haughtily proclaiming that he would reign over all kingdoms as well as over all minds, and thus rousing against himself not only the temporal powers, which perceived themselves in imminent peril, but also the freethinkers, who were beginning to come out, and already felt apprehensive of
  • 67. tyranny on thought. On the whole, therefore, Gregory VII. perhaps compromised more than he advanced the cause he was wishful to serve. Nevertheless, it continued to prosper during the whole course of the twelfth, and up to the middle of the thirteenth century. This was the period in which the church possessed its greatest power and splendour. Yet I do not think it can be strictly said to have made at that epoch any very great progress. To the end of the reign of Innocent III., it had rather been parading than extending its glory and power. It was at the moment of its greatest apparent success that a popular reaction arose against it in a considerable portion of Europe. In the south of France, the heresy of the Albigenses exploded, which carried off a numerous and powerful society. About the same period, ideas and desires of a similar nature were broached in the north and in Flanders. A little later, Wickliffe, in England, made a talented attack upon the power of the church, and founded a sect which is not yet extinct. The sovereigns were not long in entering upon the same course as the people. It was at the commencement of the thirteenth century that the most powerful and able monarchs of Europe, the emperors of the house of Hohenstaufen, succumbed in their contest with the Papacy. Before that century was over, Saint Louis, the most pious of kings, proclaimed the independence of the temporal power, and promulgated the first pragmatic sanction, which became the base of all the succeeding ones. At the opening of the fourteenth century, the quarrel between Philip the Handsome and Boniface VIII. began to rage, whilst the king of England, Edward I., was not more docile towards Rome. It is clear, therefore, that at this epoch the attempt at theocratic organisation had failed, that the church was thenceforth put upon the defensive, and had so much difficulty in preserving what it had conquered, as to stop all further endeavour to impose its system on Europe. Hence the true date of the emancipation of the lay European society is from the end of the thirteenth century; it was then that the church ceased its pretensions to monopolise it.
  • 68. For a long time previously, it had renounced that attempt in the very sphere in which it seemed to have the best chance of success. At the very threshold of the church, around its throne in Italy, theocracy had been completely discomfited, and given place to a very different system, to that attempt at democratic organisation of which the Italian republics are the type, and which played so distinguished a part in Europe from the eleventh to the sixteenth century. What I have already stated upon the history of the boroughs, and the manner in which they were formed, will be recollected. Their establishment was more precocious and powerful in Italy than anywhere else; the towns there were much more numerous and wealthy than in Gaul, Britain, or Spain, and the Roman municipal system had remained there in greater force and regularity. The districts of Italy, besides, were much less suited for the habitation of its new masters than those of the rest of Europe. They had been all cleared, drained, and cultivated, and were no longer covered by forests, so that the barbarians were unable to follow the exciting hazards of the chase, or to lead a life at all analogous to that of their old Germany. Furthermore, a part of that territory did not belong to them. The south of Italy, the Campagna di Romagna, and Ravenna, continued to depend upon the Greek emperors. In this portion of the country the republican system very early gained strength and development, favoured as it was by the distance of the sovereign, and by the vicissitudes of almost constant war. But in addition to the circumstance of Italy not being wholly in the power of the barbarians, those hordes that overran it never remained its undisturbed and definitive possessors. The Ostrogoths were hunted down and destroyed by Belisarius and Narses. The Lombards had little better success with regard to their kingdom: the Franks destroyed it; and at the period of their overthrow, Pepin and Charlemagne judged it expedient, instead of exterminating the Lombard population, to form an alliance with the old Italian population to keep down the recently-subdued Lombards. Therefore the barbarians never were exclusive and tranquil masters of the
  • 69. territory and society of Italy, as they were elsewhere. For this reason, only a very feeble, thin, and scattered feudalism was established beyond the Alps. The preponderance, instead of passing to the inhabitants of the country districts, as had happened in Gaul, for example, continued to adhere to the towns. When this fact unequivocally declared itself, a considerable proportion of the fief- holders, either of their own accord, or impelled by necessity, forsook the country, and settled within the walls of the cities. The barbarian nobles then became burghers. It may be easily imagined how great was the strength and superiority which the towns of Italy gained by this single circumstance, in comparison with the other boroughs in Europe. What was chiefly remarkable in the latter, as has been observed, was the inferior condition and the timidity of their inhabitants. Those burghers, we have seen, were like desperate freedmen, courageously but painfully struggling against a master always at their gates. Very different was the lot of the Italian burghers; the conquering and the conquered populations were mingled together within the same walls; they had no neighbouring master to defend themselves against; and the majority of the citizens were men free from all time, who asserted their independence and their rights against distant and foreign sovereigns, sometimes against the Frank kings, and sometimes against the emperors of Germany. From these causes sprang the great and precocious superiority of the Italian towns; and whilst miserable boroughs were formed elsewhere with much difficulty, they at once emerged into important republics and states. Thus the success of the attempt at republican organisation in this part of Europe is explained. It early swamped the feudal element, and became the predominant form of the society. But it was little calculated to extend, or be perpetuated, for it contained but very few seeds of amelioration, a condition necessary to extension and durability. When we contemplate the history of the Italian republics from the eleventh to the fifteenth century, we are struck with two facts
  • 70. apparently contradictory, and yet incontestable. We perceive an admirable development of courage, activity, and genius, and, as its consequence, great prosperity. A movement and a liberty were there in operation, which were utterly wanting to the rest of Europe. Now, let us ask, what was the real lot of the inhabitants, how were their lives passed, and what was their share of happiness? In this respect the aspect of things is instantly changed. No history, perhaps, is more mournful and gloomy, nor has there ever been an epoch, or a country, in which the destiny of man appears to have been more beset with alarms and disorder, more liable to deplorable hazards, or more afflicted by dissensions, crimes, and calamities. At the same time, there is another fact equally striking. In the political system of the major part of those republics liberty was always diminishing. The deficiency of security was such, that the community was driven to seek for refuge in some system less boisterous and popular than that with which the state commenced. Take the history of Florence, Venice, Genoa, Milan, or Pisa; it is everywhere clear that the general course of events, instead of developing liberty, and enlarging the circle of the institutions, tended to coop up and concentrate power in the hands of a decreasing number of men. In a word, two things were wanting in those republics, so energetic, brilliant, and wealthy, in their outward aspect—namely, security for life, the first condition of the social state, and progressive action in the institutions. Thence sprang a new evil, which served as an effectual barrier to the farther spread of the attempt at republican organisation. It brought down interference from without, and thenceforth the greatest danger incurred by Italy arose from foreign sovereigns. Yet this peril never succeeded in reconciling the different republics, and making them act in common. Thus several of the most enlightened and patriotic Italians of the present time, deplore the republican system of Italy in the middle ages as the true cause of hindrance to its becoming a nation. It was parcelled out, say they, into a multitude of petty states, so bent on the gratification of their several momentary designs, as to be incapable of confederating
  • 71. together and constituting a united people. It is to them a subject of regret that their country has not passed, like the rest of Europe, through a despotic centralisation, which would have formed it into one nation, and rendered it independent of the stranger. It therefore appears that the republican organisation, even in the most favourable circumstances, did not contain at that era the principle of advancement, of durability, or of extension, and that it was deficient in what regarded futurity. The organisation of Italy in the middle ages may be compared to a certain extent with that of ancient Greece. Greece was likewise a country strewed with small republics, always rivals, often enemies, and occasionally uniting in a common object. The advantage of the comparison rests entirely with Greece. There was undoubtedly much more order, security, and justice in the interior of Athens, Sparta, or Thebes, although history presents us with many instances of iniquity, than in the republics of Italy. Yet we see how short was the political existence of Greece, and how surely weakness followed its minute subdivisions of territory and power. Whenever Greece came in contact with powerful neighbours—Macedonia and Rome, for instance—she yielded at once. Those small republics, so glorious, and still so flourishing, were unable to coalesce for a common resistance. How much more, then, was the same result sure to happen in Italy, where society and intellect were far less developed, and infinitely weaker, than amongst the Greeks! If the attempt at republican organisation had so few chances of stability in Italy, where it had originally triumphed, and where the feudal system had been vanquished, it may be readily conceived that in other parts of Europe it was destined to meet a yet more speedy overthrow. I will take a rapid glance at its fate in various places. There was a portion of Europe which greatly resembled Italy; namely, the south of France, and the provinces of Spain adjoining it —Catalonia, Navarre, and Biscay. The towns had there likewise
  • 72. gained considerable development, importance, and wealth. Several petty feudal chiefs had allied themselves with the burghers, and a part of the clergy had also embraced their cause, so that the country was actually in a situation very analogous to that of Italy. We therefore find that in the course of the eleventh, and at the commencement of the twelfth century, the towns of Provence, Languedoc, and Aquitaine were disposed to try a political essay, and form themselves into independent republics, upon the model of those beyond the Alps. But the south of France was in contact with a very powerful feudalism, predominant in the north. And upon the occasion of the heresy of the Albigenses, war broke out between feudal and municipal France. The history of the crusade against the Albigenses, commanded by Simon do Montfort, is well known. It was an attack by northern feudalism upon the southern attempt at democratic organisation. In spite of the heroism of southern patriotism, the north carried the victory. It was promoted by the want of political unity, and civilisation was not sufficiently advanced for men to be aware that the deficiency might be remedied by skilful concert. The experiment at republican organisation was therefore put down, and a crusade re-established the feudal system in the south of France. At a later date, the republican movement succeeded better on the mountains of Switzerland. There the theatre was very contracted, and it had to struggle only against a foreign sovereign who, although possessing superior strength to the Swiss, was not one of the most formidable monarchs of Europe. The contest was maintained with infinite courage. The Swiss feudal nobility also joined in a great measure with the towns; bringing certainly powerful aid, but altering the nature of the revolution which they supported, and imparting to it a more aristocratical and stationary character than it seemed destined to bear. [Footnote 14] [Footnote 14: M. Guizot has allowed himself to be carried away by his speculative deduction from history in this description of the early attempts of the Swiss to
  • 73. establish their independence. The movement began in the most rural part of Switzerland, in the three forest cantons of Schweiz, Uri, and Underwalden, and not in towns, and was almost throughout conducted by peasants. It was only in a portion of Switzerland that feudalism prevailed. Besides, the Swiss cantons are only partially aristocratic—See Muller's Hist. de la Suisse.] I pass to the north of France, to the boroughs of Flanders, to those on the banks of the Rhine, and to the Hanseatic League. There the democratic organisation completely triumphed within the walls of the town; but we can discern from its commencement that it was not destined to extend or to take possession of all society. The boroughs of the north were surrounded and hemmed in by feudalism, by chiefs and sovereigns, so that they were constantly put upon the defensive. They were not calculated to make conquests; their great object was to protect themselves. In this they succeeded; they maintained their privileges, but they were confined to their own precincts. Thus the democratic organisation was shut up and stopped; it never spread over the face of the country. Such, then, was the state of the republican experiment; triumphant in Italy, but with few chances of durability and expansion; suppressed in the south of France; victorious, on a small stage, in the Swiss mountains; and restricted to the walls of the towns in the north, in Flanders, on the Rhine, and in the Hanseatic League. Nevertheless, whilst in this state, so palpably inferior in strength to the other elements of society, it inspired the feudal nobility with prodigious alarm. The barons were not only envious of the wealth of the boroughs, but they were afraid of their power; the democratic spirit penetrated into the rural districts, and insurrections among the peasants became more frequent and stubborn. Hence a great coalition was formed by the feudal nobility, throughout almost all Europe, against the boroughs. The contest was not at all equal, for the boroughs were isolated, and had no
  • 74. understanding or intercourse amongst themselves. Doubtless there existed a certain sympathy between the burghers of different countries; the successes or the reverses of the Flemish towns, at war with the Dukes of Burgundy, excited a lively sensation in the French towns, but it was an emotion transitory, and without result; no veritable bond or union was established amongst the different boroughs, nor did they lend any strength to each other. Feudalism, therefore, had an immense advantage over them; but it was itself divided and irreflective, and was far from succeeding in destroying them. When the contest had lasted a certain time, and it had become clear that a complete victory was impossible, there arose a necessity for consenting to recognise these small burgher republics, to negotiate with them, and to receive them as members of the state. Then commenced a new order of things, and a new attempt at political organisation—to wit, the attempt at a mixed organisation, which had for its object the reconciling the different elements of society, the feudal nobility, the boroughs, the clergy, and the sovereigns, and, notwithstanding their mutual deep-rooted antipathy, bringing them to live and act together. This branch of the subject remains to be investigated. The purposes of the states-general in France, the cortes in Spain and Portugal, the parliament in England, and the diets in Germany, are sufficiently well known. The elements of these different assemblies were the feudal nobility, the clergy, and the burghers, who collected together with the view of uniting themselves into one single society, into one and the same state, and under an identical law and power. This was the tendency and design of them all, under different names. I will take as the type of this attempt at organisation the states- general of France, as being the most familiarly known. I say familiarly known, and yet the name of the states-general calls up none but vague and imperfect ideas. There is no one who can state with any precision what was fixed or regular in the states-general of France, what was the number of their members, what the
  • 75. subjects of deliberation, or what the periods of convocation, and the duration of their sessions. We know nothing of all these things; it is impossible to draw from history any clear and general results on tins subject. When we inquire into the character of these assemblies in the history of France, they appear to have been purely accidental, a sort of political shift, on the part of the people as well as on that of the kings: a last shift to the kings when they had no money, and were at their wits' ends for expedients; and a last shift to the people, when evil became so intolerable, that the usual remedies for alleviation were exhausted in vain. The nobility and the clergy each took part in the states-general, but they came there with reluctance, and distrustfully, as they were well aware that it was not in them their best means of action lay, or that they could thereby promote their real participation in the government. The burghers themselves were not more eager for the sitting; it was not a right which they exercised with alacrity, but rather a necessity to which they submitted. We find these facts exemplified in the character of the political actions of those assemblies. They were sometimes perfectly insignificant, and sometimes vastly terrible. If the king was the strongest, their humility and docility were extreme; if the situation of the crown was disastrous, if it had an absolute occasion for the assistance of the states, they fell into factious opposition, and became the instruments either of some aristocratic intrigue, or of some ambitious schemers. In a word, they were sometimes mere assemblies of notables, and sometimes veritable conventions. Thus their labours seldom or ever survived them; they promised and attempted much, but did nothing. Not one of the great measures which have really acted on society in France, not one important reform in government, legislation, or administration, has emanated from the states-general. We must not, however, too rashly conclude that they have been without utility or effect. They have served a moral purpose, which has been generally overlooked, by operating, from time to time, as a protestation against political servitude, and distinctly proclaiming certain tutelary principles; such, for example, as that the country has the right to impose taxes, to interfere in affairs, and to make
  • 76. the agents of power responsible. That these maxims have never perished in France, is chiefly owing to the states-general; and it is certainly not a small service to render to a nation, the keeping up in its manners, and reviving in its recollection, the name and dues of liberty. The states-general effected that good, but they never were a means of government, nor ever entered into a political organisation. They never attained the object for which they were formed—namely, the fusion into one single body of the different societies which subdivided the country. The cortes of Spain and Portugal present the same result. There are, however, a thousand different attendant circumstances. The importance of the cortes varied according to the kingdoms and the times; in Arragon and Biscay, and amid the contests for the succession to the crown, or the struggles against the Moors, they were more frequently convoked, and more powerful than in other places and periods. In certain cortes—for example, in those of Castile in 1370 and in 1373—the nobles and the clergy were not summoned. There is a multitude of circumstances to be taken into account, if we were to look more narrowly into the events; but in the generalising system, to which I am forced to restrict myself, it is sufficient to affirm that the cortes, like the states-general of France, were but an accident in history, and never a system, a political organisation, or a regular means of government. The destiny of England was different. I will not enter upon the subject of England at any great length now, as it is my purpose to devote a lecture specially to an inquiry into its political career. I shall only say a few words upon the causes which imparted to it a direction so completely different from that of the continent. In the first place, there were no great vassals, no subjects in a state individually to oppose royalty, in England. The barons, the great lords, were obliged, at a very early date, to coalesce together, in order to form a common resistance. Thus the principle of association, and manners essentially political, prevailed in the high
  • 77. aristocracy. In the next place, English feudalism, or the possessors of small fiefs, were led be a series of events to which I cannot do more than allude at the present moment, to unite themselves to the burghers, and to sit with them in the House of Commons, which thus possessed a strength far superior to that enjoyed by the continental boroughs, a strength capable of really influencing the government of the country. Now, in the fourteenth century, the state of the British parliament was as follows:—The House of Lords was the king's great council, and effectively associated with the exercise of power; the House of Commons, composed of the deputies of the possessors of small fiefs, and the burgesses, took scarcely any part in the government, properly so called, but it conduced to the establishment of rights, and energetically defended private and local interests. The parliament, considered as a whole, did not yet govern, but it was already a regular institution, adopted in principle as a means of government, and in fact often indispensable. Thus the attempt to reconcile and ally together the different elements of society, in order to form a single political body and veritable state, succeeded in England, whilst it miscarried on the continent. I will say but one word upon Germany, merely to point out the predominant character of its history. There the attempts to promote a general fusion, unity, and a common political organisation, were followed up with little ardour. The various social elements remained much more distinct and independent than in the rest of Europe. If any proof of this were required, it will be found even in modern times. Germany is the only country of Europe in which the feudal election long prevailed in the creation of royalty. I do not include Poland or the Slavonian nations, which entered at so late a period into the system of European civilisation. Germany is likewise the only country in Europe in which ecclesiastical sovereignties remained, and which preserved free towns having a political and really independent existence. It is therefore clear that the attempt to mould into a single society the elements of the primitive
  • 78. Welcome to Our Bookstore - The Ultimate Destination for Book Lovers Are you passionate about books and eager to explore new worlds of knowledge? At our website, we offer a vast collection of books that cater to every interest and age group. From classic literature to specialized publications, self-help books, and children’s stories, we have it all! Each book is a gateway to new adventures, helping you expand your knowledge and nourish your soul Experience Convenient and Enjoyable Book Shopping Our website is more than just an online bookstore—it’s a bridge connecting readers to the timeless values of culture and wisdom. With a sleek and user-friendly interface and a smart search system, you can find your favorite books quickly and easily. Enjoy special promotions, fast home delivery, and a seamless shopping experience that saves you time and enhances your love for reading. Let us accompany you on the journey of exploring knowledge and personal growth! ebookgate.com