Spanner와 상호작용 시 여러 프로그래매틱 인터페이스 중 하나를 사용할 수 있습니다. 다음은 사용 가능한 인터페이스로, 권장 순으로 나열되어 있습니다.
클라이언트 라이브러리: Spanner 클라이언트 라이브러리는 여러 언어로 제공되며 gRPC로 빌드됩니다. 이 클라이언트 라이브러리는 gRPC 맨 위에 추상화 계층을 제공하고 세션 관리, 트랜잭션 실행, 재시도 등의 세부정보를 처리합니다.
ORM 및 프레임워크 드라이버: Google에서는 JDBC와 같은 여러 인기 객체 관계형 매핑 라이브러리(ORM) 및 프레임워크에 대한 오픈소스 Spanner 드라이버를 지원합니다. 이 드라이버를 사용하면 이러한 프레임워크에서 정의한 API를 통해 Spanner 데이터베이스를 사용할 수 있습니다.
RPC API: 원하는 프로그래밍 언어로 클라이언트 라이브러리 또는 ORM 드라이버를 사용할 수 없는 경우 gRPC로 빌드된 RPC API를 사용합니다. gRPC는 REST API 사용과 비교 시 영구 연결(결과적으로 요청당 오버헤드가 적음)과 프로토콜 버퍼 형식으로 객체 표시(JSON에 비해 생성 및 소비 속도가 빠름) 등 여러 가지 성능상 이점을 제공합니다. gRPC 개념의 이러한 이점과 그 밖에 장점에 대해 자세히 알아보세요.
REST API: Spanner의 클라이언트 라이브러리 또는 RPC API를 사용할 수 없으면 REST API를 사용합니다. 아래 설명과 같이 REST API에서는 RPC API에서 사용할 수 있는 일부 기능이 지원되지 않습니다.
RPC와 REST API 비교
이 표에서는 RPC 및 REST API 인터페이스를 통해 사용할 수 있는 Spanner 기능을 비교합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-05(UTC)"],[],[],null,["# Overview of APIs, client libraries, and ORM drivers\n\nAvailable interfaces\n--------------------\n\nYou can use one of several programmatic interfaces when interacting with\nSpanner. These are the available interfaces, in the order that we\nrecommend using them:\n\n- [Client libraries](/spanner/docs/reference/libraries): The Spanner client libraries are available in multiple languages and are built on [gRPC](https://grpc.io/). These client libraries provide a layer of abstraction on top of gRPC and handle the details of session management, transaction execution, retries, and more.\n- [ORM and framework drivers](/spanner/docs/drivers-overview): Google supports open-source Spanner drivers for several popular object-relational mapping libraries (ORMs) and frameworks, such as JDBC. These drivers allow the use of Spanner databases through APIs defined by those frameworks.\n- [RPC API](/spanner/docs/reference/rpc): If a client library or ORM driver is not available for your programming language of choice, use the RPC API, which is built on [gRPC](https://grpc.io/). gRPC offers a number of performance benefits compared with using the REST API, including representing objects in protocol buffer format (which are faster to produce and consume compared with JSON) and persistent connections (which result in less per-request overhead). Read more about these and other benefits in [gRPC Concepts](https://grpc.io/docs/guides/concepts/).\n- [REST API](/spanner/docs/reference/rest): If you're unable to use Spanner's client libraries or the RPC API, use the REST API. Note that some features that are available in the RPC API are not supported in the REST API, as documented below.\n\nRPC versus REST API\n-------------------\n\nThis table compares Spanner features available through its RPC and REST API interfaces.\n\nClient libraries features support\n---------------------------------\n\nThe following table lists the client libraries, noting the major Spanner features that each one supports."]]