万本电子书0元读

万本电子书0元读

顶部广告

Mastering ServiceStack电子书

售       价:¥

37人正在读 | 0人评论 9.8

作       者:Andreas Niedermair

出  版  社:Packt Publishing

出版时间:2015-10-28

字       数:129.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:此类商品不支持退换货,不支持下载打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Utilize ServiceStack as the rock solid foundation of your distributed systemAbout This BookTake advantage of the various data providers to access authentication and authorization, sessions, cache, and databaseLeverage asynchronous processing for decoupling components to ease scalingMonitor and tune the performance of your distributed system Who This Book Is For Mastering ServiceStack is targeted at developers who have already implemented web services with ASMX, WCF, or ServiceStack and want to gain more insight into the possibilities ServiceStack has to offer to build distributed systems of all scales.What You Will LearnDesign a prudent and resilient API, following the RESTful designUnderstand the internal processing chain and utilize the provided hooksIncorporate ServiceStack as a full service provider to your existing distributed systemLeverage the power of asynchronous processing and add message queues to your architectureAnalyze and tune the performance of your service In Detail Mastering ServiceStack covers real-life problems that occur over the lifetime of a distributed system and how to solve them by deeply understanding the tools of ServiceStack. Distributed systems is the enterprise solution that provide flexibility, reliability, scaling, and performance. ServiceStack is an outstanding tool belt to create such a system in a frictionless manner, especially sophisticated designed and fun to use. The book starts with an introduction covering the essentials, but assumes you are just refreshing, are a very fast learner, or are an expert in building web services. Then, the book explains ServiceStack's data transfer object patterns and teach you how it differs from other methods of building web services with different protocols, such as SOAP and SOA. It also introduces more low-level details such as how to extend the User Auth, message queues and concepts on how the technology works. By the end of this book, you will understand the concepts, framework, issues, and resolutions related to ServiceStack.Style and approach A step-by-step approach that follows the natural requirements of a distributed system in a conversational style.
目录展开

Mastering ServiceStack

Table of Contents

Mastering ServiceStack

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Distributed Systems and How ServiceStack Jumps in

A message-based service

The processing chains of ServiceStack

HTTP context

Message Queue context

A brief history of distributed systems

The design principles of an API

Usage convenience

Documentation

Consistency

Robustness

Authentication, authorization, and security

Problems with distributed systems

Complexity in design

A broader set of skills

Testing

Rollout

Operating overhead

Tracing

Contracts

Issues at runtime

(Un)atomicity of operations

A shared register

Performance

Summary

2. ServiceStack as Your Unique Point of Access

The IoC container

Registering dependencies

Resolving dependencies

Lifetime of objects

Disposal of objects

Initialization of instances

Custom IoC frameworks

Incorporating the IoC container in your application

The Ticket application

Domain design

The ticket model

The comment model

RESTful design

The TicketService API

The CommentService API

Data access

Functional contract testing

Sessions

Session sharing between your service and a web application

Using the ServiceStack session

Using the ASP.NET session

Cache

Caching session data

Caching responses

Authentication and authorization

Authentication providers

Authentication repository

Limiting access

Processing chain

Adding authentication and authorization to the Ticket application

Extending authentication and authorization

Sliding authentication

Extending the authentication session

Customizing the user entity

Authentication events

Creating a custom authentication provider

Provide credentials in RequestDTOs

Authorization information in the HTTP header

Summary

3. Asynchronous Communication between Components

In Memory MQ

RCON

RedisMQ

Setup

Client managers

Queues

Replying directly back to the producer

Integrate a RedisMQ client into your service

RabbitMQ

Setup

Processing chain

Replying directly back to the producer

Broadcasting a message

Integrate RabbitMQ into your service

Server-sent events

Sending messages from the server

Hooks at the client-side

Subscription events

Receiving messages

Sending messages

Server-side usage of server-sent events

Receiving messages

Sending messages

Configure ServerEventsFeature

Redis server events

Look left and right

Authentication

Filtering requests and responses

Statistics

Summary

4. Analyzing and Tuning a Distributed System

Request logging

Using another data store for your request log entries

Centralizing request logging

Tracking requests of your website

Profiling requests

Profiling self-hosted requests

Profiling database requests

Adding custom steps for fine-grained profiling

Centralizing request profiling

Minimizing the footprint of HTTP requests

Batching requests

Customizing automatic batching

Implementing a RequestDTO to represent a collection

Compressing requests

Compressing responses

Adding MessagePack format

Adding Protobuf format

Accessing information provided by RequestInfoFeature

Summary

5. Documentation and Versioning

Metadata page

Extending the documentation of an operation

Configuring the Metadata page

Customizing templates

HtmlFormat.html

IndexOperations.html

OperationControl.html

Type generator

Querying your service with Swagger

Querying your service with Postman

Versioning requests

Validating your requests

Querying the registered ValdationRules with an API

Summary

6. Extending ServiceStack

Writing your own plugin

Intercepting requests and responses

Registering new services and endpoints

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部