Skip to content

Running required backend services for local development

Background Services


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 --network host --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 --network host --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 --network host --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.

    The dev biosimulations bucket can be accessed in the following ways:

    • Connect to the UCONN VPN and use the endpoint

    • Connect to the BioSimulations submit node on the UCONN HPC via SSH and use local port bindings. The bucket can then be accessed via 'https://localhost:4443.' You will likely need to disable ssl validation in the library, tool, or code that you are using to connect to the bucket.

     ssh -i ~/.ssh/id_hpc -L
    Where id_hpc is a private key that has access to the biosimulations user account.

    To request a ssh key, please contact us.

  • 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: 2022-01-20
Back to top