售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