<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Server - 分类 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/categories/server/</link><description>Server - 分类 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Sun, 14 Sep 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/categories/server/" rel="self" type="application/rss+xml"/><item><title>server学习路线</title><link>https://rd163.visword.com/posts/server-learning-roadmap/</link><pubDate>Sun, 14 Sep 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/server-learning-roadmap/</guid><description><![CDATA[<h2 id="良好的系统设计" class="headerLink">
    <a href="#%e8%89%af%e5%a5%bd%e7%9a%84%e7%b3%bb%e7%bb%9f%e8%ae%be%e8%ae%a1" class="header-mark"></a>良好的系统设计</h2><ul>
<li><a href="https://github.com/ruanyf/weekly/blob/master/docs/issue-362.md" target="_blank" rel="noopener noreferrer">GitHub 工程师总结什么是良好的系统设计</a></li>
</ul>
<p><strong>总结如下：</strong></p>
<p>1、</p>
<p>程序设计是组装代码，系统设计是组装服务。</p>
<p>程序设计的组件是变量、函数、类等，系统设计的组件是服务器、数据库、缓存、队列、事件总线、代理等。</p>]]></description></item><item><title>trpc/brpc/grpc 协议设计对比</title><link>https://rd163.visword.com/posts/proto_disign_for_trpc_grpc_brpc/</link><pubDate>Wed, 09 Jul 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/proto_disign_for_trpc_grpc_brpc/</guid><description><![CDATA[<p>在微服务与高性能后端场景中，RPC(Remote Procedure Call，远程过程调用)框架的协议设计直接决定了吞吐、延迟、可观测性和生态兼容性。本文梳理三套具有代表性的 RPC 协议：腾讯开源的 <strong>tRPC</strong>、Apache <strong>bRPC</strong>(baidu_std)以及 Google 主导的 <strong>gRPC</strong>,从协议帧格式、通信模式和传输层三个维度做对比。</p>]]></description></item><item><title>boost.asio 网络编程</title><link>https://rd163.visword.com/posts/boost-asio-cpp-network/</link><pubDate>Tue, 03 Jun 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/boost-asio-cpp-network/</guid><description><![CDATA[<h2 id="引言" class="headerLink">
    <a href="#%e5%bc%95%e8%a8%80" class="header-mark"></a>引言</h2><p>在 C++ 后端开发领域，<strong>Boost.Asio</strong>（Asynchronous Input/Output）几乎是事实上的网络与底层 I/O 标准库。它不仅支撑了大量开源项目（如 websocketpp、cpp-httplib 的部分实现思路），也是 C++ 标准委员会 <strong>Networking TS</strong> 的原型基础。本文整理 Asio 的核心概念、设计模式以及实战要点，帮助你在写第一个高并发服务端时不踩坑。</p>]]></description></item><item><title>通知推送服务方案</title><link>https://rd163.visword.com/posts/notify-push-service/</link><pubDate>Sat, 31 May 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/notify-push-service/</guid><description>&lt;p>在服务端开发与运维场景中,常常需要把监控告警、构建结果、定时任务状态等信息以推送通知的形式实时发送到手机或桌面。直接接入各厂商的推送通道(APNs、FCM)成本较高,而第三方 SaaS 又涉及数据出境和付费问题。此时,&lt;strong>自建通知推送服务&lt;/strong>成为一种兼顾可控性与简洁性的选择。&lt;/p></description></item><item><title>HttpAPI规范及生态组件</title><link>https://rd163.visword.com/posts/http-api-spec/</link><pubDate>Wed, 19 Feb 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/http-api-spec/</guid><description><![CDATA[<h2 id="背景" class="headerLink">
    <a href="#%e8%83%8c%e6%99%af" class="header-mark"></a>背景</h2><p>随着业务的增多，越来越多的服务需要提供 HTTP 协议的 API 接口供第三方调用。由于 HTTP API 并不像 tRPC 等协议那样有一套通用的协议规范来约束接口，API 开发者通常需要提供一份独立的 API 文档来说明每个接口的详细参数。</p>]]></description></item><item><title>LLM 时代下的 AI 网关</title><link>https://rd163.visword.com/posts/gateway-for-ai/</link><pubDate>Thu, 23 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/gateway-for-ai/</guid><description><![CDATA[<h2 id="ai-网关" class="headerLink">
    <a href="#ai-%e7%bd%91%e5%85%b3" class="header-mark"></a>AI 网关</h2><p>AI Gateway（又称大模型网关、AI 网关）是位于应用与 AI/LLM 服务之间的一层流量管理组件，在开源社区已有较为成熟的技术实现。它在应用与模型服务之间承担统一入口的职责：无论调用的是预置模型还是自研模型，都可以经由网关完成路由、鉴权与调用，方便业务方在数据分析、应用开发等场景中接入 AI 能力。同时，AI 网关还提供配套工具，帮助监控模型调用性能，并为后续优化提供数据支撑。</p>]]></description></item><item><title>Auth-Wiki</title><link>https://rd163.visword.com/posts/auth-wiki/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/auth-wiki/</guid><description><![CDATA[<p>在平时做后端服务、对接第三方登录或设计权限系统时，经常会遇到 OAuth、OIDC、SAML、PKCE、JWT 这类术语。官方规范（RFC）读起来晦涩，博客文章又常常各执一词。<strong>Auth-Wiki</strong> 正是为填补这块空白而存在的开源知识库——它由 <a href="https://github.com/logto-io/logto" target="_blank" rel="noopener noreferrer">Logto</a> 团队发起维护，系统性地收录了与身份验证（Authentication）、授权（Authorization）以及身份与访问管理（IAM）相关的术语条目。</p>]]></description></item><item><title>Boinc 后台服务搭建</title><link>https://rd163.visword.com/posts/distributed-computation-boinc-server-setup/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/distributed-computation-boinc-server-setup/</guid><description><![CDATA[<h2 id="源码编译安装部署" class="headerLink">
    <a href="#%e6%ba%90%e7%a0%81%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85%e9%83%a8%e7%bd%b2" class="header-mark"></a>源码编译安装部署</h2><p>参考  <a href="https://boinc.berkeley.edu/trac/wiki/ServerIntro" target="_blank" rel="noopener noreferrer">Boinc Server搭建</a></p>
