Go to file
Soheil Hassas Yeganeh ad1b3e5094 Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing.
grpc_byte_buffer_reader_next() copies and references the slice. This
is not always necessary since the caller will not use the slice
after destroying the byte buffer.

A prominent example is the protobuf parser, which
calls grpc_byte_buffer_reader_next() and immediately unrefs the slice
after the call. This ref() and unref() calls can be very expensive
in the hot path.

This commit introduces grpc_byte_buffer_reader_peek() which
essentialy return a pointer to the slice in the buffer, i.e.,
no copies, and no refs.

QPS of 1MiB 1 Channel callback benchmark increases by 5%.
More importantly insructions per cycle is increased by 10%.

Also add tests and benchmarks for byte_buffer_reader_peek()

This commit reaplies 509e77a5a3
2019-03-21 06:03:45 -04:00
.github Prevent merging if PR marked DO NOT MERGE 2019-03-09 12:14:02 -08:00
.vscode Adding shim for debugging node tests using vscode. 2017-02-21 15:05:19 -08:00
bazel Merge pull request #18415 from yang-g/census 2019-03-19 08:46:19 -07:00
cmake avoid c-ares dependency on libnsl 2018-11-21 11:13:47 +01:00
doc Merge pull request #18369 from markdroth/doc_update 2019-03-15 12:43:55 -07:00
etc monthly update of grpc root certificates 2018-12-12 09:03:17 -08:00
examples Update README.md 2019-03-19 14:45:04 +01:00
include Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing. 2019-03-21 06:03:45 -04:00
src Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing. 2019-03-21 06:03:45 -04:00
summerofcode Update .cc and .md files 2019-01-30 11:24:09 -05:00
templates fixup 2019-03-19 07:25:23 -04:00
test Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing. 2019-03-21 06:03:45 -04:00
third_party Revert "Windows builds for gRPC C++ tests" 2019-03-15 17:15:20 +01:00
tools Merge pull request #18421 from jtattermusch/fix_grpc_dotnet_interop 2019-03-19 05:47:53 -07:00
.bazelrc Add suggested alias for bazelrc import location 2018-10-24 23:31:54 +02:00
.clang-format Support cleaning objc files 2018-04-11 17:53:51 -07:00
.clang-tidy Fix all instances of bugprone-undefined-memory-manipulation 2018-08-29 14:24:02 -07:00
.clang_complete Client-side health checking support. 2018-10-24 12:29:04 -07:00
.editorconfig Adding an editorconfig configuration file. 2015-01-31 06:43:40 +01:00
.gitignore Initial gevent support 2018-03-27 19:44:43 -07:00
.gitmodules Adding upb as submodule 2018-11-28 10:09:03 -08:00
.istanbul.yml Moved gRPC node package root to repo root, made it depend on grpc.gyp 2015-10-01 11:54:00 -07:00
.pylintrc Upgrade sanity Docker image to debian:stretch 2018-12-10 16:21:49 -08:00
.pylintrc-examples Use Pylint to lint gRPC Python examples 2018-12-20 12:10:53 -08:00
.pylintrc-tests Add ignore to .pylintrc-tests 2018-12-11 16:37:44 -08:00
.rspec Bundled C core with Ruby library 2015-12-18 11:18:34 -08:00
.travis.yml Have Travis build the Sample app with frameworks too 2016-07-15 23:25:47 -07:00
.yardopts Adding a .yardopts file at the root so rubydocs isn't getting lost. 2016-02-13 22:54:23 +01:00
AUTHORS Fix Python blocking interceptors facing RpcError 2018-11-28 00:53:46 -08:00
BUILD Add BUILD rul and generated upb code for protos required to do DiscoveryRequest to xDS server 2019-03-15 14:16:08 -07:00
BUILDING.md Update building with Visual Studio documentation 2018-08-29 16:26:13 -07:00
CMakeLists.txt Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
CODE-OF-CONDUCT.md Fix code of conduct 2017-06-08 13:15:06 -07:00
CONCEPTS.md address comments 2018-06-20 21:42:33 +02:00
CONTRIBUTING.md Adding a line about alphabetical order of AUTHORS 2018-11-28 16:38:45 -08:00
Gemfile Bundled C core with Ruby library 2015-12-18 11:18:34 -08:00
LICENSE fix license file 2017-06-19 09:57:43 +02:00
MANIFEST.md Abstract libuv implementation 2018-03-13 01:21:42 -07:00
Makefile Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
NOTICE.txt change LICENSE, add AUTHORS 2017-06-08 11:22:40 +02:00
OWNERS Substitute a11r for ctiller in all OWNERS files 2018-01-10 14:39:52 -08:00
PYTHON-MANIFEST.in Add License to Python tarball 2018-12-05 12:30:08 -08:00
README.md Update README.md 2018-11-16 13:15:45 -08:00
Rakefile Add support for ruby 2.6.0 binary package builds, drop 2.1 and 2.0 2019-01-03 18:08:05 +00:00
TROUBLESHOOTING.md Address review comments. 2018-07-09 09:39:01 +02:00
WORKSPACE Make WORKSPACE compatible with Bazel 0.20.0 for Python 2018-12-04 19:43:04 -08:00
build.yaml Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
build_config.rb Increment version number since grpc_use_signal deletion is an API breaker 2018-10-10 08:40:04 -07:00
composer.json PHP: upgrade interop test google/auth version 2018-08-01 19:07:31 -07:00
config.m4 Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
config.w32 Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
gRPC-C++.podspec Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
gRPC-Core.podspec Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
gRPC-ProtoRPC.podspec Regenerate projects 2019-02-12 21:07:42 -08:00
gRPC-RxLibrary.podspec Regenerate projects 2019-02-12 21:07:42 -08:00
gRPC.podspec Regenerate projects 2019-02-12 21:07:42 -08:00
grpc.bzl fix remaining license notices 2017-06-08 11:22:41 +02:00
grpc.def Introduce grpc_byte_buffer_reader_peek and use it for Protobuf parsing. 2019-03-21 06:03:45 -04:00
grpc.gemspec Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
grpc.gyp Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
package.xml Add SPIFFE security stack to gRPC core 2019-03-14 15:24:48 -07:00
requirements.bazel.txt Add grpcio-status extension package 2018-12-13 10:18:44 -08:00
requirements.txt Pin cython to 0.28.3 temporarily 2018-07-09 09:15:14 -07:00
setup.cfg Add License to Python tarball 2018-12-05 12:30:08 -08:00
setup.py address comments by ericgribkoff@ 2019-02-22 15:55:59 -08:00

