/
engine-properties.ad
91 lines (76 loc) · 4.26 KB
/
engine-properties.ad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
=== Node Properties File
ifdef::pro[]
The node setup wizard generates a properties file that contains all the information a node needs to bootstrap itself.
endif::pro[]
Each node that is deployed to a server is represented by a properties file that allows it to connect to a database and
register with a parent node. Properties are configured in a file named
`xxxxx.properties`. It is placed in the engines directory of the SymmetricDS install. The
file is usually named according to the engine.name, but it is not a
requirement.
To give a node its identity, the following properties are required. Any
other properties found in
`conf/symmetric.properties`
can be overridden for a specific engine in an engine's properties file.
If the properties are changed in
`conf/symmetric.properties`
they will take effect across all engines deployed to the server.
NOTE: You can use the variable `$(hostName)` to represent the host name of the machine when defining these properties
(for example, external.id=`$(hostName)`). You can also access external id, engine name, node group id, sync URL, and registration URL in this manner.
(for example, engine.name=$(nodeGroupId)-$(externalId)).
NOTE: You can also use BSH script for the external id, engine name, node group id, sync URL, and registration URL. Use back ticks to indicate the
BSH expression, and note that only one BSH expression is supporter for a given property line. The script can be prefixed or suffixed with fixed text.
For example, if you wish to based the external id off of just a part of the hostname (e.g., substring of hostname):
external.id=store-`import org.apache.commons.lang.StringUtils; return StringUtils.substring(hostName,2,4);`
engine.name::
This is an arbitrary name that is used to access a specific
engine using an HTTP URL. Each node configured in the engines directory
must have a unique engine name. The engine name is also used for the
domain name of registered JMX beans.
group.id::
The node group that this node is a member of.
Synchronization is specified between node groups, which means you only
need to specify it once for multiple nodes in the same group.
external.id::
The external id for this node has meaning to the user and
provides integration into the system where it is deployed. For example,
it might be a retail store number or a region number. The external id
can be used in expressions for conditional and subset data
synchronization. Behind the scenes, each node has a unique sequence
number for tracking synchronization events. That makes it possible to
assign the same external id to multiple nodes, if desired.
sync.url::
The URL where this node can be contacted for synchronization. At startup
and during each heartbeat, the node updates its entry in the database
with this URL. The sync url is of the format: `http://{hostname}:{port}/{webcontext}/sync/{engine.name}`
+
The {webcontext} is blank for a standalone deployment. It
will typically be the name of the war file for an application server
deployment.
+
The {engine.name} can be left blank if there is only one
engine deployed in a SymmetricDS server.
+
When a new node is first started, it is has no information
about synchronizing. It contacts the registration server in order to
join the network and receive its configuration. The configuration for
all nodes is stored on the registration server, and the URL must be
specified in the following property:
registration.url::
The URL where this node can connect for registration to
receive its configuration. The registration server is part of
SymmetricDS and is enabled as part of the deployment. This is typically
equal to the value of the sync.url of the registration server.
+
[IMPORTANT]
Note that a registration server node
is defined as one whose `registration.url`
is either blank or identical to its `sync.url`.
+
For a deployment where the database connection pool should
be created using a JDBC driver, set the following properties:
db.driver:: The class name of the JDBC driver.
db.url:: The JDBC URL used to connect to the database.
db.user:: The database username, which is used to login, create, and
update SymmetricDS tables.
db.password:: The password for the database user.
See <<Startup Parameters>>, for additional parameters that can be specified in the engine properties file.