Coder Social home page Coder Social logo

incubator-brpc-website's Introduction

Apache bRPC Website

This project keeps all sources used for building up Apache bRPC website which's served at https://brpc.apache.org.

Overview

The Apache bRPC Website are built using Hugo with the Docsy theme. This project contains the hugo project, markdown files, and theme configurations.

Pre-requisites

Environment setup

Install pre-requisites

$ sudo apt install npm
$ npm install

Run local server

  1. Clone this repository
git clone https://github.com/apache/brpc-website.git
  1. Change to root directory:
cd brpc-website
  1. Run
hugo server
  1. Navigate to http://localhost:1313

  2. If you want to generate the static pages in /public folder, just run

hugo

Note for PR

We choose master branch to hold all the site source change and asf-site for apache github website. Please sent your PR to the master branch instead of asf-site.

How to modify the website pages

The structure of /content folder is as follows in which the files you will mainly modify. Take adding a new committer info to the Community page and adding a new bRPC release version info to Download bRPC page as an example, just find the index.md documents in their corresponding subfolder of /content then modify them. Or just click the Edit this page/编辑本页 button on their pages and modify them directly. Modifying other files or pages is similar.

brpc-website
- content
| - en
| | - docs
| | | - community
| | | | - index.md
| | | - DownloadBRPC
| | | | - index.md
| | | - ...
| - zh
| | - docs
| | | - community
| | | | - index.md
| | | - DownloadBRPC
| | | | - index.md
| | | - ...

Update docs

  1. Create new branch
  2. Commit and push changes to content
  3. Submit pull request to master branch
  4. Generate static pagas and Submit pull request to asf-site branch
  5. Staging site will automatically get created and linked to PR to review and test

Trouble shooting

You may encounter the Piped Failed problem when you execute the hugo server or hugo command, the solution is as follows.

sudo launchctl limit maxfiles 65535 200000
ulimit -n 65535
sudo sysctl -w kern.maxfiles=100000
sudo sysctl -w kern.maxfilesperproc=65535

incubator-brpc-website's People

Contributors

boltomli avatar chenbright avatar cooper-zhzhang avatar dependabot[bot] avatar dragon-zhang avatar gydong avatar huixxi avatar isaacjlwu avatar kikimo avatar lesliezhu avatar liuchang0812 avatar lorinlee avatar poponion avatar serverglen avatar tanzhongyi003 avatar thunderbrook avatar tousakarin avatar wasphin avatar wwbmmm avatar xuruidong avatar zyearn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

incubator-brpc-website's Issues

修正外部资源引用问题

Site Check For Podling: https://whimsy.apache.org/pods/project/brpc

$ git grep 'www.google-analytics.com'
themes/docsy/assets/vendor/bootstrap/site/_includes/header.html:37:<script async src='https://www.google-analytics.com/analytics.js'></script>
$ git grep cdnjs.cloudflare.com
themes/docsy/assets/vendor/bootstrap/_config.yml:58:  popper:           "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
themes/docsy/assets/vendor/bootstrap/site/docs/4.1/examples/dashboard/index.html:272:    <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
themes/docsy/layouts/partials/scripts.html:2:<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
$ git grep stackpath.bootstrapcdn.com
themes/docsy/assets/vendor/bootstrap/_config.yml:52:  css:              "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
themes/docsy/assets/vendor/bootstrap/_config.yml:54:  js:               "https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
themes/docsy/layouts/partials/scripts.html:3:<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>

都是使用的主题中默认带的链接, 需要检查修正.

开始

sudo apt-get install -y cmake libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libgtest* /usr/lib/ && cd -
需要替换成
sudo apt-get install -y cmake libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv lib/libgtest* /usr/lib/ && cd -

Basics- pthread mode description is ambiguous

https://brpc.apache.org/docs/server/basics/#pthread-mode

User code(client-side done, server-side CallMethod) runs in bthreads with 1MB stacksize by default. But some of them cannot run in bthreads:

......
brpc offers pthread mode to solve the issues. When -usercode_in_pthread is turned on, user code will be run in pthreads. Functions that would block bthreads block pthreads.

Note: With -usercode_in_pthread on, brpc::thread_local_data() does not guarantee to return valid value.

Performance issues when pthread mode is on:
.....

User code still runs in special bthreads actually, which use stacks of pthread workers. These special bthreads are scheduled same with normal bthreads and performance differences are negligible.

IOBuf

文档中介绍IOBuf的原文: “可以拷贝,修改拷贝不影响原IOBuf。拷贝的是IOBuf的管理结构而不是数据。 ”
拷贝的是管理数据,是不是可以理解为浅拷贝,共享底层数据,那么怎么会不影响原IOBuf?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.