The Ultimate Guide To Building Database-Intensive Apps with Go

  • 0.00
  • Просмотров: 3

Описание книги

Congratulations! You’ve discovered the ultimate resource for writing database-intensive applications in the Go programming language. What is Go, and who uses it? Go is a modern language in the C family. It is elegant, simple, and clear, making it maintainable. It includes a garbage collector to manage memory for you. Its built-in features make it easy to write concurrent programs. These include goroutines, which you can think of as lightweight threads, and mechanisms to communicate amongst goroutines. At the same time, Go is strongly typed and compiles to self-contained binaries free of external dependencies, and is high-performance and efficient in terms of CPU and memory usage. Using Go to access databases brings you all the benefits of Go itself, plus an elegant database interface and a vibrant community of users and developers writing high-quality, open-source database drivers for you to use. Go’s database/sql library has excellent documentation and source code but leaves a lot of learning to the user. Fortunately, you’ve found this book, which will save you time and mistakes! This book has years of collected wisdom from many experienced programmers, distilled to just what you need to know, when you need to know it. Go is an excellent choice for systems programming, where you might otherwise choose Java, C or C++ for performance reasons. And it’s not a stretch to say that Go is one of the main languages of cloud computing, with a strong presence in distributed systems and microservices architectures. Here are some key use cases for choosing Go: ● Building high performance networked applications. Go is great for building API servers, microservices, and all types of HTTP services among other things. It’s not limited to HTTP, of course, it’s equally capable of speaking protocols like RPC and interchanging data in every format you can think of. ● Building heavy-duty systems applications. A number of databases—including distributed high-performance databases—have been written in Go recently. In decades past, most of those would have been written in C or C++. ● Cloud migrations. A lot of companies undertake a rewrite at the same time they move to the cloud, instead of just lift-and-shift. Go is a popular language for this because of its simplicity, making it highly productive. A common joke is that you get a Go programmer by letting a Java programmer use Go and they never want to write in any other language again. ● Anywhere high-throughput, high-concurrency, low-latency, low-variability performance is desired for great customer experience. This typically is a good fit for applications whose workload is directly user-facing at scale, where real people are expecting interactive responsiveness from your application, and will be dissatisfied otherwise. Go is also popular for tasks where you would otherwise use dynamic scripting languages such as Python and Ruby, which give you simplicity, clarity and flexibility but not high performance. Go gives you many of the best features of these languages, and some properties not present in any of them. We use Go extensively at VividCortex. It’s the language that powers all of our publicand internal-facing services, which typically speak either HTTP or RPC to communicate with each other, and ingest more than half a billion data points a minute—and growing fast. It also powers our distributed time series database, a custom-built backend database that uses MySQL under the hood as a storage engine. And we use it for lots of utilities too, such as programs to take backups. Go includes a standard library of code for tasks such as encryption, networking, filesystem access, and database access. The database access library is called database/sql , and like the rest of Go, is elegant and minimal, with just enough batteries included. It does heavy lifting and repetitive tasks for you, such as connection pooling and retries on errors. But it doesn’t bury its internals in abstractions, so your code remains explicit and magic-free. Congratulations on choosing Go and database/sql , and on finding this book, which covers up to Go version 1.12. Let’s get started right away!
читать полностью

Подробная информация

  • Год издания: 2019
  • Дата поступления: 28.04.2021
The Ultimate Guide To Building Database-Intensive Apps with Go
  • 0.00
  • Количество оценок: 0
  • Просмотров: 3
Оцените книгу