Concepts and architecture
Riversoft® STCP Gemini is Riversoft’s managed file transfer (MFT) product for the OFTP protocol, used for file exchange between companies, such as in the automotive industry and banking:
- Versions: OFTP 1.x and OFTP 2.0, with TLS also on OFTP 1.x.
- Roles: server, receiving partner connections, and client, connecting to partners by schedule.
- Confirmed delivery: confirmation by EERP and restart of interrupted transfers.
For web portal, REST API, SFTP, AS2, Webhook, WhatsApp and cloud storage, use Riversoft STCP DirectLink. Both products can be used together or separately and share management through the Riversoft Console Portal and the mailboxes.
Architecture
Riversoft STCP Gemini and Riversoft STCP DirectLink are independent products that can be used together or separately. Both are configured and monitored through the Riversoft Console Portal and the Riversoft STCP Gemini API, and the configuration, records and transfer history are kept in your company’s database.
flowchart LR
ADM[Administrator] -->|HTTPS| PORTAL[Riversoft Console Portal]
SIS[External systems] -->|HTTPS / REST| API[Riversoft STCP Gemini API]
PORTAL --> API
API --> DB[(Configuration database<br/>and log database)]
SRV[Riversoft STCP Gemini Server] --> DB
DL[Riversoft STCP DirectLink] --> DB
REN[Riversoft STCP Gemini Rename] --> DB
SRV <-->|OFTP| PARC[Partners]
DL <-->|SFTP, AS2, HTTPS, Webhook,<br/>S3, Azure Blob, GCS, OCI| PARC
SRV -->|events| REN
| Part | Role |
|---|---|
| Transfer | Riversoft STCP Gemini Server exchanges files with partners over OFTP; Riversoft STCP DirectLink, over the other protocols and connectors. |
| Management | The Riversoft Console Portal and the Riversoft STCP Gemini API create and change instances, users, network services and schedules, and track transfers. |
| Database | Holds the configuration (configuration database) and the transfer history (log database). |
| Mailboxes | Each user’s directories, holding the files to send and the received ones. See Mailbox and directories. |
| Automation | Riversoft STCP Gemini Rename and the built-in routing of Riversoft STCP DirectLink forward files according to the rules. |
Components
| Component | Role | Package |
|---|---|---|
| Riversoft STCP Gemini Server | Transfers files over the OFTP protocol, as server and client. It also provides a legacy SFTP client, but Riversoft STCP DirectLink is recommended for SFTP. | stcpgemini-server |
| Riversoft Console Portal | Web interface for configuring and monitoring Riversoft STCP Gemini and Riversoft STCP DirectLink. It is served by the Riversoft STCP Gemini API itself, with no additional web server. | stcpgemini-portal |
| Riversoft STCP Gemini API | Management REST API for Riversoft STCP Gemini and Riversoft STCP DirectLink: instances, users, network services, schedules, file types and reports. See Riversoft STCP Gemini API. | stcpgemini-api |
| Riversoft STCP Gemini Rename (optional) | File routing and automation, through rules configured in the Riversoft Console Portal. Installed on the same server as Riversoft STCP Gemini Server. | stcpren |
| Riversoft STCP DirectLink (optional) | Transfers files over every protocol and connector other than OFTP. See Riversoft STCP DirectLink. | stcpdirectlink |
Protocols and connectors
Riversoft STCP Gemini transfers files over OFTP only, as server and as client. The table shows which product handles each protocol or connector:
| Connector / protocol | Server | Client | Product |
|---|---|---|---|
| OFTP 1.x and OFTP 2.0 | ✓ | ✓ | Riversoft STCP Gemini |
| SFTP | ✓ | ✓ | Riversoft STCP DirectLink (legacy client also in Riversoft STCP Gemini Server) |
| AS2 | ✓ | ✓ | Riversoft STCP DirectLink |
| HTTPS (web portal and REST API) | ✓ | — | Riversoft STCP DirectLink |
| Webhook | ✓ | ✓ | Riversoft STCP DirectLink |
| — | ✓ | Riversoft STCP DirectLink | |
| FTPS / FTP | — | ✓ | Riversoft STCP DirectLink |
| Amazon S3, Azure Blob Storage, Google Cloud Storage, Oracle Cloud Object Storage | — | ✓ | Riversoft STCP DirectLink |
Note
Other connectors may be available depending on the version and configuration. See Riversoft STCP DirectLink protocols and connectors.
How a transfer works
OFTP session
In OFTP, both sides of a connection can send and receive files in the same session. Each received file is confirmed to the sender, and an interrupted transfer resumes from where it stopped.
sequenceDiagram
autonumber
participant P as Partner
participant G as Riversoft STCP Gemini Server
P->>G: Opens the connection (TLS, when configured)
P->>G: Identifies itself with the OFTP credentials
G-->>P: Accepts the session (valid credentials and user rules)
P->>G: Sends the file
Note over P,G: If the connection drops, the next session resumes from the stopping point
G-->>P: Confirms with EERP (or rejects with NERP, giving the reason)
G->>P: Sends the user's outgoing files
P-->>G: Confirms with EERP
P->>G: Ends the session
Note over G: Session, files and confirmations are recorded in the log database
| Step | What happens |
|---|---|
| Connection | The partner identifies itself with the OFTP credentials registered for the user. The session is refused if the credentials, the authentication mode or the connection mode do not match the configuration. |
| Transmission | The file is sent in blocks. In OFTP 2.0, it can be encrypted, signed and compressed. |
| Restart | If the connection drops, the restart information is kept and the next session continues from where it stopped, without resending the whole file. |
| Confirmation | The receiver confirms the file with EERP (End-to-End Response) or rejects it with NERP (Negative End Response), giving the reason. The confirmation can be sent in the same session or in a later one. |
| Record | The session, files, confirmations and result are kept in the log database. See Logging and monitoring. |
Inbound and outbound connections
| Connection | Who starts it | When |
|---|---|---|
| Inbound | The partner connects to the instance’s network service. | Whenever the partner decides, within the user’s rules. |
| Outbound | Riversoft STCP Gemini Server connects to the partner. | By schedule, on the defined dates or intervals. Through the Riversoft Console Portal, the operator can also run a schedule right away or start an outbound connection with a user. See Supervision. |
| Supervision | The Riversoft STCP Gemini API connects to the Supervision (gemini) service of Riversoft STCP Gemini Server (default port 33050). | Whenever the Riversoft Console Portal tracks or operates the instance. See Supervision services. |
Mailbox and directories
Each user has a mailbox in the data directory (DataDirectory, by default /usr/local/stcp/data), at the path <DataDirectory>/<instance>/<user>/. Riversoft STCP Gemini and Riversoft STCP DirectLink use exactly the same mailbox structure:
<DataDirectory>/<instance>/<user>/
├── entrada/
│ └── restart/
├── saida/
│ ├── backup/
│ ├── pendente/
│ └── link/
├── controle/
├── formato/
└── temp/
flowchart LR
SIS[Company system] -->|writes| SAI[saida]
SAI -->|sent or downloaded| BKP[saida/backup]
BKP -.->|resend| SAI
PARC[Partner or user] -->|sends| ENT[entrada]
ENT -->|read by| SIS
| Directory | In Riversoft STCP Gemini | In Riversoft STCP DirectLink |
|---|---|---|
entrada | Files received from the partner over OFTP. | Files received by upload in the portal or the API and over the protocols and connectors. |
entrada/restart | Restart information for interrupted transfers. | Restart information for interrupted transfers. |
saida | Files to send to the partner. | Files available for download (download area) and to send through the connectors. |
saida/backup | Files already sent. A file can go back to saida to be resent. | Files already downloaded (backup area). |
saida/pendente | EERP control: receipt confirmations waiting to be sent. | — |
saida/link | — | Files available by secure link for external recipients. |
controle | Transfer control files, such as EERP, NERP and locks. | Transfer control files. |
formato and temp | Format definitions and temporary files. | Format definitions and temporary files. |
Directory names are configurable in the instance. See Data directories.
Rules applied to each transfer
In either direction, the connection and each file are checked against the user’s and the instance’s rules:
| Rule | Effect |
|---|---|
| User lock | A locked user cannot exchange files. |
| Authentication and connection mode | The session is accepted only if the credentials, the authentication mode and the connection mode match the configuration. |
| Connection limit | Limits the user’s simultaneous connections. |
| Session time | Ends sessions that exceed the maximum time. |
| Instance session limit | Limits the instance’s total simultaneous sessions. |
| File filters | The file name and size must meet the user’s filters. |
| Time window | Transfers are accepted only on the allowed days and times. |
Every rejection is recorded with its reason. See Security.
Routing and automation
Riversoft STCP Gemini Server produces an event for each transfer. With Riversoft STCP Gemini Rename installed, these events trigger the routing rules configured in the Riversoft Console Portal, which rename, copy, move and distribute files between mailboxes and other directories, with no manual intervention.
Logging and monitoring
| Feature | Description |
|---|---|
| Log database | Every session and every transfer is recorded with user, direction, file, size, time, hash and result. |
| Events and messages | Each occurrence produces an event and a message with a code (MSGnnnn), in Portuguese, English and Spanish. See Codes. |
| Contingency spool | If the log database is unavailable, events are written to a local contingency file. See Contingency spool. |
| Supervision | The Riversoft Console Portal tracks the instance, users and services, and can start schedules, stop and restart the instance and change the debug level. See Supervision. |
Key concepts
| Concept | Description |
|---|---|
| Instance | Set of configurations run by a Riversoft STCP Gemini Server, identified by ApplName. It is created in the Riversoft Console Portal. |
| User | Partner or system that exchanges files with the instance. Each user has a single mailbox, which holds the files and data of their transfers. |
| Network service | Protocol, address, port and security configuration used in connections. |
| Schedule | Execution of outbound connections or tasks on defined dates or intervals. The schedule can also be run right away through the Riversoft Console Portal. |
| File type | Rules and tags applied to transferred files. |
| EERP and NERP | Confirmation (EERP) or rejection (NERP) of a file by the receiver, in the OFTP protocol. |
| Restart | Continuation of an interrupted transfer from where it stopped. |
| Event and message | Each transfer occurrence produces an event and a message with a code (MSGnnnn). |
| Routing and rule | Riversoft STCP Gemini Rename definitions to rename, copy, move and distribute files. |
Other terms are in the Glossary.