README.md

gRPC - An RPC library and framework

gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems.

Homepage: grpc.io
Mailing List: grpc-io@googlegroups.com

Join the chat at https://gitter.im/grpc/grpc

To start using gRPC

To maximize usability, gRPC supports the standard method for adding dependencies to a user's chosen language (if there is one). In most languages, the gRPC runtime comes as a package available in a user's language package manager.

For instructions on how to use the language-specific gRPC runtime for a project, please refer to these documents

  • C++: follow the instructions under the src/cpp directory
  • C#: NuGet package Grpc
  • Dart: pub package grpc
  • Go: go get google.golang.org/grpc
  • Java: Use JARs from Maven Central Repository
  • Node: npm install grpc
  • Objective-C: Add gRPC-ProtoRPC dependency to podspec
  • PHP: pecl install grpc
  • Python: pip install grpcio
  • Ruby: gem install grpc
  • WebJS: follow the grpc-web instructions

Per-language quickstart guides and tutorials can be found in the documentation section on the grpc.io website. Code examples are available in the examples directory.

Precompiled bleeding-edge package builds of gRPC master branch's HEAD are uploaded daily to packages.grpc.io.

To start developing gRPC

Contributions are welcome!

Please read How to contribute which will guide you through the entire workflow of how to build the source code, how to run the tests, and how to contribute changes to the gRPC codebase. The "How to contribute" document also contains info on how the contribution process works and contains best practices for creating contributions.

Troubleshooting

Sometimes things go wrong. Please check out the Troubleshooting guide if you are experiencing issues with gRPC.

Performance

See the Performance dashboard for performance numbers of the latest released version.

Concepts

See gRPC Concepts

About This Repository

This repository contains source code for gRPC libraries implemented in multiple languages written on top of a shared C core library src/core.

Libraries in different languages may be in various states of development. We are seeking contributions for all of these libraries:

Language Source
Shared C [core library] src/core
C++ src/cpp
Ruby src/ruby
Python src/python
PHP src/php
C# src/csharp
Objective-C src/objective-c
Language Source repo
Java grpc-java
Go grpc-go
NodeJS grpc-node
WebJS grpc-web
Dart grpc-dart