Si necesitas el código de esqueleto, comunícate con un POC de Google.
Cómo probar el servidor sin TLS
Para las pruebas iniciales, se puede inhabilitar TLS:
$cd[base_dir]$rubyserver.rb--disable_tls
Esto no es adecuado para su uso en producción.
Configura certificados de producción
Para habilitar TLS en el servidor, se requieren los siguientes archivos:
certificates/server.pem la cadena de certificados del servidor en formato PEM
certificates/server.key es la clave privada de la cadena de certificados del servidor.
certificates/trusted_client_roots.pem los certificados raíz en los que se confía cuando se autentican los clientes
El conjunto de certificados raíz de cliente de confianza se usa cuando se autentica el cliente. Puedes obtener este conjunto de raíces de confianza de una autoridad como Mozilla o instalar el conjunto de raíces que recomienda actualmente la Autoridad de Internet de Google G2. En el último caso, es posible que debas actualizar el certificado raíz de forma manual en ocasiones.
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-05-26 (UTC)"],[[["This guide outlines the necessary steps to set up a Ruby-based gRPC server, including the required gems: `google-protobuf` and `grpc`."],["You'll need to download the service definition file (`booking_service.proto`) and organize it within a specific directory structure that includes `certificates`, `lib`, `protos`, and `server.rb`."],["Generating the necessary Ruby libraries from the service definition file using the `grpc_tools_ruby_protoc` command is required to implement the server."],["The server can be initially tested without TLS using the command `ruby server.rb --disable_tls`, but this is not recommended for production environments."],["Enabling TLS in production requires configuring the server with `server.pem`, `server.key`, and `trusted_client_roots.pem` files within the `certificates` directory, to ensure secure communication."]]],["The implementation requires the `google-protobuf` and `grpc` gems. Download the service definition, create the specified directory structure, and generate Ruby libraries using `grpc_tools_ruby_protoc`. TLS can be initially disabled using `--disable_tls` for testing. Production requires `server.pem`, `server.key`, and `trusted_client_roots.pem` within the certificates directory for TLS. The `trusted_client_roots.pem` may come from an authority like Mozilla or Google Internet Authority G2.\n"]]