Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add rpc demo about ctrip #31

Merged
merged 1 commit into from
Oct 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion content/zh/docs/Concepts/rpc-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ description: >
* Service A 为服务调用方, Service B 为服务被调用方
* Service A 通过 Capa SDK 发起对 Service B 的服务调用
* Capa RPC API 是统一的 API 规范
* RPC Call 为 Service B 所支持的 RPC SDK ,例如 AWS App Mesh Api
* RPC Call 为 Service B 所支持的 RPC 调用方式 ,例如 AWS App Mesh Api

## API 设计

Expand Down
9 changes: 2 additions & 7 deletions content/zh/docs/Examples/RPC/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ title: "RPC API示例"
linkTitle: "RPC API示例"
date: 2017-01-05
description: >
A short lead description about this section page. Text here can also be **bold** or _italic_ and can even be split over multiple paragraphs.
RPC API 的Demo示例
---

{{% pageinfo %}}
This is a placeholder page. Replace it with your own content.
{{% /pageinfo %}}


This is the section landing page.
[RPC API 设计文档](https://reactivegroup.github.io/capa.io/docs/concepts/rpc-design/)

34 changes: 27 additions & 7 deletions content/zh/docs/Examples/RPC/rpc-ctrip-example.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,36 @@
---
categories: ["Getting Started"]
tags: ["sample", "docs"]

title: "RPC Ctrip-Service Mesh示例"
linkTitle: "RPC Ctrip-Service Mesh示例"
date: 2021-10-15
description: >
使用RPC API进行远程调用.
使用RPC API 在携程的 Service Mesh 中进行远程调用.
---

{{% pageinfo %}}
This is a placeholder page. Replace it with your own content.
{{% /pageinfo %}}
## 调用逻辑
下图为 Capa 的 RPC 在携程的 Service Mesh 服务调用逻辑

![](https://raw.githubusercontent.com/reactivegroup/capa.io/master/content/images/zh/docs/Example/RPC/rpc_invoke_in_ctrip.png)

* Service A 为服务调用方, Service B 为服务被调用方
* Service A 通过 Capa SDK 发起对 Service B 的服务调用
* Capa RPC API 是统一的 API 规范
* Ctrip RPC Call 是 携程 Service Mesh 支持的 RPC 调用

## 实现步骤
1. 实现 [RpcServiceOptions](https://github.com/reactivegroup/capa/blob/master/sdk-spi/src/main/java/group/rxcloud/capa/spi/config/RpcServiceOptions.java) (实际 RPC 调用需要的参数) 和 [CtripSpiOptionsLoader](https://github.com/reactivegroup/capa/blob/master/sdk-spi/src/main/java/group/rxcloud/capa/spi/config/CapaSpiOptionsLoader.java) (加载 RpcServiceOptions 的实现类) 接口。

例如 CtripRpcServiceOptions 和 CtripSpiOptionsLoader

2. 继承 [CapaSerializeHttpSpi](https://github.com/reactivegroup/capa/blob/master/sdk-spi/src/main/java/group/rxcloud/capa/spi/http/CapaSerializeHttpSpi.java) , 实现在携程 Service Mesh 的 RPC 调用。

例如 CtripCapaHttp

3. 构建 capa-component.properties 文件,添加 group.rxcloud.capa.component.http.CapaHttp 和 group.rxcloud.capa.spi.config.CapaSpiOptionsLoader 对应的类的路径,以支持 SPI 方式加载对应的类。

TODO
例如:
```
group.rxcloud.capa.component.http.CapaHttp=com.ctrip.ibu.capa.spi.ctrip.http.CtripCapaHttp
group.rxcloud.capa.spi.config.CapaSpiOptionsLoader=com.ctrip.ibu.capa.spi.ctrip.config.CtripSpiOptionsLoader
```

6 changes: 3 additions & 3 deletions content/zh/docs/Examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ linkTitle: "Demo示例"
weight: 3
date: 2017-01-05
description: >
See your project in action!
Demo示例
---

{{% pageinfo %}}
This is a placeholder page that shows you how to use this template site.
感谢您对Capa的支持!
{{% /pageinfo %}}

Do you have any example **applications** or **code** for your users in your repo or elsewhere? Link to your examples here.



248 changes: 246 additions & 2 deletions docs/404.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,246 @@
<!doctype html><html lang=zh class=no-js><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=generator content="Hugo 0.83.1"><meta name=ROBOTS content="INDEX, FOLLOW"><link rel="shortcut icon" href=/capa.io/favicons/favicon.ico><link rel=apple-touch-icon href=/capa.io/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/capa.io/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/capa.io/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/capa.io/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/capa.io/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/capa.io/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/capa.io/favicons/android-96x96.png sizes=96x96><link rel=icon type=image/png href=/capa.io/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/capa.io/favicons/android-192x192.png sizes=192x192><title>404 Page not found | Capa</title><meta name=description content><meta property="og:title" content="404 Page not found"><meta property="og:description" content="Cloud Runtimes API"><meta property="og:type" content="website"><meta property="og:url" content="https://reactivegroup.github.io/capa.io/404.html"><meta property="og:site_name" content="Capa"><meta itemprop=name content="404 Page not found"><meta itemprop=description content="Cloud Runtimes API"><meta name=twitter:card content="summary"><meta name=twitter:title content="404 Page not found"><meta name=twitter:description content="Cloud Runtimes API"><link rel=preload href=/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css as=style><link href=/capa.io/scss/main.min.fc772cda7b2f36c33aace594196159bf170a54e1c5ef5d872213e30171818ee3.css rel=stylesheet integrity><script src=https://code.jquery.com/jquery-3.5.1.min.js integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin=anonymous></script><script type=application/javascript>var doNotTrack=!1;doNotTrack||(window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga('create','UA-00000000-0','auto'),ga('send','pageview'))</script><script async src=https://www.google-analytics.com/analytics.js></script></head><body class=td-404><header><nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar"><a class=navbar-brand href=/capa.io/><span class=navbar-logo></span><span class="text-uppercase font-weight-bold">Capa</span></a><div class="td-navbar-nav-scroll ml-md-auto" id=main_navbar><ul class="navbar-nav mt-2 mt-lg-0"><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/capa.io/about/><span>关于</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/capa.io/docs/><span>文档</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/capa.io/blog/><span>博客</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/capa.io/community/><span>社区</span></a></li><li class="nav-item dropdown mr-4 d-none d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>简体中文</a><div class=dropdown-menu aria-labelledby=navbarDropdownMenuLink><a class=dropdown-item href=/capa.io/en/>English</a></div></li></ul></div><div class="navbar-nav d-none d-lg-block"><input type=search class="form-control td-search-input" placeholder="&#xf002; 站内搜索…" aria-label=站内搜索… autocomplete=off></div></nav></header><div class="container-fluid td-default td-outer"><main role=main class=td-main><main id=main><div><h1 id=title>Not found</h1><p>Oops! This page doesn't exist. Try going back to our <a href=/capa.io/>home page</a>.</p><p>You can learn how to make a 404 page like this in <a href=https://gohugo.io/templates/404/>Custom 404 Pages</a>.</p></div></main></main><footer class="bg-dark py-5 row d-print-none"><div class="container-fluid mx-sm-5"><div class=row><div class="col-6 col-sm-4 text-xs-center order-sm-2"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="User mailing list" aria-label="User mailing list"><a class=text-white target=_blank rel=noopener href=https://github.com/reactivegroup aria-label="User mailing list"><i class="fa fa-envelope"></i></a></li></ul></div><div class="col-6 col-sm-4 text-right text-xs-center order-sm-3"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=GitHub aria-label=GitHub><a class=text-white target=_blank rel=noopener href=https://github.com/reactivegroup aria-label=GitHub><i class="fab fa-github"></i></a></li></ul></div><div class="col-12 col-sm-4 text-center py-2 order-sm-2"><small class=text-white>&copy; 2021 The Capa Authors All Rights Reserved</small>
<small class=ml-1><a href=https://policies.google.com/privacy target=_blank rel=noopener>隐私政策</a></small><p class=mt-2><a href=/capa.io/about/>About Capa</a></p></div></div></div></footer></div><script src=https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js integrity=sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN crossorigin=anonymous></script><script src=https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js integrity=sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF crossorigin=anonymous></script><script src=/capa.io/js/tabpane-persist.js></script><script src=/capa.io/js/main.min.c30c86b73d90a0180556503734816437e56f9d02c4939409d2766a99c0d89b4c.js integrity="sha256-wwyGtz2QoBgFVlA3NIFkN+VvnQLEk5QJ0nZqmcDYm0w=" crossorigin=anonymous></script></body></html>
<!doctype html>
<html lang="zh" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="generator" content="Hugo 0.88.1" /><META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">


<link rel="shortcut icon" href="/capa.io/favicons/favicon.ico" >
<link rel="apple-touch-icon" href="/capa.io/favicons/apple-touch-icon-180x180.png" sizes="180x180">
<link rel="icon" type="image/png" href="/capa.io/favicons/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/capa.io/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/capa.io/favicons/android-36x36.png" sizes="36x36">
<link rel="icon" type="image/png" href="/capa.io/favicons/android-48x48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/capa.io/favicons/android-72x72.png" sizes="72x72">
<link rel="icon" type="image/png" href="/capa.io/favicons/android-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/capa.io/favicons/android-144x144.png" sizes="144x144">
<link rel="icon" type="image/png" href="/capa.io/favicons/android-192x192.png" sizes="192x192">

<title>404 Page not found | Capa</title>



<meta name="description" content="">
<meta property="og:title" content="404 Page not found" />
<meta property="og:description" content="Cloud Runtimes API" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://reactivegroup.github.io/capa.io/404.html" /><meta property="og:site_name" content="Capa" />

<meta itemprop="name" content="404 Page not found">
<meta itemprop="description" content="Cloud Runtimes API"><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="404 Page not found"/>
<meta name="twitter:description" content="Cloud Runtimes API"/>




<link rel="preload" href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" as="style">
<link href="/capa.io/scss/main.min.bd5285b713d3061549a6bfd34e5f4ec6775ede36672a3088260f0d420050647f.css" rel="stylesheet" integrity="">


<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>







<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-00000000-0', 'auto');

ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>




</head>
<body class="td-404">
<header>

<nav class="js-navbar-scroll navbar navbar-expand navbar-dark flex-column flex-md-row td-navbar">
<a class="navbar-brand" href="/capa.io/">
<span class="navbar-logo"></span><span class="text-uppercase font-weight-bold">Capa</span>
</a>
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
<ul class="navbar-nav mt-2 mt-lg-0">


<li class="nav-item mr-4 mb-2 mb-lg-0">








<a class="nav-link" href="/capa.io/about/" ><span>关于</span></a>
</li>

<li class="nav-item mr-4 mb-2 mb-lg-0">








<a class="nav-link" href="/capa.io/docs/" ><span>文档</span></a>
</li>

<li class="nav-item mr-4 mb-2 mb-lg-0">








<a class="nav-link" href="/capa.io/blog/" ><span>博客</span></a>
</li>

<li class="nav-item mr-4 mb-2 mb-lg-0">








<a class="nav-link" href="/capa.io/community/" ><span>社区</span></a>
</li>



<li class="nav-item dropdown mr-4 d-none d-lg-block">


<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
简体中文
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">

<a class="dropdown-item" href="/capa.io/en/">English</a>

</div>
</li>

</ul>
</div>
<div class="navbar-nav d-none d-lg-block">
<input type="search" class="form-control td-search-input" placeholder="&#xf002; 站内搜索…" aria-label="站内搜索…" autocomplete="off">

</div>
</nav>

</header>
<div class="container-fluid td-default td-outer">
<main role="main" class="td-main">

<main id="main">
<div>
<h1 id="title">Not found</h1>
<p>Oops! This page doesn't exist. Try going back to our <a href="/capa.io/">home page</a>.</p>

<p>You can learn how to make a 404 page like this in <a href="https://gohugo.io/templates/404/">Custom 404 Pages</a>.</p>
</div>
</main>

</main>

<footer class="bg-dark py-5 row d-print-none">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">



<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="User mailing list" aria-label="User mailing list">
<a class="text-white" target="_blank" rel="noopener" href="https://github.com/reactivegroup" aria-label="User mailing list">
<i class="fa fa-envelope"></i>
</a>
</li>

</ul>



</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">



<ul class="list-inline mb-0">

<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="GitHub" aria-label="GitHub">
<a class="text-white" target="_blank" rel="noopener" href="https://github.com/reactivegroup" aria-label="GitHub">
<i class="fab fa-github"></i>
</a>
</li>

</ul>



</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<small class="text-white">&copy; 2021 The Capa Authors All Rights Reserved</small>
<small class="ml-1"><a href="https://policies.google.com/privacy" target="_blank" rel="noopener">隐私政策</a></small>

<p class="mt-2"><a href="/capa.io/about/">About Capa</a></p>

</div>
</div>
</div>
</footer>


</div>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.min.js" integrity="sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF" crossorigin="anonymous"></script>





<script src='/capa.io/js/tabpane-persist.js'></script>

















<script src="/capa.io/js/main.min.c30c86b73d90a0180556503734816437e56f9d02c4939409d2766a99c0d89b4c.js" integrity="sha256-wwyGtz2QoBgFVlA3NIFkN&#43;VvnQLEk5QJ0nZqmcDYm0w=" crossorigin="anonymous"></script>




</body>
</html>
Binary file added docs/_print/en/about/featured-background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading