added TOC and images

Alokito
2019-09-04 14:24:43 -04:00
parent 9c81af5bff
commit 6dc52e334f
+17 -3
@@ -1,11 +1,24 @@
# Contents
This page describes the concept and architecture of the Cellxgene Gateway
* [Overview](https://github.com/Novartis/cellxgene-gateway/wiki#overview)
* [Gateway Concept](https://github.com/Novartis/cellxgene-gateway/wiki#gateway-concept)
* [Class Structure of Gateway](https://github.com/Novartis/cellxgene-gateway/wiki#class-structure-of-gateway)
* [Subprocess Backend](https://github.com/Novartis/cellxgene-gateway/wiki#subprocess-backend)
* [Docker Backend](https://github.com/Novartis/cellxgene-gateway/wiki#docker-backend)
# Overview
The [Cellxgene project](https://github.com/chanzuckerberg/cellxgene) from the Chan Zuckberg Institute allows rich visualization of single cell RNA seq data. However, it is limited to visualizing a single dataset at a time. This repo contains Cellxgene Gateway, a small python/flask app that allows you to host an unlimited number of datasets on a single server. It dynamically launches instances of cellxgene gateway, and spins them down after a period of inactivity.
# Gateway Concept
The Gateway mediates between the incoming request, which always passes through a fixed domain name and port, and multiple cellxgene servers (one per dataset) that are either running in separate processes on a single server (currently implemented) or on an external docker container (potential improvement).
[[images/gatewayDiagram.png]]
The role of the cellxgene gateway is
* translate incoming requests that mention the dns name and port of the ALB into requests for the cellxgene server running in the VPC.
* It must preserve the incoming accept header.
@@ -15,7 +28,9 @@ The role of the cellxgene gateway is
# Class Structure of Gateway
# Spawn Process Implementation
[[images/PythonModuleStructure.png]]
# Subprocess Backend
The basic idea here is to write a [http://flask.pocoo.org/](Flask) app that receives all requests for cellxgene.server. It will fork a process running cellxgene for each dataset, and keep track of which processes are running by creating a file in `/tmp/cellxgene-instances`. Although this approach will not scale beyond a few concurrent datasets, it is easier to implement than the docker container approach and has significant overlap, so it is a reasonably first step.
@@ -98,7 +113,7 @@ In both cases, we will call the part before the subpath (including the dataset)
| cellxgene basepath | http://localhost:8000 |
| cellxgene url | http://localhost:8000/api/v0.2 |
# Spawn Docker Containers Implementation
# Docker Backend
In theory, to support Docker we need the following changes:
@@ -107,4 +122,3 @@ In theory, to support Docker we need the following changes:
* The files should be stored on the cellxgene EFS (shared filesystem) instead of in /tmp.
I'll let you know how it goes in practice if we ever get to it 😄 .