Code With Me Help

Architecture overview and on-premises server quick setup

The Code With Me feature enables you to share an open project in your IDE with your distributed team. You can set up on-premise servers to have full control of your infrastruture while working with Code With Me.

Terminology

Host

A host is either the instance of the IntelliJ IDEA based IDE which shares its coding environment with clients or the person doing that.

Guest

A guest is either the instance that is connected to the Code With Me coding session shared by the host or the person joining the session.

IntelliJ Client

A client is a lightweight version of IntelliJ IDEA, used by a guest for connecting to the host.

Lobby server

A lobby server is responsible for the following actions:

  • Generating a link that can be used to join the Code With Me session.

  • Reporting a list of supported features to the host or a guest (for example, whether P2P is allowed or not).

  • Selecting a relay server in cases when P2P does not work or is forbidden.

Relay server

A relay server is responsible for relaying a connection between the host or guests in case the P2P connection doesn't work or is forbidden. It is possible to have several relays in different locations, and to choose the closest one based on the proximity.

Workflow

Initiate a Code With Me session

  1. The host requests a Code With Me session creation from the lobby server.

  2. The lobby server creates a Code With Me session, which is persisted and can be joined until the host closes the session.

  3. The lobby server sends a Code With Me join link to the host, and can be shared with potential guests.

Join a Code With Me session

  1. A guest opens a Code With Me join link.

  2. A lobby server provides the guest with the required version of IntelliJ Client.

  3. IntelliJ Client is launched and connects to the session (either using P2P or relays, depending on the companies' policies and P2P availability).

The Code With Me setup

The quick Code With Me setup is intended for quick evaluation purposes. This setup is also highly insecure for the production use based on the following limitations:

  • The setup doesn't have SSL for lobby or relay servers connections.

  • The relay server cannot verify whether the requests to establish a relay are authentic and coming from the real lobby server.

  • The relay server or the host cannot verify whether session join request is signed by the lobby server.

Launch

You can use the following options in the code to launch the servers for the Code With Me session:

  • The host address is specified by the -h option.

  • The lobby and relay server ports can be specified using the -l and -r options respectively.

    The servers default to 2093 for a lobby server and 3274 for a relay server.

  • Enter the following command:

    $./launch.sh -h 10.2.2.53

    This command launches a lobby server, accessible via the address http://10.2.2.53:2093. This command also launches a relay server on the port 3274, and the lobby server will share a link of ws://10.2.2.53:3274 as the relay address.

  • Enter the following command:

    $./launch.sh -h myserver.internal -l 4950 -r 8092

    This command launches a lobby server, accessible via the address http://myserver.internal:4950.

    This command also launches a relay server on the port 8092, and the lobby will share a link of ws://myserver.internal:8092 as the relay address.

    This command also launches a relay server on the port 8092, and the lobby will share a link of ws://myserver.internal:8092 as the relay address.

Last modified: 28 October 2020