PDF Network Programming with Go Language : Essential Skills for Programming, Using and Securing Networks with Open Source Google Golang 2nd Edition Jan Newmarch download
PDF Network Programming with Go Language : Essential Skills for Programming, Using and Securing Networks with Open Source Google Golang 2nd Edition Jan Newmarch download
com
OR CLICK HERE
DOWLOAD NOW
https://ebookmeta.com/product/network-programming-with-go-
language-2nd-edition-ronald-petty/
ebookmeta.com
https://ebookmeta.com/product/software-development-with-go-cloud-
native-programming-using-golang-with-linux-and-docker-nanik-tolaram/
ebookmeta.com
https://ebookmeta.com/product/anoikis-how-the-extracellular-matrix-
regulates-life-or-death-decisions-1st-edition-steven-m-frisch/
ebookmeta.com
IoT, Machine learning and Blockchain Technologies for
Renewable Energy and Modern Hybrid Power Systems 1st
Edition C. Sharmeela
https://ebookmeta.com/product/iot-machine-learning-and-blockchain-
technologies-for-renewable-energy-and-modern-hybrid-power-systems-1st-
edition-c-sharmeela/
ebookmeta.com
https://ebookmeta.com/product/national-geographic-traveler-florence-
and-tuscany-3rd-edition-tim-jepson/
ebookmeta.com
https://ebookmeta.com/product/fates-and-furies-lauren-groff/
ebookmeta.com
https://ebookmeta.com/product/mountain-daddys-milk-honeymoon-spice-in-
the-mountains-book-2-1st-edition-elena-dawne/
ebookmeta.com
https://ebookmeta.com/product/the-bastard-complete-series-1st-edition-
jack-porter/
ebookmeta.com
Forming Humanity Redeeming the German Bildung Tradition
1st Edition Jennifer A. Herdt
https://ebookmeta.com/product/forming-humanity-redeeming-the-german-
bildung-tradition-1st-edition-jennifer-a-herdt/
ebookmeta.com
Jan Newmarch and Ronald Petty
Ronald Petty
San Francisco, CA, USA
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress
Media, LLC, part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY
10004, U.S.A.
I dedicate this to my family.
Preface to the Second Edition
While an age has passed in Internet years, Go remains a primary
destination for programmers. Go conquered the container technology
space. It continues to find affection in Cloud Native development. Go
strives to remain true to itself, backward compatible, yet adding new
language features like Generics. Tooling improvements such as Fuzzing
allow for more secure application development.
Go has changed, and so has this book. The first edition used Go 1.8;
we are now on Go 1.18. The code has been updated to reflect this new
reality. The examples have been largely developed to show a particular
feature of Go networking without forcing complexity like managing
several projects or packages scattered across the book; the associated
repository can be found here
https://github.com/Apress/network-prog-with-go-2e.
The first version of this book assumed familiarity with Go, and that
remains in this edition. We expand slightly what we are willing to
discuss in this book with the inclusion of more third-party modules,
tools, and techniques. Jan was correct to keep the focus on Go and not
to be distracted with the ecosystem at large.
If you desire to learn about implementing networking concepts with
Go, I hope this book serves you well.
As a point of comparison, what follows is Jan’s original preface,
reflecting Go in 2017.
Preface to the First Edition
It’s always fun to learn a new programming language, especially when it
turns out to be a major one. Prior to the release of Go in 2009, I was
teaching a Master’s level subject in network programming at Monash
University. It’s good to have a goal when learning a new language, but
this time, instead of building yet another wine cellar program, I decided
to orient my lecture notes around Go instead of my (then) standard
delivery vehicle of Java.
The experiment worked well: apart from the richness of the Java
libraries that Go was yet to match, all the programming examples
transferred remarkably well, and in many cases were more elegant than
the original Java programs.
This book is the result. I have updated it as Go has evolved and as
new technologies such as HTTP/2 have arisen. But if it reads like a
textbook, well, that is because it is one. There is a large body of
theoretical and practical concepts involved in network programming
and this book covers some of these as well as the practicalities of
building systems in Go.
In terms of language popularity, Go is clearly rising. It has climbed
to 16th in the TIOBE index, is 18th in the PYPL (Popularity of
Programming Language), and is 15th in the RedMonk Programming
Language rankings. It is generally rated as one of the fastest growing
languages.
There is a growing community of developers both of the core
language and libraries and of the independent projects. I have tried to
limit the scope of this book to the standard libraries only and to the
“sub-repositories” of the Go tree. While this eliminates many excellent
projects that no doubt make many programming tasks easier,
restricting the book to the official Go libraries provides a clear bound.
This book assumes a basic knowledge of Go. The focus is on using
Go to build network applications, not on the basics of the language.
Network applications are different than command-line applications, are
different than applications with a graphical user interface, and so on. So
the first chapter discusses architectural aspects of network programs.
The second chapter is an overview of the features of Go that we use in
this book. The third chapter on sockets covers the Go version of the
basics underlying all TCP/IP systems. Chapters 4, 5, and 6 are more
unusual in network programming books. They cover the topics of what
representations of data will be used, how a network interaction will
proceed, and for text, which language formats are used. Then in Chapter
7, we look at the increasingly important topic of security. In Chapter 8,
we look at one of the most common application layer protocols in use,
HTTP. The next four chapters are about topics related to HTTP and
common data formats carried above HTTP – HTML and XML. In
Chapter 13, we look at an alternative approach to network
programming, remote procedure calls. Chapters 14 and 15 consider
further aspects of network programming using HTTP.
Any source code or other supplementary material referenced by the
author in this book is available to readers on GitHub. For more detailed
information, please visit
https://github.com/Apress/network-prog-with-go-2e.
Acknowledgments
I want to share my appreciation for Jan Newmarch for collaborating on
this book. This project has offered me a tremendous sense of
achievement and allowed me to cross a much-anticipated item off my
bucket list. I would also like to thank Eldon Alameda for his thoughtful
approach at letting me know when I am off the mark and for providing
me with solid advice.
Additionally, I owe gratitude to my partners at Apress, both Steve
Anglin for the opportunity and Mark Powers for the guidance to help
see this through. Thank you to my colleagues at RX-M, including Randy
Abernethy, Christopher Hanson, Andrew Bassett, and Anita Wu. Our
work over the years has allowed for my participation in a project such
as this book.
Finally, I want to thank my wife Julie and daughter Charlotte. Julie’s
capacity to manage the world while I hide out on a computer is
unmatched and most appreciated. Charlotte’s energy, abilities, and
creativity inspire me to become better every day.
—Ronald Petty
Table of Contents
Chapter 1:Architectural Layers
Protocol Layers
ISO OSI Protocol
OSI Layers
TCP/IP Protocol
Some Alternative Protocols
Networking
Gateways
Host-Level Networking
Packet Encapsulation
Connection Models
Connection Oriented
Connectionless
Communications Models
Message Passing
Remote Procedure Call
Distributed Computing Models
Client-Server System
Client-Server Application
Server Distribution
Communication Flows
Synchronous Communication
Asynchronous Communication
Streaming Communication
Publish/Subscribe
Component Distribution
Gartner Classification
Three-Tier Models
Fat vs.Thin
Middleware Model
Middleware Examples
Middleware Functions
Continuum of Processing
Points of Failure
Acceptance Factors
Thoughts on Distributed Computing
Transparency
Access Transparency
Location Transparency
Migration Transparency
Replication Transparency
Concurrency Transparency
Scalability Transparency
Performance Transparency
Failure Transparency
Eight Fallacies of Distributed Computing
Fallacy: The Network Is Reliable
Fallacy: Latency Is Zero
Fallacy: Bandwidth Is Infinite
Fallacy: The Network Is Secure
Fallacy: Topology Doesn’t Change
Fallacy: There Is One Administrator
Fallacy: Transport Cost Is Zero
Fallacy: The Network Is Homogeneous
Conclusion
Chapter 2:Overview of the Go Language
Types
Slices and Arrays
Maps
Pointers
Functions
Structures
Methods
Multithreading
Packages
Modules
Type Conversion
Statements
GOPATH
Running Go Programs
Standard Libraries
Error Values
Conclusion
Chapter 3:Socket-Level Programming
The TCP/IP Stack
IP Datagrams
UDP
TCP
Internet Addresses
IPv4 Addresses
IPv6 Addresses
IP Address Type
Using Available Documentation and Examples
The IPMask Type
Basic Routing
The IPAddr Type
Host Canonical Name and Addresses Lookup
Services
Ports
The TCPAddr Type
TCP Sockets
TCP Client
A Daytime Server
Multithreaded Server
Controlling TCP Connections
Timeout
Staying Alive
UDP Datagrams
Server Listening on Multiple Sockets
The Conn, PacketConn, and Listener Types
Raw Sockets and the IPConn Type
Conclusion
Chapter 4:Data Serialization
Structured Data
Mutual Agreement
Self-Describing Data
Encoding Packages
ASN.1
ASN.1 Daytime Client and Server
JSON
A Client and A Server
The Gob Package
A Client and A Server
Encoding Binary Data As Strings
Protocol Buffers
Installing and Compiling Protocol Buffers
The Generated personv3.pb.go File
Using the Generated Code
Conclusion
Chapter 5:Application-Level Protocols
Protocol Design
Why Should You Worry?
Version Control
The Web
Message Format
Data Format
Byte Format
Character Format
A Simple Example
Another Random Document on
Scribd Without Any Related Topics
johtui mieleen luvaton tupakoiminen. Hän näki parhaaksi heittäytyä
lattialle ja yhtyä toisten leikkiin.
— Vai niin, vai sellaisia. Enpä minä ole ennen sellaisista kuullut.
Vaitiolo.
— Kaikillapa tietysti…
‒ Ju ‒ ju.
Miehet nauroivat.
— Sepä se.
— Markkinoistako ne miehet…?
— Miksi ei.
— Niin vain…
— Siinäpä se.
— Niin vain…
— Kuka se oli?