Overview
The process of designing, building and optimizing DNA or proteins can often involve the use of custom algorithms such as a codon optimizer, or an optimization method that has been developed in-house. Using TesleaGen's microservice framework, these algorithms can be integrated into the TeselaGen platform.
What is a microservice?
The term mircoservice is a widely used term that can take on different meanings depending on the situation. In this situation a microservice is a Docker image containing all of the necessary resources (libraries, executables, scripts, files, etc.) to run a particular algorithm including the algorithm itself. The execution of the algorithm is invoked via a REST web service.
TeselaGen's Microservice Framework
REST API
Building out a robust REST web service can be challenging at times. TeselaGen provides a Docker image that has a REST web service pre-installed that the TeselaGen platform knows how to communicate with.
Task NPM Package
The REST web service exposes each algorithm as a task that has been wrapped in an NPM (Node.js Package Manager) package. This means you don't have to spend any time worrying about engineering REST API and network communication. All you have to do is "wrap" your algorithm in an NPM package.
If your algorithm is written in JavaScript then this is probably already done for you. Otherwise you can use Node.js's built-in process execution commands or one of the popular packages such as ShellJs or execa to execute your algorithm from the command line.
Data I/O
Passing inputs and outputs back and forth over the network is an extra piece of overhead that you don't have to worry about when using TeselaGen's microservice framework. All tasks can take a single JSON input and return a single JSON output. Additionally all tasks get assigned a working directory. Any input files are copied into a predefined input folder in that directory before the task starts. Any output files that are created in a predefined output folder will automatically be transferred back to TeselaGen's platform once the task is completed.
Scaling Controller
The final key piece of TeselaGen's microservice framework is an optional Scaling Controller service which is packaged as a separate Docker image. If your algorithm is run infrequently or requires a cluster to scale up, this service can handle scaling your microservice resources up and down. Many runtime environments will provide this scaling capability automatically. However if you are running in an environment that doesn't support scaling triggers or you want to implement some custom scaling logic, you can use the Scaling Controller image to enable that support.
Runtime Environment
The microservices communicate solely over HTTPS allowing your microservice Docker containers to be run virtually anywhere in the world. We can securely host your custom microservices in our cloud environment or you can host them behind your firewall either on-premise or in your own private cloud.
Task Statuses
The TeselaGen platform can interface with a number of microservice tasks directly from the user interface. The execution of these tasks can be monitored directly from the user interface, namely from a dashboard listing all the Microservice Tasks and that can be accessed directly from the Menu. The statuses that each task can display are the following:
Created
: Task was created in the database, and not added to the task queue yetPending
: Task was added to the task queue, before running in the microservice workerSubmitting
: Trying to send the task to a microservice workerIn progress
: Task is being run in a microservice workerCompleting
: Task finished in the microservice worker and the results are being processed by the application serverCompleted
: Task has finishedCancel
: Task was cancelled by the userFailed
: Task has failed
Getting Started
There are a variety of integration points where a custom microservice can be integrated into the TeselaGen platform and more are being added with every release. Contact sales to find out how your custom algorithm can be integrated with TeselaGen's plaftorm.