Skip to content

Running required backend services for local development

Tip

We recommend using VsCode for developing BioSimulations. The BioSimulations git repository contains a development container configuration that simplifies the setup of the local environment.

The BioSimulations apps requires connecting to several infrastructure services for functions such as messaging, database, and storage. Developing BioSimulations locally requires access to the following services:

  • Redis

    Redis is used for caching the results of the API and for managing queues for submitting, monitoring, and processing simulation runs.

    We recommend running a local redis container with the following command:

    docker run -d -p 6379:6379 --name redis redis
    
  • NATS messaging queue

    NATS is used for messaging between the API and the backend services. Currently, the NATS connection does not support guaranteed message delivery semantics. The latest NATS Jetstream adds support for exactly-once delivery semantics, which will be can be for submission jobs in the future.

    We recommend running a local NATS container with the following command:

    docker run -d -p 4222:4222 --name nats nats
    
  • MongoDB

    MongoDB is used as our primary database and contains information about the simulation runs, their logs, specifications, metadata, etc. It is accessed through the API.

    We recommend running a local MongoDB container with the following command:

    docker run -d -p 27017:27017 --name mongodb mongo
    

    Alternatively, you can use a free MongoDB cluster from MongoDB Atlas.

    These methods will allow you to develop BioSimulations locally, but will not have access to simulation stored on the development server. If you would like to develop against the dev biosimulations database, please contact us for access.

  • S3

    We recommend using an AWS S3 or Google Cloud Storage bucket for local development. If you would like to develop against the dev biosimulations bucket, please contact us for access.

    Alternatively, you can run a local S3 compatible instance with Minio

  • HPC

    Accessing the an appropriate HPC backend is the most bespoke part of setting up a local environment for development on the BioSimulations platform. If your development work does not require running simulations on the HPC, we recommend temporarily modifying the code to skip submitting jobs to the HPC or returning mock responses. This will allow you to continue to develop the API, and other aspects of the system without access to the HPC. For more information about which parts of the system interact with the HPC, see the architecture deployment information.

    If you specifically require access to the HPC, please contact us.


Last update: 2023-06-21