Buy Practical Go Book by Amit Saha - Bookswagon UAE
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Book 1
Book 2
Book 3
Home > Computing and Information Technology > Computer programming / software engineering > Practical Go: Building Scalable Network and Non-Network Applications
Practical Go: Building Scalable Network and Non-Network Applications

Practical Go: Building Scalable Network and Non-Network Applications


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

YOUR PRACTICAL, HANDS-ON GUIDE TO WRITING APPLICATIONS USING GO

Google announced the Go programming language to the public in 2009, with the version 1.0 release announced in 2012. Since its announcement to the community, and the compatibility promise of the 1.0 release, the Go language has been used to write scalable and high-impact software programs ranging from command-line applications and critical infrastructure tools to large-scale distributed systems. It’s speed, simplicity, and reliability make it a perfect choice for developers working in various domains.

In Practical Go - Building Scalable Network + Non-Network Applications, you will learn to use the Go programming language to build robust, production-ready software applications. You will learn just enough to building command line tools and applications communicating over HTTP and gRPC.

This practical guide will cover:

  • Writing command line applications
  • Writing a HTTP services and clients
  • Writing RPC services and clients using gRPC
  • Writing middleware for network clients and servers
  • Storing data in cloud object stores and SQL databases
  • Testing your applications using idiomatic techniques
  • Adding observability to your applications
  • Managing configuration data from your applications

You will learn to implement best practices using hands-on examples written with modern practices in mind. With its focus on using the standard library packages as far as possible, Practical Go will give you a solid foundation for developing large applications using Go leveraging the best of the language’s ecosystem.



Table of Contents:

Introduction xvii

Getting Started xxi

Chapter 1 Writing Command-Line Applications 1

Your First Application 1

Writing Unit Tests 8

Using the Flag Package 14

Testing the Parsing Logic 20

Improving the User Interface 22

Removing Duplicate Error Messages 23

Customizing Usage Message 24

Accept Name via a Positional Argument 25

Updating the Unit Tests 28

Summary 32

Chapter 2 Advanced Command-Line Applications 33

Implementing Sub-commands 33

An Architecture for Sub-command-Driven Applications 37

Testing the Main Package 43

Testing the Cmd Package 45

Making Your Applications Robust 47

User Input with Deadlines 48

Handling User Signals 52

Summary 56

Chapter 3 Writing HTTP Clients 57

Downloading Data 57

Testing the Data Downloader 59

Deserializing Received Data 61

Sending Data 66

Working with Binary Data 72

Summary 80

Chapter 4 Advanced HTTP Clients 81

Using a Custom HTTP Client 81

Downloading from an Overloaded Server 81

Testing the Time-Out Behavior 85

Configuring the Redirect Behavior 88

Customizing Your Requests 91

Implementing Client Middleware 92

Understanding the RoundTripper Interface 93

A Logging Middleware 94

Add a Header to All Requests 96

Connection Pooling 99

Configuring the Connection Pool 103

Summary 104

Chapter 5 Building HTTP Servers 105

Your First HTTP Server 105

Setting Up Request Handlers 108

Handler Functions 109

Testing Your Server 112

The Request Struct 114

Method 115

Url 115

Proto, ProtoMajor, and ProtoMinor 116

Header 116

Host 116

Body 116

Form, PostForm 116

MultipartForm 117

Attaching Metadata to a Request 118

Processing Streaming Requests 121

Streaming Data as Responses 126

Summary 132

Chapter 6 Advanced HTTP Server Applications 133

The Handler Type 133

Sharing Data across Handler Functions 134

Writing Server Middleware 139

Custom HTTP Handler Technique 139

The HandlerFunc Technique 140

Chaining Middleware 142

Writing Tests for Complex Server Applications 147

Code Organization 147

Testing the Handler Functions 153

Testing the Middleware 155

Testing the Server Startup 157

Summary 159

Chapter 7 Production- Ready HTTP Servers 161

Aborting Request Handling 161

Strategies to Abort Request Processing 165

Handling Client Disconnects 169

Server-Wide Time- Outs 173

Implement a Time- Out for All Handler Functions 173

Implementing Server Time- Out 174

Implementing Graceful Shutdown 179

Securing Communication with TLS 184

Configuring TLS and HTTP/2 184

Testing TLS Servers 188

Summary 192

Chapter 8 Building RPC Applications with gRPC 193

gRPC and Protocol Buffers 193

Writing Your First Service 197

Writing the Server 198

Writing a Client 203

Testing the Server 207

Testing the Client 211

A Detour into Protobuf Messages 214

Marshalling and Unmarshalling 214

Forward and Backward Compatibility 219

Multiple Services 220

Error Handling 226

Summary 228

Chapter 9 Advanced gRPC Applications 229

Streaming Communication 229

Server- Side Streaming 230

Client- Side Streaming 237

Bidirectional Streaming 239

Receiving and Sending Arbitrary Bytes 247

Implementing Middleware Using Interceptors 256

Client- Side Interceptors 257

Server- Side Interceptors 263

Wrapping Streams 269

Chaining Interceptors 271

Summary 272

Chapter 10 Production- Ready gRPC Applications 275

Securing Communication with TLS 275

Robustness in Servers 278

Implementing Health Checks 278

Handling Runtime Errors 286

Aborting Request Processing 289

Robustness in Clients 297

Improving Connection Setup 298

Handling Transient Failures 300

Setting Time- Outs for Method Calls 305

Connection Management 306

Summary 309

Chapter 11 Working with Data Stores 311

Working with Object Stores 312

Integration with Package Server 313

Testing Package Uploads 323

Accessing Underlying Driver Types 325

Working with Relational Databases 327

Integration with Package Server 328

Testing Data Storage 339

Data Type Conversions 343

Using Database Transactions 346

Summary 348

Appendix A Making Your Applications Observable 349

Logs, Metrics, and Traces 349

Emitting Telemetry Data 352

Command- Line Applications 352

HTTP Applications 360

gRPC Applications 364

Summary 366

Appendix B Deploying Applications 367

Managing Configuration 367

Distributing Your Application 370

Deploying Server Applications 372

Summary 373

Index 375



About the Author :

Amit Saha is a software engineer at Atlassian, located in Sydney, Australia. He has written Doing Math with Python: Use Programming to Explore Algebra, Statistics, Calculus, and More! (No Starch Press, 2015) and Write Your First Program (PHI Learning, 2013). His other writings have been published in technical magazines, conference proceedings, and research journals. He can be found online at https://echorand.me


Best Sellers


Product Details
  • ISBN-13: 9781119773832
  • Publisher: John Wiley & Sons Inc
  • Publisher Imprint: Standards Information Network
  • Language: English
  • Sub Title: Building Scalable Network and Non-Network Applications
  • ISBN-10: 1119773830
  • Publisher Date: 11 Sep 2021
  • Binding: Digital (delivered electronically)
  • No of Pages: 416


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Practical Go: Building Scalable Network and Non-Network Applications
John Wiley & Sons Inc -
Practical Go: Building Scalable Network and Non-Network Applications
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Practical Go: Building Scalable Network and Non-Network Applications

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!