Skip to main content
SCION SDKv0.8.6

The chat application

info

The code on the pages of this section comes from the chat at sdk-v0.8.6.

The chat application is an example application on the SCION SDK. It has one server and three clients: a terminal client in Rust, an Android app and an iOS app. Every request between a client and the server is HTTP/3 over SCION.

The pages in this section explain the SDK topics that the chat shows. To build and run the chat, read the README of the chat.

One server, three clients​

The chat application
The chat application
chat-dev
a SCION network on your machine, built on pocketscion
chat-dev
Terminal client
built on scion-http3
Terminal client...
Android app
built on scion-http3-android
Android app...
iOS app
built on scion-http3-swift
iOS app...
chat-server
built on scion-stack and scion-h3-axum
chat-server...
An arrow is a request over HTTP/3 on SCION.
An arrow is a request over HTTP/3 on SCION.
Text is not SVG - cannot display

The parts in the figure:

  • chat-server serves the API over HTTP/3 on SCION, built on scion-stack and scion-h3-axum.
  • chat-dev starts a SCION network on your machine, built on pocketscion, with the chat server in it.
  • Terminal client is the chat client for the terminal, built on scion-http3.
  • Android app is the chat client for Android, built on scion-http3-android.
  • iOS app is the chat client for iOS, built on scion-http3-swift.

Where the SDK is​

The SDK is in one file for each role. Each row links to the file and to the page that explains it.

RoleFileExplained on
The serverchat-server/src/scion.rsThe server
A client, in Rusttransport/scion.rsThe client
A client, on AndroidScionTransport.ktThe Android client
A client, on iOSScionTransport.swiftThe iOS client
A SCION network on your machinetopology.rsFrom a local SCION network to a real network
All of the above, in one testtests/scion.rsTesting against PocketSCION

One design for three clients​

The three clients have the same structure. In each app, one module depends on the SDK, and one file imports the SDK: the transport. The transport has three parts:

  • It builds the client.
  • It sends a request.
  • It maps the errors of the SDK to the errors of the app.

The rest of each app calls the transport through a Transport interface of its own. The SDK renews the token for the transport. The client shows the three parts in Rust, and The mobile clients shows them in Kotlin and Swift.

Where to go next​