Modern Systems Programming with Scala Native: Write Lean, High-Performance Code without the JVM
暫譯: 使用 Scala Native 的現代系統程式設計:撰寫精簡、高效能的程式碼而不依賴 JVM

Richard Whaling

  • 出版商: Pragmatic Bookshelf
  • 出版日期: 2020-03-03
  • 定價: $1,575
  • 售價: 8.8$1,386
  • 語言: 英文
  • 頁數: 230
  • 裝訂: Paperback
  • ISBN: 1680506226
  • ISBN-13: 9781680506228
  • 相關分類: JVM 語言
  • 立即出貨 (庫存 < 3)

相關主題

商品描述

Access the power of bare-metal systems programming with Scala Native, an ahead-of-time Scala compiler. Without the baggage of legacy frameworks and virtual machines, Scala Native lets you re-imagine how your programs interact with your operating system. Compile Scala code down to native machine instructions; seamlessly invoke operating system APIs for low-level networking and IO; control pointers, arrays, and other memory management techniques for extreme performance; and enjoy instant start-up times. Skip the JVM and improve your code performance by getting close to the metal.

Developers generally build systems on top of the work of those who came before, accumulating layer upon layer of abstraction. Scala Native provides a rare opportunity to remove layers. Without the JVM, Scala Native uses POSIX and ANSI C APIs to build concise, expressive programs that run unusually close to bare metal. Scala Native compiles Scala code down to native machine instructions instead of JVM bytecode. It starts up fast, without the sluggish warm-up phase that's common for just-in-time compilers. Scala Native programs can seamlessly invoke operating system APIs for low-level networking and IO. And Scala Native lets you control pointers, arrays, and other memory layout types for extreme performance.

Write practical, bare-metal code with Scala Native, step by step. Understand the foundations of systems programming, including pointers, arrays, strings, and memory management. Use the UNIX socket API to write network client and server programs without the sort of frameworks higher-level languages rely on. Put all the pieces together to design and implement a modern, asynchronous microservice-style HTTP framework from scratch.

Take advantage of Scala Native's clean, modern syntax to write lean, high-performance code without the JVM.

What You Need:

A modern Windows, Mac OS, or Linux system capable of running Docker. All code examples in the book are designed to run on a portable Docker-based build environment that runs anywhere. If you don't have Docker yet, see the Appendix for instructions on how to get it.

商品描述(中文翻譯)

存取 Scala Native 的裸金屬系統程式設計能力,這是一個提前編譯的 Scala 編譯器。無需舊有框架和虛擬機的負擔,Scala Native 讓你重新想像程式如何與作業系統互動。將 Scala 代碼編譯為原生機器指令;無縫調用作業系統 API 以進行低層次的網路和 I/O;控制指標、陣列及其他記憶體管理技術以獲得極致性能;並享受即時啟動時間。跳過 JVM,透過接近硬體來提升你的代碼性能。

開發者通常在前人的工作基礎上構建系統,累積一層又一層的抽象。Scala Native 提供了一個難得的機會來移除這些層次。沒有 JVM,Scala Native 使用 POSIX 和 ANSI C API 來構建簡潔、表達力強的程式,這些程式運行得異常接近裸金屬。Scala Native 將 Scala 代碼編譯為原生機器指令,而不是 JVM 位元組碼。它啟動迅速,沒有即時編譯器常見的緩慢預熱階段。Scala Native 程式可以無縫調用作業系統 API 以進行低層次的網路和 I/O。而且 Scala Native 讓你控制指標、陣列及其他記憶體佈局類型,以獲得極致性能。

逐步使用 Scala Native 編寫實用的裸金屬代碼。理解系統程式設計的基礎,包括指標、陣列、字串和記憶體管理。使用 UNIX socket API 編寫網路客戶端和伺服器程式,而不依賴高階語言所依賴的框架。將所有組件整合在一起,從零開始設計和實現一個現代的非同步微服務風格的 HTTP 框架。

利用 Scala Native 的乾淨、現代語法,編寫精簡、高效能的代碼,而無需 JVM。

你需要的:

一個現代的 Windows、Mac OS 或 Linux 系統,能夠運行 Docker。本書中的所有代碼範例都設計為可以在任何地方運行的可攜式基於 Docker 的構建環境中運行。如果你還沒有 Docker,請參見附錄以獲取安裝說明。