<p><strong>用户和组</strong></p>
<p>BOINC server programs 运行需要两个不同的用户账号:</p>
<ul>
<li>Web账号： 即Apache http服务需要的账号， 调度程序、文件上传以及Web程序使用该账号运行 (不同Linux发行版该账号可能不同，如 Fedora 叫：&lsquo;apache&rsquo;;  Debian 叫 &lsquo;www-data&rsquo;).</li>
<li>项目账号： 其它程序的运行，主要是任务管理程序， 该账号不建议用root， 可以用一个已经存在的用户账号或者新建一个账号，如 boincadm。</li>
</ul>
<p>创建用户</p>]]></description></item><item><title>Boinc 任务分配</title><link>https://rd163.visword.com/posts/distributed-computation-boinc-job-assign/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/distributed-computation-boinc-job-assign/</guid><description><![CDATA[<p>参考 <a href="https://github.com/BOINC/boinc/wiki/AssignedWork" target="_blank" rel="noopener noreferrer">AssignedWork</a>。</p>
<p>任务分配分两种情况：广播（Broadcast）和绑定（Targeted Jobs）。</p>
<p>先从任务提交命令说起。</p>
<div class="code-block highlight is-open show-line-numbers  tw:group tw:my-2">
  <div class="
    
    tw:flex 
    tw:flex-row
    tw:flex-1 
    tw:justify-between 
    tw:w-full tw:bg-bgColor-secondary
    ">      
    <button 
      class="
        code-block-button
        tw:mx-2 
        tw:flex
        tw:flex-row
        tw:flex-1"
      aria-hidden="true">
          <span class="tw:group-[.is-open]:rotate-90 tw:transition-[transform] tw:duration-500 tw:ease-in-out tw:print:hidden! tw:w-min tw:h-min tw:my-1 tw:mx-1"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg></span>
          <span class="tw:select-none tw:my-1! tw:block">bash</span>
      </button>

   <div class="tw:flex">
      <button 
        class="
          line-number-button
          tw:mx-2 
          tw:hidden 
          tw:group-[.is-open]:block 
          tw:group-[.show-line-numbers]:text-fgColor-link 
          tw:print:hidden!" 
        title="Toggle line numbers"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M61.77 401l17.5-20.15a19.92 19.92 0 0 0 5.07-14.19v-3.31C84.34 356 80.5 352 73 352H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h22.83a157.41 157.41 0 0 0-11 12.31l-5.61 7c-4 5.07-5.25 10.13-2.8 14.88l1.05 1.93c3 5.76 6.29 7.88 12.25 7.88h4.73c10.33 0 15.94 2.44 15.94 9.09 0 4.72-4.2 8.22-14.36 8.22a41.54 41.54 0 0 1-15.47-3.12c-6.49-3.88-11.74-3.5-15.6 3.12l-5.59 9.31c-3.72 6.13-3.19 11.72 2.63 15.94 7.71 4.69 20.38 9.44 37 9.44 34.16 0 48.5-22.75 48.5-44.12-.03-14.38-9.12-29.76-28.73-34.88zM496 224H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zm0-160H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16V80a16 16 0 0 0-16-16zm0 320H176a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h320a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM16 160h64a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H64V40a8 8 0 0 0-8-8H32a8 8 0 0 0-7.14 4.42l-8 16A8 8 0 0 0 24 64h8v64H16a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8zm-3.91 160H80a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H41.32c3.29-10.29 48.34-18.68 48.34-56.44 0-29.06-25-39.56-44.47-39.56-21.36 0-33.8 10-40.46 18.75-4.37 5.59-3 10.84 2.8 15.37l8.58 6.88c5.61 4.56 11 2.47 16.12-2.44a13.44 13.44 0 0 1 9.46-3.84c3.33 0 9.28 1.56 9.28 8.75C51 248.19 0 257.31 0 304.59v4C0 316 5.08 320 12.09 320z"/></svg></button>

      <button 
        class="
          wrap-code-button
          tw:select-none 
          tw:mx-2 
          tw:hidden 
          tw:group-[.is-open]:block 
          tw:group-[.is-wrap]:text-fgColor-link 
          tw:print:hidden!" 
        title="Toggle code wrap"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"/></svg></button>
      
      <button 
        class="
          copy-code-button
          tw:select-none
          tw:mx-2 
          tw:hidden
          tw:group-[.is-open]:block
          tw:hover:text-fgColor-link 
          tw:print:hidden!"
        title="Copy code">
          <span class="copy-icon tw:block"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z"/></svg></span>
          <span class="check-icon tw:hidden"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"/></svg></span>
      </button>
        
      <button 
        class="
          tw:select-none 
          tw:mx-2 
          tw:block 
          tw:group-[.is-open]:hidden 
          tw:print:hidden!" 
        disabled
        aria-hidden="true"><svg class="icon"
    xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M328 256c0 39.8-32.2 72-72 72s-72-32.2-72-72 32.2-72 72-72 72 32.2 72 72zm104-72c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm-352 0c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z"/></svg></button>
    </div>
  </div>
  <pre style="counter-reset: codeblock;" class="tw:block tw:m-0 tw:p-0"><code 
    id="codeblock-id-1" 
    class="
      chroma 
      tw:block! 
      tw:p-0
      tw:m-0
      tw:transition-[max-height] 
      tw:duration-500 
      tw:ease-in-out 
      tw:group-[.is-closed]:max-h-0! 
      tw:group-[.is-wrap]:text-wrap
      tw:overflow-y-hidden
      tw:overflow-x-auto
      tw:scrollbar-thin
      "><span class="line"><span class="cl">bin/create_work --appname worker --wu_name worker_nodelete input</span></span></code></pre>
</div>
<p><code>create_work</code> 的一些重要参数说明:</p>]]></description></item><item><title>Boinc 网络通信协议</title><link>https://rd163.visword.com/posts/distributed-computation-boinc-net-protocol/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/distributed-computation-boinc-net-protocol/</guid><description><![CDATA[<p>官网文档对此有简要介绍：</p>
<ul>
<li><a href="https://github.com/BOINC/boinc/wiki/CommIntro" target="_blank" rel="noopener noreferrer">网络交互概览（CommIntro）</a></li>
</ul>
<p><img class="tw:inline" loading="lazy" src='https://raw.githubusercontent.com/wiki/BOINC/boinc/comm.png'   alt="boinc-net-proto"  ></p>
<p>为了更好地观察 BOINC 客户端与服务器的通信流程，可以在客户端开启 <code>http_debug</code>、<code>http_xfer_debug</code> 调试选项。当加入新项目时，便可在日志中观察到客户端与服务器之间的通信协议内容。</p>]]></description></item></channel></rss>