Cover image for Hands-On Microservices with Rust : Build, Test, and Deploy Scalable and Reactive Microservices with Rust 2018.
Hands-On Microservices with Rust : Build, Test, and Deploy Scalable and Reactive Microservices with Rust 2018.
ISBN:
9781789341980
Title:
Hands-On Microservices with Rust : Build, Test, and Deploy Scalable and Reactive Microservices with Rust 2018.
Author:
Kolodin, Denis.
Personal Author:
Publication Information:
Birmingham : Packt Publishing Ltd, 2019.
Physical Description:
1 online resource (511 pages)
General Note:
Chapter 4: Data Serialization and Deserialization with the Serde Crate
Contents:
Cover; Title Page; Copyright and Credits; About Packt; Contributors; Table of Contents; Preface; Chapter 1: Introduction to Microservices; Technical requirements; What are microservices?; Why we need microservices; How to deploy a microservice; Docker; Continuous Integration; How to split a traditional server into multiple microservices; Reasons to avoid monoliths; Impossible to scale vertically; Impossible to update and deploy only one feature; The failure of one server affects all features; Breaking a monolithic service into pieces; Definition of a REST API; User registration microservice

E-mail notifications microserviceProduct catalog microservice; Shopping cart microservice; Payment Integration microservice; Statistics collecting microservice; Transformation to microservices; Reusing existing microservices; Why Rust is a great tool for creating microservices; Explicit versus implicit; Minimal amount of runtime errors; Great performance; Minimal dependencies burden; Summary; Further reading; Chapter 2: Developing a Microservice with the Hyper Crate; Technical requirements; Binding a Tiny Server; Adding necessary dependencies; The main function of the server

Address of the serverServer instances; Setting the requests handler; Adding the server instance to a runtime; Building and running; Rebuilding on changes; Handling incoming requests; Adding a service function; Implementing a service function; Index pages; Implementing the REST principles; Adding a shared state; Accessing a shared state from a service function; Parsing paths in a microservice; Implementing REST methods; Extracting the user's identifier; Getting access to the shared data; REST methods; POST -- Creating data; GET -- Reading data; PUT -- Updating data; DELETE -- Deleting data

Routing advanced requestsDefining paths with regular expressions; Adding the necessary dependencies; Writing regular expressions; Path for index page; Path for user management; Path for the users list; Matching expressions; Summary; Chapter 3: Logging and Configuring Microservice; Technical requirements; Adding logging to a microservice; Random-value-generating microservices; The log crate; Loggers; Log levels; Logging messages; Custom level of messages; Checking logging is enabled; Own target; Using logging; Configuring a logger with variables; RUST_LOG; RUST_LOG_STYLE

Changing the RUST_LOG variable to your ownReading environment variables; Standard library; Using the .env file; Using the dotenv crate; Adding variables to the .env file; Parsing command-line arguments; Using the clap crate; Adding dependencies; Building a parser; Reading arguments; Usage; How to add subcommands; Reading the configuration from file; Adding the TOML config; Adding dependencies; Declaring a struct for configuration; Reading the configuration file; Joining all values by a priority; Creating and using the configuration file; Summary
Local Note:
eBooks on EBSCOhost
Format:
Electronic Resources
Publication Date:
2019
Publication Information:
Birmingham : Packt Publishing Ltd, 2019.