Skip to content
Concepts and architecture

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
  
PartRole
TransferRiversoft STCP Gemini Server exchanges files with partners over OFTP; Riversoft STCP DirectLink, over the other protocols and connectors.
ManagementThe Riversoft Console Portal and the Riversoft STCP Gemini API create and change instances, users, network services and schedules, and track transfers.
DatabaseHolds the configuration (configuration database) and the transfer history (log database).
MailboxesEach user’s directories, holding the files to send and the received ones. See Mailbox and directories.
AutomationRiversoft STCP Gemini Rename and the built-in routing of Riversoft STCP DirectLink forward files according to the rules.

Components

ComponentRolePackage
Riversoft STCP Gemini ServerTransfers 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 PortalWeb 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 APIManagement 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 / protocolServerClientProduct
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
WhatsApp—✓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
  
StepWhat happens
ConnectionThe 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.
TransmissionThe file is sent in blocks. In OFTP 2.0, it can be encrypted, signed and compressed.
RestartIf the connection drops, the restart information is kept and the next session continues from where it stopped, without resending the whole file.
ConfirmationThe 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.
RecordThe session, files, confirmations and result are kept in the log database. See Logging and monitoring.

Inbound and outbound connections

ConnectionWho starts itWhen
InboundThe partner connects to the instance’s network service.Whenever the partner decides, within the user’s rules.
OutboundRiversoft 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.
SupervisionThe 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
  
DirectoryIn Riversoft STCP GeminiIn Riversoft STCP DirectLink
entradaFiles received from the partner over OFTP.Files received by upload in the portal or the API and over the protocols and connectors.
entrada/restartRestart information for interrupted transfers.Restart information for interrupted transfers.
saidaFiles to send to the partner.Files available for download (download area) and to send through the connectors.
saida/backupFiles already sent. A file can go back to saida to be resent.Files already downloaded (backup area).
saida/pendenteEERP control: receipt confirmations waiting to be sent.—
saida/link—Files available by secure link for external recipients.
controleTransfer control files, such as EERP, NERP and locks.Transfer control files.
formato and tempFormat 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:

RuleEffect
User lockA locked user cannot exchange files.
Authentication and connection modeThe session is accepted only if the credentials, the authentication mode and the connection mode match the configuration.
Connection limitLimits the user’s simultaneous connections.
Session timeEnds sessions that exceed the maximum time.
Instance session limitLimits the instance’s total simultaneous sessions.
File filtersThe file name and size must meet the user’s filters.
Time windowTransfers 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

FeatureDescription
Log databaseEvery session and every transfer is recorded with user, direction, file, size, time, hash and result.
Events and messagesEach occurrence produces an event and a message with a code (MSGnnnn), in Portuguese, English and Spanish. See Codes.
Contingency spoolIf the log database is unavailable, events are written to a local contingency file. See Contingency spool.
SupervisionThe 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

ConceptDescription
InstanceSet of configurations run by a Riversoft STCP Gemini Server, identified by ApplName. It is created in the Riversoft Console Portal.
UserPartner or system that exchanges files with the instance. Each user has a single mailbox, which holds the files and data of their transfers.
Network serviceProtocol, address, port and security configuration used in connections.
ScheduleExecution of outbound connections or tasks on defined dates or intervals. The schedule can also be run right away through the Riversoft Console Portal.
File typeRules and tags applied to transferred files.
EERP and NERPConfirmation (EERP) or rejection (NERP) of a file by the receiver, in the OFTP protocol.
RestartContinuation of an interrupted transfer from where it stopped.
Event and messageEach transfer occurrence produces an event and a message with a code (MSGnnnn).
Routing and ruleRiversoft STCP Gemini Rename definitions to rename, copy, move and distribute files.

Other terms are in the Glossary.