Skip to content

Commit 47ed7a9

Browse files
Multipeer, initial notes
1 parent e6c0697 commit 47ed7a9

File tree

3 files changed

+108
-6
lines changed

3 files changed

+108
-6
lines changed

modules/android/nav-android.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ include::partial$_set_page_context_for_android.adoc[]
3838
* Data Sync
3939
** xref:android:dbreplica.adoc[Intra-device Sync]
4040
** xref:android:replication.adoc[Remote Sync Gateway]
41-
** xref:android:p2psync-websocket.adoc[Peer-to-Peer]
41+
** xref:android:p2psync-multipeer.adoc[Multipeer Replicator]
42+
** xref:android:p2psync-websocket.adoc[Active-Passive Peer-to-Peer]
4243
*** xref:android:p2psync-websocket-using-passive.adoc[Passive Peer]
4344
*** xref:android:p2psync-websocket-using-active.adoc[Active Peer]
4445
*** xref:android:p2psync-custom.adoc[Integrate Custom Listener]

modules/android/pages/gs-prereqs.adoc

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
21
= Preparing for Couchbase Lite on Android
32
:page-aliases: start/java-android-gs-prereqs.adoc
43
:page-role:
54
:description: Prerequisites for the installation of Couchbase Lite
65
:keywords: edge nosql api android java
76

8-
97
:source-language: Java
108

11-
129
:source-language: Kotlin
1310

1411

@@ -48,8 +45,8 @@ We do not test against, nor guarantee support for, uncertified Android versions
4845
|22
4946
|===
5047

51-
[#supported-versions-for-vector-search-3-2-0]
52-
== Supported Versions for Vector Search 3.2.0
48+
[#supported-versions-for-vector-search-3-3-0]
49+
== Supported Versions for Vector Search 3.3.0
5350

5451
[IMPORTANT]
5552
--
@@ -73,6 +70,23 @@ To verify whether your device supports the AVX2 instructions set, https://www.in
7370
|===
7471

7572

73+
== Supported Versions for Multipeer Replicator
74+
75+
76+
[%autowidth.stretch]
77+
|===
78+
|Platform |Runtime architectures |Minimum API Level
79+
80+
|Android
81+
|arm64-v8a
82+
|35
83+
84+
|Android
85+
|x86_64
86+
|35
87+
|===
88+
89+
7690
[#related-content]
7791
== Related Content
7892
++++
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
= Multipeer Replicator
2+
ifdef::show_edition[:page-edition: Enterprise Edition]
3+
:description: MultipeerReplicator is a peer-to-peer replicator that can advertise its presence, discover other peers, establish connections, and replicate data with those peers.
4+
5+
:source-language: Java
6+
7+
:source-language: Kotlin
8+
9+
[abstract]
10+
{description}
11+
12+
13+
TIP: Multipeer Replication is currently available for use over IP networks.
14+
If you are working with a bluetooth network, you will need to use Couchbase Lite's xref::p2psync-websocket.adoc[Active-Passive peer-to-peer].
15+
16+
[#introduction]
17+
== Introduction
18+
// tag::introduction-full[]
19+
// tag::introduction[]
20+
Couchbase Lite's Peer-to-Peer synchronization solution offers secure storage and bidirectional data synchronization between edge devices without needing a centralized cloud-based control point.
21+
Multipeer Replicator
22+
// end::introduction[]
23+
24+
25+
26+
== Prerequisites
27+
28+
=== Transport and Peer Discovery Protocol
29+
30+
MultipeerReplicator supports Wi-Fi transport, using DNS-SD (also known as Bonjour) for peer discovery.
31+
Peers must be connected to the same Wi-Fi network to discover and establish connections with one another.
32+
33+
=== Supported Platforms
34+
35+
For Android, the minimum API level is API 35, based on the availability of required DNS-SD features for peer discovery and mesh network construction—such as support for subtypes, and the ability to publish and subscribe to service information.
36+
37+
38+
== Overview
39+
40+
The MultipeerReplicator automatically advertises its presence, discovers other peers,
41+
and establishes connections for data replication with peers that share the same group identifier defined by the application.
42+
43+
To maintain optimal connectivity, efficient data transport, and balanced workloads, the MultipeerReplicator forms a dynamic mesh network among peers in the same group.
44+
It avoids redundant direct connections, evenly distributes connections across peers, and optimizes communication paths.
45+
The mesh network continuously adapts as peers join or leave.
46+
47+
48+
49+
50+
== Configuration
51+
52+
.Configuration for creating a MultipeerReplicator
53+
[source,java]
54+
----
55+
public struct MultipeerReplicatorConfiguration {
56+
/// Identifier for discovering and connecting peers.
57+
public let peerGroupID: String
58+
59+
/// Peer identity.
60+
/// @Note The identity’s certificate must be both server and client certificate.
61+
public let identity: TLSIdentity
62+
63+
64+
/// Peer authenticator.
65+
public let authenticator: MultipeerAuthenticator
66+
67+
68+
/// Collections to replicate.
69+
public let collections: [MultipeerCollectionConfiguration]
70+
71+
72+
/// Initialize the configuration with a peer group identifier, identity,
73+
/// authenticator and collections.
74+
public init(peerGroupID: String,
75+
identity: TLSIdentity,
76+
authenticator: MultipeerCertificateAuthenticator,
77+
collections: [MultipeerCollectionConfiguration])
78+
}
79+
----
80+
81+
82+
83+
84+
85+
TIP: In version 3.3.0, the recommended maximum number of peers in a mesh network is approximately 15.
86+
87+

0 commit comments

Comments
 (0)