Java 8은 지원이 종료되었으며 2026년 1월 31일에
지원 중단됩니다. 지원 중단 후에는 조직에서 이전에 조직 정책을 사용하여 레거시 런타임의 배포를 다시 사용 설정한 경우에도 Java 8 애플리케이션을 배포할 수 없습니다. 기존 Java 8 애플리케이션은
지원 중단 날짜 이후에도 계속 실행되고 트래픽을 수신합니다.
지원되는 최신 Java 버전으로 마이그레이션하는 것이 좋습니다.
Datastore 모드로 Cloud Firestore 사용
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Firestore는 자동 확장, 고성능, 간편한 애플리케이션 개발을 위해 설계된 NoSQL 문서 데이터베이스입니다. Datastore의 최신 버전이며 Datastore에 비해 여러 가지 부분이 개선되었습니다.
Datastore 모드의 Firestore는 서버 사용 사례 및 App Engine에 최적화되어 있으므로 App Engine 앱에서 주로 사용하는 데이터베이스에는 Datastore 모드의 Firestore를 사용하는 것이 좋습니다. 기본 모드의 Firestore는 모바일 및 실시간 알림 사용 사례에 가장 유용합니다. Firestore 모드에 대한 자세한 내용은 Native 모드와 Datastore 모드 중 선택을 참조하세요.
App Engine에서 Datastore 모드 사용
App Engine에서 Datastore 모드를 사용하려면 다음 안내를 따르세요.
아직 만들지 않았다면 데이터베이스를 만들고 Datastore 모드에서 Firestore를 선택합니다.
기존 Datastore 데이터베이스를 App Engine 앱에 사용할 수 있습니다. 이러한 기존 데이터베이스는 자동으로 Datastore 모드의 Firestore로 업그레이드됩니다.
앱에서 라이브러리를 앱의 종속 항목 파일에 추가하여 Datastore를 종속 항목으로 선언합니다.
Google Cloud 클라이언트 라이브러리를 사용하여 항목 읽기 및 쓰기와 데이터 쿼리를 수행합니다.
색인 구성
Datastore 모드는 애플리케이션에서 생성되는 모든 쿼리에 색인을 사용합니다. 이러한 색인은 항목이 변경될 때마다 업데이트되므로 앱이 쿼리를 생성할 때 결과가 신속하게 반환될 수 있습니다.
Datastore 모드는 단순 유형의 쿼리에 사용할 단일 속성 색인을 자동으로 생성합니다. 여러 속성이 포함된 복잡한 쿼리의 경우 앱의 index.yaml
파일에서 복합 색인을 구성해야 합니다.
App Engine 개발 서버는 테스트를 실행하는 데 필요한 복합 색인으로 index.yaml
파일을 업데이트합니다. 마찬가지로 테스트를 실행할 때 Datastore 모드 에뮬레이터가 색인을 생성할 수 있습니다.
로컬 테스트를 실행하지 않거나 테스트에 복잡한 쿼리가 포함되지 않은 경우 앱의 index.yaml
파일에 색인을 수동으로 추가할 수도 있습니다.
데이터베이스 권한 설정
기본적으로 앱에는Google Cloud 프로젝트에서 Datastore 모드와 Firestore 데이터베이스를 읽고 쓰는 데 필요한 권한이 모두 있습니다.
이러한 권한을 관리하기 위해 각 App Engine 앱은 앱과 동일한 프로젝트에서 Datastore 모드와 Firestore 데이터베이스에 대한 전체 읽기 및 쓰기 액세스 권한을 부여하는 기본 서비스 계정을 사용합니다. 기본 서비스 계정의 권한을 변경할 수는 있지만 필요한 권한이 있는 IAM 역할을 할당하지 않으면 앱에서 액세스 권한을 상실할 수 있습니다.
다른 사용자, 앱, 프로젝트에서 데이터베이스에 액세스하도록 허용하는 방법은 데이터베이스 액세스를 참조하세요.
로컬 테스트용 Datastore 모드 에뮬레이터 사용
자바용 Google Cloud CLI에는 사용자의 컴퓨터에서 애플리케이션 테스트가 가능하도록 로컬 개발 서버가 포함되어 있습니다. 로컬 개발 서버는 App Engine 자바 런타임 환경과 Datastore 모드를 포함한 모든 해당 서비스를 에뮬레이션합니다.
개발 서버는 테스트 중에 수행되는 쿼리로부터 확인된, 애플리케이션에 필요한 Datastore 모드 색인에 대한 구성을 생성합니다.
가격 책정, 할당량, 한도
Datastore 모드는 일일 한도가 있는 무료 할당량을 제공합니다. 유료 계정은 스토리지, 읽기 및 쓰기 작업을 무제한으로 제공합니다. 자세한 내용은 Datastore 할당량 페이지를 참조하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-09-04(UTC)
[[["이해하기 쉬움","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-04(UTC)"],[[["\u003cp\u003eFirestore is a NoSQL document database designed for automatic scaling, high performance, and ease of development, with improvements over its predecessor, Datastore.\u003c/p\u003e\n"],["\u003cp\u003eFirestore offers two modes: Datastore mode, which is optimized for server use cases and App Engine, and Native mode, which is designed for mobile and real-time notifications.\u003c/p\u003e\n"],["\u003cp\u003eDatastore mode utilizes indexes for each query, automatically generating single-property indexes and requiring composite indexes for complex queries, which can be managed via the \u003ccode\u003eindex.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine apps using Datastore mode have default permissions to read and write to the database, managed by a service account, but these permissions can be modified, though it could cause access issues if the proper role isn't assigned.\u003c/p\u003e\n"],["\u003cp\u003eDatastore mode offers a free quota with daily limits, with paid accounts providing unlimited storage and read/write operations.\u003c/p\u003e\n"]]],[],null,["# Using Cloud Firestore in Datastore Mode\n\nFirestore is a NoSQL document database built for automatic scaling,\nhigh performance, and ease of application development. It is the newest version\nof Datastore and introduces several improvements over\nDatastore.\n\nBecause Firestore in [Datastore mode](/datastore/docs)\nis optimized for server use cases and for\nApp Engine, we recommend using Firestore in\nDatastore mode for databases that will be used primarily by\nApp Engine apps. Firestore in Native mode is most useful for\nmobile and real-time notification use cases. For more information about\nFirestore modes, see [Choosing between Native Mode and\nDatastore mode](/datastore/docs/firestore-or-datastore).\n\nUsing Datastore mode with App Engine\n------------------------------------\n\nTo use Datastore mode with App Engine:\n\n1. If you haven't already done so,\n [create a database](/datastore/docs/store-query-data#create_a_database)\n and choose Firestore in Datastore mode.\n\n You can use existing Datastore databases with App Engine\n apps. These existing databases [will be automatically upgraded to\n Firestore in Datastore\n mode](/datastore/docs/upgrade-to-firestore).\n\n\n 1. In your app, declare Datastore as a dependency\n\n by [adding the library to your app's dependencies\n file](/datastore/docs/reference/libraries#client-libraries-install-java).\n\n \u003cbr /\u003e\n\n 2. Use the Google Cloud Client Library to\n [read and write entities](/datastore/docs/concepts/entities)\n and to [query data](/datastore/docs/concepts/queries).\n\n Configuring indexes\n -------------------\n\n Datastore mode uses\n [indexes](/datastore/docs/concepts/indexes)\n for every query your application makes. The indexes are updated whenever an\n entity changes, so the results can be returned quickly when the app makes a\n query.\n\n Datastore mode automatically creates single-property indexes for use with\n simple types of queries. For complex queries that include multiple properties,\n you'll need to configure composite indexes in your app's `index.yaml` file.\n\n The App Engine development server will update your `index.yaml` file\n with the composite indexes needed to run your tests. Similarly, the\n [Datastore mode emulator can generate indexes](/datastore/docs/tools)\n when you run tests.\n\n You can also add the indexes to your app's\n `index.yaml` file [manually](/appengine/docs/legacy/standard/java/configuring-datastore-indexes-with-index-yaml) if you do not run local\n tests or your tests do not include complex queries.\n\n Setting database permissions\n ----------------------------\n\n By default, your app has all the permissions required to read and write to\n Datastore mode and Firestore databases in your\n Google Cloud project.\n\n To manage these permissions, each App Engine app uses a [default service\n account](/appengine/docs/legacy/standard/java/service-account)\n that gives full read and write access to Datastore mode\n and Firestore databases in the same project as the app. You can\n [change the permissions of the default service\n account](/appengine/docs/legacy/standard/java/access-control#modify-service-account),\n but your app may lose access unless you assign an IAM role with the\n [required permissions](/datastore/docs/access/iam#required_permissions).\n\n For information about allowing other users, apps, or projects to access a database, see\n [Accessing your database](/datastore/docs/activate).\n\n Using the Datastore mode emulator for local testing\n ---------------------------------------------------\n\n The Google Cloud CLI for Java includes a [local development\n server](/appengine/docs/legacy/standard/java/tools/using-local-server) for testing your application on your computer. The local development server emulates the App Engine Java runtime environment and all of its services, including Datastore mode.\n\n \u003cbr /\u003e\n\n The development server generates configuration for Datastore mode\n indexes needed by your application, determined from the queries it performs\n while you are testing it.\n\n Pricing, quotas, and limits\n ---------------------------\n\n Datastore mode offers a free quota with daily limits. Paid\n accounts offer unlimited storage, read, and write operations. More information\n is available on the [Datastore Quotas](/appengine/docs/legacy/standard/java/quotas#Datastore) page."]]