Convergence Protocol Scala Bindings


License

License

Categories

Categories

Scala Languages
GroupId

GroupId

com.convergencelabs
ArtifactId

ArtifactId

convergence-proto-scala_2.12
Last Version

Last Version

1.0.0-rc.3
Release Date

Release Date

Type

Type

jar
Description

Description

Convergence Protocol Scala Bindings
Convergence Protocol Scala Bindings
Project URL

Project URL

https://convergence.io
Project Organization

Project Organization

Convergence Labs, Inc.
Source Code Management

Source Code Management

https://github.com/convergencelabs/convergence-proto

Download convergence-proto-scala_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.convergencelabs/convergence-proto-scala_2.12/ -->
<dependency>
    <groupId>com.convergencelabs</groupId>
    <artifactId>convergence-proto-scala_2.12</artifactId>
    <version>1.0.0-rc.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.convergencelabs/convergence-proto-scala_2.12/
implementation 'com.convergencelabs:convergence-proto-scala_2.12:1.0.0-rc.3'
// https://jarcasting.com/artifacts/com.convergencelabs/convergence-proto-scala_2.12/
implementation ("com.convergencelabs:convergence-proto-scala_2.12:1.0.0-rc.3")
'com.convergencelabs:convergence-proto-scala_2.12:jar:1.0.0-rc.3'
<dependency org="com.convergencelabs" name="convergence-proto-scala_2.12" rev="1.0.0-rc.3">
  <artifact name="convergence-proto-scala_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.convergencelabs', module='convergence-proto-scala_2.12', version='1.0.0-rc.3')
)
libraryDependencies += "com.convergencelabs" % "convergence-proto-scala_2.12" % "1.0.0-rc.3"
[com.convergencelabs/convergence-proto-scala_2.12 "1.0.0-rc.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.10
com.thesamet.scalapb : scalapb-runtime_2.12 jar 0.9.4

Project Modules

There are no modules declared in this project.
Convergence Logo

Convergence Protocol

Build Status

This repository defines the Convergence client-server, realtime, WebSocket protocol. The protocol is specified using Google Protocol Buffers version 3 messages. The protocol itself can be found in the src/main/protobuf directory.

Convergence supplies a JavaScript client with the server implemented in Scala. Thus this project builds JavaScript and Scala bindings. The JavaScript bindings are provided by protobuf.js. The Scala bindings are provided by ScalaPB.

Dependencies

Installation

JavaScript

To use the JavaScript protocol bindings use the following command:

npm i -D @convergence/convergence-proto

Scala

To use the Scala protocol bindings add the following dependency:

libraryDependencies += "com.convergencelabs" %% "convergence-proto-scala" % "1.0.0"

Run sbt publishLocal to publish to a local repository for e.g. the Convergence Server to reference.

Building

There are different build commands for each language binding. They are as follows:

  • JavaScript: npm run dist
  • Scala: sbt compile

Protocol

The Convergence client-server protocol is intended to be sent over a WebSocket connection between a Convergence client and the Convergence Server. Each message sent between the client and server is an instance of the ConvergenceMessage protocol buffer message. The rough structure of the message is as follows:

message ConvergenceMessage {
  google.protobuf.Int32Value requestId = 1;
  google.protobuf.Int32Value responseId = 2;

  oneof body {
    // messages
  }
}

The body field will contain a specific message sent or received. WebSockets are an asynchronous, bi-directional streaming communication channel. However, Convergence has several request / response style exchanges. The ConvergenceMessage structure implements a correlation id strategy to enable request / response behavior over WebSockets.

The best way to understand the protocol is to simply view the .proto files in the src/main/protobuf directory.

License

The Convergence Protocol is licensed under the Apache 2.0 license. Refer to the LICENSE.txt for the specific terms and conditions of the license.

The Convergence Protocol is also available under a Commercial License. If you are interested in a non-open source license please contact us at Convergence Labs.

com.convergencelabs

Convergence Labs

Helping teams build effective collaborative software

Versions

Version
1.0.0-rc.3
1.0.0-rc.2
1.0.0-rc.1