Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Serval Architecture #572

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,38 @@
Serval is a REST API for natural language processing services for **all languages**.
For the REST documentation use the Swagger site [here](https://prod.serval-api.org/swagger/index.html).

# Serval Architecture

Serval is designed using a microservice architecture with the following deployments:
* Serval.APIServer
* This is the top level API layer. All REST calls are made through this layer.
* It primarily handles the definition of files and corpora, per-client permissions, validation of requests and assembling NLP requests from files and database entries, such as inserting pretranslations into the USFM structure.
* This includes all components under `./src/Serval/src` except for the auto-generated Client and gRPC projects, which are used to handle communication with the API layer.
* Serval.Machine.EngineServer
* Exposes multiple engine types to the APIServer
* Can be directly invoked by the APIServer
* Handles short-lived NLP requests, including loading SMT models for on-demand word graphs.
* Queues up jobs for the JobServer
* Primary functionality is defined in Serval.Machine.Shared, with the deployment configuration is defined in Serval.Machine.EngineServer
* Reports back status to the APILayer over gRPC
* Serval.Machine.JobServer
* Executes Hangfire NLP jobs
* Queues up ClearML NLP jobs, using the ClearML API and the S3 bucket
* Preprocesses training and inferencing data
* Postprocesses inferencing results and models from the ClearML job
* Primary functionality is defined in Serval.Machine.Shared, with the deployment configuration is defined in Serval.Machine.JobServer
* Reports back status to the APILayer over gRPC
* Echo.EchoTranslationEngine
* The echo engine is for testing both the API layer and the deployment in general.
Other components of the microservice are:
* SIL.DataAccess
* Abstracts all MongoDB operations
* Enables in-memory database for testing purposes
* Replicates the functionality of [EF Core](https://learn.microsoft.com/en-us/ef/core/)
* ServiceToolkit
* Defines common models, configurations and services both used by the Serval.APIServal deployment and the Serval.Machine deployments.


# Development

## Setting up Your Environment
Expand Down
Loading