
إطار عمل RPC بلغة C++ على مستوى صناعي لبناء أنظمة موزعة عالية الأداء، يدعم بروتوكولات متعددة (HTTP, gRPC, Redis, Thrift) مع موازنة تحميل مدمجة، خدمات تسمية، وتوافق RAFT.
[النسخة الصينية](https://github.com/apache/brpc/blob/master/README_cn.md)
[](https://github.com/apache/brpc/actions/workflows/ci-linux.yml)
[](https://github.com/apache/brpc/actions/workflows/ci-macos.yml)


[bRPC](https://brpc.apache.org/) هو إطار عمل RPC بمستوى صناعي يستخدم لغة C++، ويُستخدم غالبًا في الأنظمة عالية الأداء مثل البحث والتخزين وتعلّم الآلة والإعلانات والتوصيات وغيرها.
### "bRPC" تعني "better RPC" (RPC أفضل).
يمكنك استخدامه من أجل:
* بناء خادم قادر على التحدث بعدة بروتوكولات (**على المنفذ نفسه**)، أو الوصول إلى جميع أنواع الخدمات:
* restful http/https، و[h2](https://httpwg.org/specs/rfc9113.html)/[gRPC](https://grpc.io). استخدام http/h2 في bRPC أكثر سهولة بكثير من [libcurl](https://curl.haxx.se/libcurl/). الوصول إلى البروتوكولات القائمة على protobuf باستخدام HTTP/h2+json، وربما من لغة أخرى.
* [redis](https://github.com/apache/brpc/blob/master/docs/en/redis_client.md) و[memcached](https://github.com/apache/brpc/blob/master/docs/en/memcache_client.md)، آمنان للخيوط (thread-safe)، وأكثر سهولة وأداءً من العملاء الرسميين.
* [rtmp](https://github.com/apache/brpc/blob/master/src/brpc/rtmp.h)/[flv](https://en.wikipedia.org/wiki/Flash_Video)/[hls](https://en.wikipedia.org/wiki/HTTP_Live_Streaming)، لبناء [خدمات البث](https://github.com/brpc/media-server).
* hadoop_rpc (قد يُفتح مصدره).
* دعم [rdma](https://en.wikipedia.org/wiki/Remote_direct_memory_access).
* دعم [thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md)، آمن للخيوط، وأكثر سهولة وأداءً من العملاء الرسميين.
* جميع أنواع البروتوكولات المستخدمة في Baidu: [baidu_std](https://github.com/apache/brpc/blob/master/docs/en/baidu_std.md)، و[streaming_rpc](https://github.com/apache/brpc/blob/master/docs/en/streaming_rpc.md)، وhulu_pbrpc، و[sofa_pbrpc](https://github.com/baidu/sofa-pbrpc)، وnova_pbrpc، وpublic_pbrpc، وubrpc، والبروتوكولات القائمة على nshead.
* بناء خدمات موزعة عالية التوافر ([HA](https://en.wikipedia.org/wiki/High_availability)) باستخدام تطبيق بمستوى صناعي لـ[خوارزمية إجماع RAFT](https://raft.github.io) المفتوحة المصدر في [braft](https://github.com/brpc/braft).
* يمكن للخوادم معالجة الطلبات [بشكل متزامن](https://github.com/apache/brpc/blob/master/docs/en/server.md) أو [بشكل غير متزامن](https://github.com/apache/brpc/blob/master/docs/en/server.md#asynchronous-service).
* يمكن للعملاء الوصول إلى الخوادم [بشكل متزامن](https://github.com/apache/brpc/blob/master/docs/en/client.md#synchronus-call)، أو [بشكل غير متزامن](https://github.com/apache/brpc/blob/master/docs/en/client.md#asynchronous-call)، أو [بشكل شبه متزامن](https://github.com/apache/brpc/blob/master/docs/en/client.md#semi-synchronous-call)، أو استخدام [قنوات مركّبة](https://github.com/apache/brpc/blob/master/docs/en/combo_channel.md) لتبسيط الوصول المُجزّأ أو المتوازي بشكل تعريفي.
* تصحيح الخدمات [عبر http](https://github.com/apache/brpc/blob/master/docs/en/builtin_service.md)، وتشغيل محلّلات الأداء [cpu](https://github.com/apache/brpc/blob/master/docs/en/cpu_profiler.md) و[heap](https://github.com/apache/brpc/blob/master/docs/en/heap_profiler.md) و[contention](https://github.com/apache/brpc/blob/master/docs/en/contention_profiler.md).
* الحصول على [زمن استجابة وإنتاجية أفضل](https://github.com/apache/brpc/blob/master/docs/en/overview.md#better-latency-and-throughput).
* [توسيع bRPC](https://github.com/apache/brpc/blob/master/docs/en/new_protocol.md) بالبروتوكولات المستخدمة في مؤسستك بسرعة، أو تخصيص المكوّنات، بما في ذلك [خدمات التسمية](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md) (dns، zk، etcd)، و[موازنات الحمل](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md) (rr، random، consistent hashing).
# جرّبه!
* اقرأ [نظرة عامة](https://github.com/apache/brpc/blob/master/docs/en/overview.md) لمعرفة أين يمكن استخدام bRPC ومزاياه.
* اقرأ [البدء](https://github.com/apache/brpc/blob/master/docs/en/getting_started.md) لخطوات البناء وجرّب [الأمثلة](https://github.com/apache/brpc/tree/master/example/).
* الوثائق:
* [تفعيل FlatBuffers RPC والتحقق من المثال](https://github.com/apache/brpc/blob/master/docs/en/flatbuffers.md)
* [قياس الأداء المرجعي](https://github.com/apache/brpc/blob/master/docs/en/benchmark.md)
* [bvar](https://github.com/apache/brpc/blob/master/docs/en/bvar.md)
* [bvar_c++](https://github.com/apache/brpc/blob/master/docs/en/bvar_c%2B%2B.md)
* [bthread](https://github.com/apache/brpc/blob/master/docs/en/bthread.md)
* [bthread أم لا](https://github.com/apache/brpc/blob/master/docs/en/bthread_or_not.md)
* [thread-local](https://github.com/apache/brpc/blob/master/docs/en/thread_local.md)
* [قائمة انتظار التنفيذ](https://github.com/apache/brpc/blob/master/docs/en/execution_queue.md)
* [متتبع bthread](https://github.com/apache/brpc/blob/master/docs/en/bthread_tracer.md)
* [مجموعة مهام bthread الموسومة](https://github.com/apache/brpc/blob/master/docs/en/bthread_tagged_task_group.md)
* العميل
* [الأساسيات](https://github.com/apache/brpc/blob/master/docs/en/client.md)
* [رمز الخطأ](https://github.com/apache/brpc/blob/master/docs/en/error_code.md)
* [القنوات المركبة](https://github.com/apache/brpc/blob/master/docs/en/combo_channel.md)
* [الوصول إلى http/h2](https://github.com/apache/brpc/blob/master/docs/en/http_client.md)
* [الوصول إلى gRPC](https://github.com/apache/brpc/blob/master/docs/en/http_derivatives.md#h2grpc)
* [الوصول إلى thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md#client-accesses-thrift-server)
* [الوصول إلى UB](https://github.com/apache/brpc/blob/master/docs/en/ub_client.md)
* [Streaming RPC](https://github.com/apache/brpc/blob/master/docs/en/streaming_rpc.md)
* [الوصول إلى redis](https://github.com/apache/brpc/blob/master/docs/en/redis_client.md)
* [الوصول إلى memcached](https://github.com/apache/brpc/blob/master/docs/en/memcache_client.md)
* [طلب احتياطي](https://github.com/apache/brpc/blob/master/docs/en/backup_request.md)
* [خادم وهمي](https://github.com/apache/brpc/blob/master/docs/en/dummy_server.md)
* الخادم
* [الأساسيات](https://github.com/apache/brpc/blob/master/docs/en/server.md)
* [تقديم http/h2](https://github.com/apache/brpc/blob/master/docs/en/http_service.md)
* [تقديم gRPC](https://github.com/apache/brpc/blob/master/docs/en/http_derivatives.md#h2grpc)
* [تقديم thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md#server-processes-thrift-requests)
* [تقديم Nshead](https://github.com/apache/brpc/blob/master/docs/en/nshead_service.md)
* [تصحيح مشكلات الخادم](https://github.com/apache/brpc/blob/master/docs/en/server_debugging.md)
* [دفع الخادم](https://github.com/apache/brpc/blob/master/docs/en/server_push.md)
* [الانهيار الجليدي](https://github.com/apache/brpc/blob/master/docs/en/avalanche.md)
* [Auto ConcurrencyLimiter](https://github.com/apache/brpc/blob/master/docs/en/auto_concurrency_limiter.md)
* [خادم الوسائط](https://github.com/brpc/media-server)
* [json2pb](https://github.com/apache/brpc/blob/master/docs/en/json2pb.md)
* [الخدمات المدمجة](https://github.com/apache/brpc/blob/master/docs/en/builtin_service.md)
* [status](https://github.com/apache/brpc/blob/master/docs/en/status.md)
* [vars](https://github.com/apache/brpc/blob/master/docs/en/vars.md)
* [connections](https://github.com/apache/brpc/blob/master/docs/en/connections.md)
* [flags](https://github.com/apache/brpc/blob/master/docs/en/flags.md)
* [rpcz](https://github.com/apache/brpc/blob/master/docs/en/rpcz.md)
* [cpu_profiler](https://github.com/apache/brpc/blob/master/docs/en/cpu_profiler.md)
* [heap_profiler](https://github.com/apache/brpc/blob/master/docs/en/heap_profiler.md)
* [contention_profiler](https://github.com/apache/brpc/blob/master/docs/en/contention_profiler.md)
* الأدوات
* [rpc_press](https://github.com/apache/brpc/blob/master/docs/en/rpc_press.md)
* [rpc_replay](https://github.com/apache/brpc/blob/master/docs/en/rpc_replay.md)
* [rpc_view](https://github.com/apache/brpc/blob/master/docs/en/rpc_view.md)
* [benchmark_http](https://github.com/apache/brpc/blob/master/docs/en/benchmark_http.md)
* [parallel_http](https://github.com/apache/brpc/blob/master/docs/en/parallel_http.md)
* أخرى
* [IOBuf](https://github.com/apache/brpc/blob/master/docs/en/iobuf.md)
* [Streaming Log](https://github.com/apache/brpc/blob/master/docs/en/streaming_log.md)
* [FlatMap](https://github.com/apache/brpc/blob/master/docs/en/flatmap.md)
* [Coroutine](https://github.com/apache/brpc/blob/master/docs/en/coroutine.md)
* [Circuit Breaker](https://github.com/apache/brpc/blob/master/docs/en/circuit_breaker.md)
* [UBRing](https://github.com/apache/brpc/blob/master/docs/en/ubring.md)
* [RDMA](https://github.com/apache/brpc/blob/master/docs/en/rdma.md)
* [دعم Bazel](https://github.com/apache/brpc/blob/master/docs/en/bazel_support.md)
* [إضافة محلل baidu_std لـ Wireshark](https://github.com/apache/brpc/blob/master/docs/en/wireshark_baidu_std.md)
* [مقدمة bRPC](https://github.com/apache/brpc/blob/master/docs/cn/brpc_intro.pptx)(مادة تدريبية)
* [درس تعليمي حول بناء خدمات واسعة النطاق](https://github.com/apache/brpc/blob/master/docs/en/tutorial_on_building_services.pptx)(مادة تدريبية)
* [داخل bRPC](https://github.com/apache/brpc/blob/master/docs/en/brpc_internal.pptx)(مادة تدريبية)
* RPC بعمق
* [بروتوكول جديد](https://github.com/apache/brpc/blob/master/docs/en/new_protocol.md)
* [التعليمات الذرية](https://github.com/apache/brpc/blob/master/docs/en/atomic_instructions.md)
* [IO](https://github.com/apache/brpc/blob/master/docs/en/io.md)
* [نظرة عامة على الخيوط](https://github.com/apache/brpc/blob/master/docs/en/threading_overview.md)
* [موازنة الحمل](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md)
* [الوعي بالمكان](https://github.com/apache/brpc/blob/master/docs/en/lalb.md)
* [التجزئة المتسقة](https://github.com/apache/brpc/blob/master/docs/en/consistent_hashing.md)
* [إدارة الذاكرة](https://github.com/apache/brpc/blob/master/docs/en/memory_management.md)
* [الاحتفاظ بالمؤقتات](https://github.com/apache/brpc/blob/master/docs/en/timer_keeping.md)
* [bthread_id](https://github.com/apache/brpc/blob/master/docs/en/bthread_id.md)
* حالات الاستخدام
* [حالات المستخدمين](https://github.com/apache/brpc/blob/master/community/cases.md)
# المساهمة بالكود
يرجى الرجوع إلى [هنا](https://github.com/apache/brpc/blob/master/CONTRIBUTING.md).
# الملاحظات والمشاركة
* أبلغ عن الأخطاء أو اطرح الأسئلة أو قدّم الاقتراحات عبر [Github Issues](https://github.com/apache/brpc/issues).
* اشترك في القائمة البريدية ([email protected]) لتبقى على اطلاع بتحديثات المشروع.
# مدونة قواعد السلوك
نتبع مدونة قواعد السلوك الخاصة بمؤسسة Apache Software Foundation، يُرجى الرجوع إليها هنا [الرابط](https://www.apache.org/foundation/policies/conduct).