forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture overview
mythz edited this page Jun 30, 2012
·
26 revisions
Ultimately behind-the-scenes ServiceStack is just built on top of a set of Raw ASP.NET IHttpHandler's. The entry point for all ASP.NET and HttpListener requests is in the ServiceStackHttpHandlerFactory whose purpose is to return the appropriate IHttpHandler for the incoming request.
ServiceStack's logical architecture is captured below:
There are 2 distinct modes in any ServiceStack application:
- AppHost Setup and Configuration - Only done once for all services. Run only once on App StartUp.
- Runtime - Run on every request: uses dependencies, plugins, etc. defined in the AppHost. Each new request re-binds all IOC dependencies to a new service instance which gets disposed at the end of each request.
The implementation of this can be visualized below:
After the IHttpHandler is returned, it gets executed with the current ASP.NET or HttpListener request wrapped in a common IHttpRequest instance.
The implementation of RestHandler shows what happens during a typical ServiceStack request:
- Why ServiceStack?
- What is a message based web service?
- Advantages of message based web services
- Why remote services should use separate DTOs
- Getting Started
- Reference
- Clients
- Formats
- View Engines 4. Razor & Markdown Razor
- Hosts
- Advanced
- Configuration options
- Access HTTP specific features in services
- Logging
- Serialization/deserialization
- Request/response filters
- Filter attributes
- Concurrency Model
- Built-in caching options
- Built-in profiling
- Messaging and Redis
- Form Hijacking Prevention
- Auto-Mapping
- HTTP Utils
- Virtual File System
- Config API
- Physical Project Structure
- Modularizing Services
- Plugins
- Tests
- Other Languages
- Use Cases
- Performance
- How To
- Future