Commit 789e426c authored by Savorboard's avatar Savorboard

Add new chinese document menus

parent 14c90044
# License
**MIT License**
Copyright © 2016 - 2019 Savorboard
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
# 消息
\ No newline at end of file
# Sagas
\ No newline at end of file
# 序列化
\ No newline at end of file
# 升级指导
\ No newline at end of file
# 贡献
One of the easiest ways to contribute is to participate in discussions and discuss issues.
If you have any question or problems, please report them on the CAP repository:
<a href="https://github.com/dotnetcore/cap/issues/new"><button data-md-color-primary="purple"><i class="fa fa-github fa-2x"></i> Report Issue</button></a>
<a href="https://github.com/dotnetcore/cap/issues"><button data-md-color-primary="purple" type="submit"> Active Issues <i class="fa fa-github fa-2x"></i></button></a>
## Submitting Changes
You can also contribute by submitting pull requests with code changes.
>
Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before the changes are merged into the repository.
## Additional Resources
* [Filtering issues and pull requests](https://help.github.com/articles/filtering-issues-and-pull-requests/)
* [Using search to filter issues and pull requests](https://help.github.com/articles/using-search-to-filter-issues-and-pull-requests/)
\ No newline at end of file
# 介绍
CAP 是一个EventBus,同时也是一个在微服务或者SOA系统中解决分布式事务问题的一个框架。它有助于创建可扩展,可靠并且易于更改的微服务系统。
在微软的 [eShopOnContainer](https://github.com/dotnet-architecture/eShopOnContainers) 微服务示例项目中,推荐使用 CAP 作为生产环境可用的 EventBus。
!!! question "什么是 EventBus?"
An Eventbus is a mechanism that allows different components to communicate with each other without knowing about each other. A component can send an Event to the Eventbus without knowing who will pick it up or how many others will pick it up. Components can also listen to Events on an Eventbus, without knowing who sent the Events. That way, components can communicate without depending on each other. Also, it is very easy to substitute a component. As long as the new component understands the Events that are being sent and received, the other components will never know.
相对于其他的 Service Bus 或者 Event Bus, CAP 拥有自己的特色,它不要求使用者发送消息或者处理消息的时候实现或者继承任何接口,拥有非常高的灵活性。我们一直坚信约定大于配置,所以CAP使用起来非常简单,对于新手非常友好,并且拥有轻量级。
CAP 采用模块化设计,具有高度的可扩展性。你有许多选项可以选择,包括消息队列,存储,序列化方式等,系统的许多元素内容可以替换为自定义实现。
## 相关视频
[Video: bilibili 教程](https://www.bilibili.com/video/av31582401/)
[Video: Youtube 教程](https://youtu.be/K1e4e0eddNE)
[Video: 腾讯视频教程](https://www.cnblogs.com/savorboard/p/7243609.html)
## 相关文章
[Article: CAP 介绍及使用](http://www.cnblogs.com/savorboard/p/cap.html)
[Article: CAP 2.5 版本中的新特性](https://www.cnblogs.com/savorboard/p/cap-2-5.html)
[Article: CAP 2.4 版本中的新特性](http://www.cnblogs.com/savorboard/p/cap-2-4.html)
[Article: CAP 2.3 版本中的新特性用](http://www.cnblogs.com/savorboard/p/cap-2-3.html)
[Article: .NET Core Community 首个千星项目诞生:CAP](https://www.cnblogs.com/forerunner/p/ncc-cap-with-over-thousand-stars.html)
# 快速开始
了解如何使用 CAP 构建微服务事件总线架构,它比直接集成消息队列提供了哪些优势,它提供了哪些开箱即用的功能。
## 安装
```powershell
PM> Install-Package DotNetCore.CAP
```
## 在 Asp.Net Core 中集成
以便于快速启动,我们使用基于内存的事件存储和消息队列。
```powershell
PM> Install-Package DotNetCore.CAP.InMemoryStorage
PM> Install-Package Savorboard.CAP.InMemoryMessageQueue
```
`Startup.cs` 中,添加以下配置:
```c#
public void ConfigureServices(IServiceCollection services)
{
services.AddCap(x =>
{
x.UseInMemoryStorage();
x.UseInMemoryMessageQueue();
});
}
```
## 发送消息
```c#
public class PublishController : Controller
{
[Route("~/send")]
public IActionResult SendMessage([FromService]ICapPublisher capBus)
{
capBus.Publish("test.show.time", DateTime.Now);
return Ok();
}
}
```
## 处理消息
```C#
public class ConsumerController : Controller
{
[NonAction]
[CapSubscribe("test.show.time")]
public void ReceiveMessage(DateTime time)
{
Console.WriteLine("message time is:" + time);
}
}
```
## 摘要
相对于直接集成消息队列,异步消息传递最强大的优势之一是可靠性,系统的一个部分中的故障不会传播,也不会导致整个系统崩溃。 在 CAP 内部会将消息进行存储,以保证消息的可靠性,并配合重试等策略以达到各个服务之间的数据最终一致性。
\ No newline at end of file
# Consul
\ No newline at end of file
# Dashboard
\ No newline at end of file
# Diagnostics
\ No newline at end of file
# 健康检查
\ No newline at end of file
# Metrics
\ No newline at end of file
# 基本
\ No newline at end of file
# In-Memory Storage
\ No newline at end of file
# MongoDB
\ No newline at end of file
# MySQL
\ No newline at end of file
# Postgre SQL
\ No newline at end of file
# SQLServer
\ No newline at end of file
# FAQ
\ No newline at end of file
# Github 上的示例
\ No newline at end of file
# Azure Service Bus
\ No newline at end of file
# 基本
\ No newline at end of file
# In-Memory Message Queue
\ No newline at end of file
# Kafka
\ No newline at end of file
# RabbitMQ
\ No newline at end of file
# Project information
site_name: CAP
site_name: CAP Document
site_url: http://cap.dotnetcore.xyz
site_description: Project documentation with Markdown.
site_author: CAP Team
repo_name: 'GitHub'
repo_url: 'https://github.com/dotnetcore/cap'
repo_url: 'https://github.com/dotnetcore/CAP'
docs_dir: 'content'
......@@ -13,7 +13,6 @@ docs_dir: 'content'
copyright: Copyright &copy; 2017 <a href="https://github.com/dotnetcore">.NET Core Community</a>, Maintained by the <a href="/about/contact-us/#cap-team">CAP Team</a>.
#theme: material
theme:
name: 'material'
......@@ -34,7 +33,7 @@ theme:
extra:
social:
- type: 'github'
link: 'https://github.com/dotnetcore/cap'
link: 'https://github.com/dotnetcore/CAP'
- type: 'twitter'
link: 'https://twitter.com/ncc_community'
- type: 'weibo'
......@@ -72,26 +71,57 @@ markdown_extensions:
custom_checkbox: true
- pymdownx.tilde
# nav:
# - Home: index.md
# - User Guide:
# - Getting Started: user-guide/getting-started.md
# - API Interface: user-guide/api-interface.md
# - Configuration: user-guide/configuration.md
# - Design Principle: user-guide/design.md
# - Implementation Mechanisms: user-guide/implementation.md
# - Distributed Transactions: user-guide/transaction.md
# - FAQ: user-guide/faq.md
# - 使用指南:
# - 快速开始: user-guide-cn/getting-started.md
# - API 接口: user-guide-cn/api-interface.md
# - 配置: user-guide-cn/configuration.md
# - 设计原理: user-guide-cn/design-principle.md
# - 实现: user-guide-cn/implementation.md
# - 分布式事务: user-guide-cn/transactions.md
# - FAQ: user-guide-cn/faq.md
# - About:
# - Release Notes: about/release-notes.md
# - Contributing: about/contributing.md
# - Contact Us: about/contact-us.md
# - License: about/license.md
nav:
- Home: index.md
- User Guide:
- Getting Started: user-guide/getting-started.md
- API Interface: user-guide/api-interface.md
- Configuration: user-guide/configuration.md
- Design Principle: user-guide/design.md
- Implementation Mechanisms: user-guide/implementation.md
- Distributed Transactions: user-guide/transaction.md
- FAQ: user-guide/faq.md
- 使用指南:
- 快速开始: user-guide-cn/getting-started.md
- API 接口: user-guide-cn/api-interface.md
- 配置: user-guide-cn/configuration.md
- 设计原理: user-guide-cn/design-principle.md
- 实现: user-guide-cn/implementation.md
- 分布式事务: user-guide-cn/transactions.md
- FAQ: user-guide-cn/faq.md
- About:
- Release Notes: about/release-notes.md
- Contributing: about/contributing.md
- Contact Us: about/contact-us.md
- License: about/license.md
\ No newline at end of file
- Getting Stared:
- Quick Start: user-guide/cn/getting-started/quick-start.md
- Introduction: user-guide/cn/getting-started/introduction.md
- Contributing: user-guide/cn/getting-started/contributing.md
- CAP:
- Configuration: user-guide/cn/cap/configuration.md
- Messaging: user-guide/cn/cap/messaging.md
- Sagas: user-guide/cn/cap/sagas.md
- Serialization: user-guide/cn/cap/serialization.md
- Transactions: user-guide/cn/cap/transactions.md
- Idempotence: user-guide/cn/cap/idempotence.md
- Upgrade Guides: user-guide/cn/cap/upgrade-guides.md
- License: user-guide/cn/cap/license.md
- Transports:
- General: user-guide/cn/transports/general.md
- RabbitMQ: user-guide/cn/transports/rabbitmq.md
- Kafka: user-guide/cn/transports/kafka.md
- Azure Service Bus: user-guide/cn/transports/azure-service-bus.md
- In-Memory Message Queue: user-guide/cn/transports/in-memory-queue.md
- Persistent:
- General: user-guide/cn/persistent/general.md
- SQL Server: user-guide/cn/persistent/sqlserver.md
- MySQL: user-guide/cn/persistent/mysql.md
- PostgreSql: user-guide/cn/persistent/postgresql.md
- MongoDB: user-guide/cn/persistent/mongodb.md
- In-Memory: user-guide/cn/persistent/in-memory-storage.md
- Samples:
- Github: user-guide/cn/samples/github.md
- eShopOnContainers: user-guide/cn/samples/eshoponcontainers.md
- FAQ: user-guide/cn/samples/faq.md
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment