
Framework RPC C++ di livello industriale per la costruzione di sistemi distribuiti ad alte prestazioni, con supporto per molteplici protocolli (HTTP, gRPC, Redis, Thrift) e funzionalità integrate di bilanciamento del carico, servizi di naming e consenso 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/) è un framework RPC di livello industriale che utilizza il linguaggio C++, spesso impiegato in sistemi ad alte prestazioni come ricerca, storage, machine learning, pubblicità, raccomandazione, ecc.
### "bRPC" significa "better RPC".
Puoi usarlo per:
* Costruire un server che può comunicare con più protocolli (**sulla stessa porta**), o accedere a ogni sorta di servizi:
* restful http/https, [h2](https://httpwg.org/specs/rfc9113.html)/[gRPC](https://grpc.io). usare http/h2 in bRPC è molto più semplice rispetto a [libcurl](https://curl.haxx.se/libcurl/). Accedi a protocolli basati su protobuf con HTTP/h2+json, probabilmente da un altro linguaggio.
* [redis](https://github.com/apache/brpc/blob/master/docs/en/redis_client.md) e [memcached](https://github.com/apache/brpc/blob/master/docs/en/memcache_client.md), thread-safe, più semplici e performanti rispetto ai client ufficiali.
* [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), per costruire [servizi di streaming](https://github.com/brpc/media-server).
* hadoop_rpc (potrebbe essere reso open source).
* supporto [rdma](https://en.wikipedia.org/wiki/Remote_direct_memory_access).
* supporto [thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md), thread-safe, più semplice e performante rispetto ai client ufficiali.
* ogni sorta di protocolli usati in 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 e quelli basati su nshead.
* Costruire servizi distribuiti [HA](https://en.wikipedia.org/wiki/High_availability) usando un'implementazione di livello industriale dell'[algoritmo di consenso RAFT](https://raft.github.io) resa open source in [braft](https://github.com/brpc/braft).
* I server possono gestire le richieste in modo [sincrono](https://github.com/apache/brpc/blob/master/docs/en/server.md) o [asincrono](https://github.com/apache/brpc/blob/master/docs/en/server.md#asynchronous-service).
* I client possono accedere ai server in modo [sincrono](https://github.com/apache/brpc/blob/master/docs/en/client.md#synchronus-call), [asincrono](https://github.com/apache/brpc/blob/master/docs/en/client.md#asynchronous-call), [semi-sincrono](https://github.com/apache/brpc/blob/master/docs/en/client.md#semi-synchronous-call), oppure usare i [combo channels](https://github.com/apache/brpc/blob/master/docs/en/combo_channel.md) per semplificare gli accessi sharded o paralleli in modo dichiarativo.
* Eseguire il debug dei servizi [via http](https://github.com/apache/brpc/blob/master/docs/en/builtin_service.md), ed eseguire profiler [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) e [contention](https://github.com/apache/brpc/blob/master/docs/en/contention_profiler.md).
* Ottenere [latenza e throughput migliori](https://github.com/apache/brpc/blob/master/docs/en/overview.md#better-latency-and-throughput).
* [Estendere bRPC](https://github.com/apache/brpc/blob/master/docs/en/new_protocol.md) con i protocolli usati nella tua organizzazione in modo rapido, oppure personalizzare componenti, inclusi [naming services](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md) (dns, zk, etcd), [load balancers](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md) (rr, random, consistent hashing).
# Provalo!
* Leggi [overview](https://github.com/apache/brpc/blob/master/docs/en/overview.md) per sapere dove può essere utilizzato bRPC e i suoi vantaggi.
* Leggi [getting started](https://github.com/apache/brpc/blob/master/docs/en/getting_started.md) per i passaggi di compilazione e sperimenta con gli [esempi](https://github.com/apache/brpc/tree/master/example/).
* Documentazione:
* [Abilitare FlatBuffers RPC e verificare l'esempio](https://github.com/apache/brpc/blob/master/docs/en/flatbuffers.md)
* [Benchmark delle prestazioni](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 o no](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)
* [Coda di esecuzione](https://github.com/apache/brpc/blob/master/docs/en/execution_queue.md)
* [bthread tracer](https://github.com/apache/brpc/blob/master/docs/en/bthread_tracer.md)
* [gruppo di attività con tag bthread](https://github.com/apache/brpc/blob/master/docs/en/bthread_tagged_task_group.md)
* Client
* [Nozioni di base](https://github.com/apache/brpc/blob/master/docs/en/client.md)
* [Codice di errore](https://github.com/apache/brpc/blob/master/docs/en/error_code.md)
* [Canali combo](https://github.com/apache/brpc/blob/master/docs/en/combo_channel.md)
* [Accesso a http/h2](https://github.com/apache/brpc/blob/master/docs/en/http_client.md)
* [Accesso a gRPC](https://github.com/apache/brpc/blob/master/docs/en/http_derivatives.md#h2grpc)
* [Accesso a thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md#client-accesses-thrift-server)
* [Accesso a 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)
* [Accesso a redis](https://github.com/apache/brpc/blob/master/docs/en/redis_client.md)
* [Accesso a memcached](https://github.com/apache/brpc/blob/master/docs/en/memcache_client.md)
* [Richiesta di backup](https://github.com/apache/brpc/blob/master/docs/en/backup_request.md)
* [Server fittizio](https://github.com/apache/brpc/blob/master/docs/en/dummy_server.md)
* Server
* [Nozioni di base](https://github.com/apache/brpc/blob/master/docs/en/server.md)
* [Servire http/h2](https://github.com/apache/brpc/blob/master/docs/en/http_service.md)
* [Servire gRPC](https://github.com/apache/brpc/blob/master/docs/en/http_derivatives.md#h2grpc)
* [Servire thrift](https://github.com/apache/brpc/blob/master/docs/en/thrift.md#server-processes-thrift-requests)
* [Servire Nshead](https://github.com/apache/brpc/blob/master/docs/en/nshead_service.md)
* [Debug dei problemi del server](https://github.com/apache/brpc/blob/master/docs/en/server_debugging.md)
* [Server push](https://github.com/apache/brpc/blob/master/docs/en/server_push.md)
* [Avalanche](https://github.com/apache/brpc/blob/master/docs/en/avalanche.md)
* [ConcurrencyLimiter automatico](https://github.com/apache/brpc/blob/master/docs/en/auto_concurrency_limiter.md)
* [Media Server](https://github.com/brpc/media-server)
* [json2pb](https://github.com/apache/brpc/blob/master/docs/en/json2pb.md)
* [Servizi integrati](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)
* Strumenti
* [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)
* Altro
* [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)
* [Supporto Bazel](https://github.com/apache/brpc/blob/master/docs/en/bazel_support.md)
* [Plugin dissector baidu_std per Wireshark](https://github.com/apache/brpc/blob/master/docs/en/wireshark_baidu_std.md)
* [Introduzione a bRPC](https://github.com/apache/brpc/blob/master/docs/cn/brpc_intro.pptx)(materiale di formazione)
* [Un tutorial sulla creazione di servizi su larga scala](https://github.com/apache/brpc/blob/master/docs/en/tutorial_on_building_services.pptx)(materiale di formazione)
* [bRPC interno](https://github.com/apache/brpc/blob/master/docs/en/brpc_internal.pptx)(materiale di formazione)
* RPC in profondità
* [Nuovo protocollo](https://github.com/apache/brpc/blob/master/docs/en/new_protocol.md)
* [Istruzioni atomiche](https://github.com/apache/brpc/blob/master/docs/en/atomic_instructions.md)
* [IO](https://github.com/apache/brpc/blob/master/docs/en/io.md)
* [Panoramica sul threading](https://github.com/apache/brpc/blob/master/docs/en/threading_overview.md)
* [Bilanciamento del carico](https://github.com/apache/brpc/blob/master/docs/en/load_balancing.md)
* [Locality-aware](https://github.com/apache/brpc/blob/master/docs/en/lalb.md)
* [Hashing coerente](https://github.com/apache/brpc/blob/master/docs/en/consistent_hashing.md)
* [Gestione della memoria](https://github.com/apache/brpc/blob/master/docs/en/memory_management.md)
* [Mantenimento del timer](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)
* Casi d'uso
* [Casi d'uso](https://github.com/apache/brpc/blob/master/community/cases.md)
# Contribuire al codice
Fai riferimento a [qui](https://github.com/apache/brpc/blob/master/CONTRIBUTING.md).
# Feedback e coinvolgimento
* Segnala bug, poni domande o fornisci suggerimenti tramite [Github Issues](https://github.com/apache/brpc/issues).
* Iscriviti alla mailing list ([email protected]) per ricevere aggiornamenti sul progetto.
# Codice di Condotta
Seguiamo il codice di condotta della Apache Software Foundation, consultalo qui [Link](https://www.apache.org/foundation/policies/conduct).