General Actions:
| A research project for a peer-to-peer replicated wiki |
| Type | Other |
| Developed by | XWiki SAS and INRIA |
| License | GNU Lesser General Public License 2.1 |
Table of contents

XWiki Concerto aims at evolving the open-source XWiki engine towards a P2P architecture supporting mobility, offline work and replication of content across a large number of peers. This research work will allow XWiki to support mobile workers in their daily collaborative activities, using an efficient and secure solution supporting replication and synchronization of the content, and to run on a P2P architecture that allows for scalability.
In this page you will find all the information and documentation to setup and start using a XWiki Concerto network.
Watch XWiki Concerto in action:
XWiki Concerto is distributed using a self-installing JAR. After downloading it and execute the installer with the following command line
If you're installing XWiki Concerto on a server without any graphical display, you may perform an automated installation using the XML configuration file http://www.github.com/xwiki-contrib/concerto/tree/master/concerto-installer/src/main/resources/install.xml by running the following command after having customized the installation path in the XML file:
Before starting to use XWiki Concerto, XWoot, its peer-to-peer and replication engine, must be configured properly or "bootstrapped". The configuration is done only once per installation and the settings are being restored if XWoot is restarted.
A wizard-like configuration process has been set up to help you trough the bootstrap process.


XWiki Concerto uses JXTA as the P2P network platform.
In short terms, a network is a collection of groups, peers and super-peers.
A super peer can be in charge of 2 things:
Here's a picture to better understand relays, how they work and why they are so important for a network:

A network can also be seen as a controlled environment deployed by an organization to allow various departments to replicate their XWikis.
Imagine the scenario where a company creates a network and adds a couple of RDV and Relay peers. If no such network existed, every department that wishes to replicate it's wiki with it's department members would need to create its own network and deal on its own with Firewalls/NATs and generaly handle and assign super-peers on its own.
If the company did in fact create such a network, all they have to do is to enter the network parameters received from the network admin and they can now easily create a group and share an XWiki in that group. They don't have to worry about network logistics any more.
In order to create a new network, you just have to press the "Create network" button.
Also, make sure that you are using at least one communication method (see below), you are using an unused port for it and that you are accepting incoming communications on it. This is required because you will be acting as both RDV and Relay peer for your newly created network and this ultimately means that you will be a server for peers willing to join your network.
Joining a network
To join a network you must know at least one network entry-point (the address of a RDV peer of that network).
Here you have 2 options:
These parameters are:
A last thing to note about joining networks is that, if you need to use a Relay and have provided some relays in the inputs above, you must *disable incoming connections* when joining the network. If you do not do so, you will not be able to talk to other peers because you will not be properly using the available Relays.
Here is where you set to use the communication method I have been talking about in the paragraphs above. They are quite self-explanatory.
The external IP setting is something you might need if you are normally NAT-ed but you have port forwarding enabled by your ISP. This can come in very handy because instead of using a relay, you can actually accept incoming connections and receive messages directly. You just have to provide the external IP for which you have port forwarding enabled and that will be used as well, besides your local addresses, to tell others how to reach you.
Use only external IP for all communication. This is when you want to be reached only trough the external IP and not trough your local addresses. You should use this when you know you are not accessible in any other way.

Once you have joined a network, you will want to start replicating an XWiki.
In order to differentiate between replicated XWikis, groups are introduced. For each replicated XWiki there is a group whose members share the same XWiki data.
Groups can also be password protected to restrict access to copy or alternation of the replicated XWiki's data. The secure distribution of the group's password to trusted peers is the group creator's task.
In order for group members to communicate to each-other, there is a need of group RDVs (just like network RDVs). Once you have joined a group, you will automatically try to connect to an existing RDV from that group. If no such peer node is found, then you will automatically be promoted to RDV in order to enable group communication. The peer that created the group will automatically be RDV for the group.
The number of RDVs in a group is automatically managed by XWoot, by promoting and demoting peers depending on the number of peers currently inside a group.
Creating a group is pretty straight forward.
You just have to specify a group name and an optional description.
If you wish to password protect your group, you can do so by checking the "Is private group" and then entering the desired group password.
To join a group, you have to select the desired group from the list of existing ones on the current network.
You can refresh the list of current groups by clicking on "Refresh List" button.
The Route communication for this group option makes this peer directly join the group as RDV peer, without waiting to contact other RDV peers inside the group. This can cause unwanted effects like not being able to contact peers in the group for an initial period of a couple of minutes. (This option could be removed in future versions)
Joining a group can take up to 2 minutes if no RDV peer is found in the group.
A state represents all the content of a replicated XWiki.
This concept derives from the fact that XWoot and XWiki do not share the same data on an implementation level and, before being able to start to function properly, XWoot needs to have its data initialized.
On a bit more detailed level, a state contain all the content present on the replicated XWiki but in a format on which XWoot can apply its merging algorithms and can keep track of and apply patches containing changes of that content.
In order to be able to start the replication of an XWiki, a state needs to be computed on the XWoot peer that created the group.
If the group was created by this peer, the button "Compute new state" will be available.
When you compute a new state, XWoot synchronizes with the XWiki for the first time.
After joining a group you need to get the state of the XWiki that is being replicated inside that group.
You can do so by pressing the "Ask state from group" button.
After getting the state, XWoot will make it its own and synchronize with your local XWiki by replacing all your XWiki's content with the content described in the received state thus making your XWiki synchronized with the group's XWiki.
A third option is to import a state file in zip format you received from a different source, other than asking it from the group.
Note: You need to provide the state file for the group you are joining and no other. This means you must not change the name of the zip file.
In this section we provide a tutorial setting up two replicated wikis that can be used to test XWiki Concerto capabilities.
In order to have a test setup, install XWiki Concerto on two different directories on the same host.
At the end you will have two directories, let's call them xwc1 and xwc2, on your disk. We will use these installations in order to setup two replicated wikis to play with.
First on all you have to launch the two XWiki Concertos by using the start_xwiki.sh command. You must specify the port number for the second instance otherwise a conflict would happen:
Now you have two instances running. You can check it by opening a browser at the following addresses: http://localhost:8080/xwootApp and http://localhost:8181/xwootApp
Now you have successfully configured the two instances for replicating their content.