Preface

Between the NodeSchool San Francisco and Ann Arbor PHP MySQL Meetups I’ve dedicated multiple years to the pursuit of teaching others how to program. There are many approaches one can take to educating others, including giving presentations and watching video courses. But, the thing that always seems to stick the most is when the student gets the software installed and reads their first Hello World message printed to the console. There’s always a tingle of excitement when someone actually gets their program to run locally, or when two pieces of software to communicate with each other.

My goal with this book is to recreate that tingle of excitement in every chapter. Within these pages you’ll find many hands-on examples where you’ll get to run various backing services on your development machine and will be able to interact with them using example Node.js application code.

Once you’re finished with this book you will have installed and run many different services. And, with each of these services, you will have written Node.js application code to interact with them. This book places a greater emphasizes on these interactions than it does on examining Node.js application code.

JavaScript is a powerful language capable of developing both frontend and backend applications. This makes it too easy to go all in on just learning the language while shying away from periphery technologies. The thesis of this book is that we JavaScript engineers will benefit greatly by having first-hand experience with technologies that are often assumed to only be familiar to engineers using more traditional enterprise platforms like Java or .NET.

Target Audience

This is not a book for beginners.

To benefit the most from this book you should have already written several Node.js applications. This book doesn’t discuss the differences between Express and Hapi, nor do we look at semantics of the JavaScript language (though, Chapter 1 looks at it from a high level). You should be familiar with the basics of HTTP, you should have used at least one database for persisting state, and you should also know how easy—and how dangerous—it is to maintain state within a running Node.js process.

Perhaps you already work at a company which has a bunch of infrastructure for running backend services and you’re eager to learn what all that infrastructure is used for and how your Node.js applications can benefit from it. Or perhaps you’ve got a Node.js application that you’re running as a side project and you’re tired of it crashing and you want to be able to scale it to meet the demands of your userbase.

Goals

Node.js is often used for building frontend web applications. This book doesn’t cover any topics related to frontend development or browser concerns. A wealth of books cover such content. Instead this book covers the development of backend services.

By the time you are done reading this book you’ll have a pretty good understanding of many of the technologies required to run Node.js in a distributed environment. For example: what it takes to deploy and scale an application, how to make it redundant and resilient to failure, and how to discover and communicate with other distributed processes.

You won’t become an expert on these systems by just reading this book. For example, the operational work required to tune and shard and deploy scalable ELK services (covered in “Logging with ELK”) to production isn’t touched on. But you will understand how to run a local ELK instance, send it logs from your Node.js service, and create a dashboard for visualizing the service’s health.

The book surely doesn’t cover all of the technology used at your particular employer. Although [Link to Come] discusses Kubernetes, which is a technology for orchestrating the deployments of application code, your employer may use a different technology such as Apache Mesos for performing the same tasks. Or, perhaps you’ll use a version of Kubernetes in a cloud environment which hides the underlying implementation from you. At any rate, by learning about tools in the different layers of a distributed backend service stack, you’ll be more prepared to understand the stack used by your company.

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Constant width bold

Shows commands or other text that should be typed literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This element signifies a tip or suggestion.

Note

This element signifies a general note.

Warning

This element indicates a warning or caution.

Using Code Examples

Supplemental material (code examples, exercises, etc.) will available for download in the future.

This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Book Title by Some Author (O’Reilly). Copyright 2012 Some Copyright Holder, 978-0-596-xxxx-x.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

O’Reilly Online Learning

Note

For almost 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed.

Our unique network of experts and innovators share their knowledge and expertise through books, articles, conferences, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, please visit http://oreilly.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

  • O’Reilly Media, Inc.
  • 1005 Gravenstein Highway North
  • Sebastopol, CA 95472
  • 800-998-9938 (in the United States or Canada)
  • 707-829-0515 (international or local)
  • 707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://www.oreilly.com/catalog/9781492077299.

To comment or ask technical questions about this book, send email to .

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

The following people provided a technical review this book:

Fernando Larrañaga (@xabadu)

The stylin’, profilin’, UI buildin’, Web codin’, community leadin’, son of a gun!. Code at Square - Organizer NodeSchool San Francisco.

Julián Duque (@julian_duque)

Julián Duque is a community leader, public speaker, JavaScript/Node.js evangelist, and an official Node.js collaborator (Emeritus). Currently working at Salesforce Heroku as a Sr. Developer Advocate and currently organizing JSConf and NodeConf Colombia, also helping organize JSConf México and MedellinJS, the largest JavaScript user group in Colombia with 5000+ registered members. He is also passionate about education and has been teaching software development fundamentals, JavaScript, and Node.js through different community workshops, professional training engagements, and online platforms such as Platzi.

This book wouldn’t have been possible without the feedback and guidance of different people. I’d like to make a special thanks to those who helped make this title possible: Bryan English (@bengl), Matt Ranney (@mranney), Matteo Collina (@matteocollina), Rich Trott (@trott), Jorge Venegas (@jorgepvenegas).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.216.229