카우치베이스 동기화 게이트웨이 is a key internet facing component of Couchbase Mobile stack that enables secure data synchronization across Couchbase Lite enabled clients. 카우치베이스 모바일 2.0 새로운 웹소켓 기반 복제 프로토콜 for data synchronization that is more efficient than its HTTP based predecessor.
이전 튜토리얼, we discussed how to use Couchbase Lite as a standalone embedded data store within your Xamarin app. In this post, we introduce a 튜토리얼 that will extend the capabilities of Couchbase Lite enabled clients to incorporate data sync using a 동기화 게이트웨이.
데이터 동기화
데이터 동기화는 다음을 활성화하는 데 매우 중요합니다. 오프라인 우선 mobile apps. Offline-first apps are apps that regularly need network connectivity to function but are usable even under conditions of no or poor network connectivity.
The two critical aspects of enabling this is –
-
- The ability to locally store data on the device so it is always available to the user, whether online or offline.
- The ability to sync data to the cloud so it is available to the users on other devices when online. This includes secure routing of data across devices, enforcement of access conflict and handling of data conflicts.
튜토리얼
이 튜토리얼 를 통해 다음과 같은 방법을 시연합니다.
-
- Setup the Couchbase Sync Gateway (in walrus mode) to sync content between multiple Couchbase Lite enabled clients. We will cover the basics of the 동기화 게이트웨이 구성
- 동기화 게이트웨이를 구성하여 데이터 라우팅, 액세스 제어 및 권한 부여를 시행하세요. 동기화 게이트웨이의 기본 사항을 다룹니다. 동기화 기능 API.
- Configure your Couchbase Lite clients for replication.
- Use “Live Queries” or Query events within your Couchbase Lite clients to be asynchronously notified of changes.
We will be using a Xamarin solution as an example of a Couchbase Lite enabled client.
앱 개요
저희가 소개한 '사용자 프로필' 앱과 함께 작업할 예정입니다. 기초 튜토리얼 에서 확장되고 쿼리 튜토리얼. 이 튜토리얼에서는 데이터 동기화를 지원하도록 해당 앱을 확장할 것입니다.
이 버전의 앱은 다음을 수행합니다.
-
- 사용자가 로그인하여 사용자 프로필 정보를 만들거나 업데이트할 수 있습니다. 사용자 프로필 보기는 다음과 같습니다. 자동 업데이트 every time the profile information changes in the underlying database.
- 사용자 프로필 정보는 원격 동기화 게이트웨이와 동기화된 다음 다른 장치와 동기화됩니다(액세스 제어 및 라우팅 구성에 따라).
동기화 기능
).

다음 단계
튜토리얼이 끝나면 동기화 게이트웨이를 사용하여 데이터 동기화를 안전하게 활성화하는 방법을 이해하게 될 것입니다. 동기화 게이트웨이 내에서 액세스 제어, 데이터 유효성 검사 및 권한 부여를 시행하는 방법과 앱 내에서 쿼리 이벤트를 등록하는 방법의 기본 사항을 숙지해야 합니다.
However, as you would observe from the tutorial, we are using Sync Gateway in “walrus mode” and hence, we are not persisting the data in the cloud. Stay tuned for a future tutorial that will extend this system to incorporate the Couchbase server for data persistence in the cloud!
질문이나 피드백이 있으면 아래에 댓글을 남기거나 트위터로 언제든지 문의해 주세요. @probablyrealrob 또는 다음 주소로 이메일을 보내주세요. robert.hedgpeth@couchbase.com. . 카우치베이스 포럼 를 통해 질문할 수 있습니다.