galaxyproject / galaxyproject/galaxy
Neo4j IE needs an update to support Neo4j 3.2.0
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 169
Description
Neo4j 3.2.0 has been [released](https://neo4j.com/release-notes/neo4j-3-2-0/) with increased speed and functionality. The Neo4j IE in Galaxy needs an update to support this and address some of the issues associated with the current IE. Some technical challenges are:
1) The in-browser shell for Neo4j uses the Bolt protocol exclusively. So the Neo4j container has two exposed ports: 7474 for HTTP connections and 7687 for Bolt. The shell needs to talk to both. In practice this means inspecting the container (which is possible with `docker port`), identifying the mapping between in-container port and exposed port and storing that mapping. Currently IEs only can handle one exposed port (https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/web/base/interactive_environments.py#L355). This will need to change.
2) The shell is loaded by this sequence:
a. Contact the HTTP port of the Neo4j server
b. Get 302 redirected to /browser
c. Load the assets of the shell.
d. Contact the root (/) URL of the Neo4j server with a Content-Type of application/json and receive settings for the shell. These crucially include the URL to use for the Bolt connection.
In Galaxy terms, (see the [sequence diagram](https://f1000research.com/posters/5-1471) in this poster), requests to the IE are directed to a proxy which maps them to the relevant port on the container running the IE. This means that 2 things needs to happen here:
1. the Proxy needs to know which Bolt port the shell needs to talk to and
2. the Proxy needs to respond to a application/json query with the correct configuration to make the shell talk to the correct Bolt port.
A Python proxy that does the right kind of thing (for a single container use case) is here: https://github.com/pvanheus/tinyproxy - can the NodeJS proxy be adapted to do 1 and 2 above?
Currently working on this: myself (@pvanheus) and @thobalose . We'll need to interact with IE experienced people so that's at least @bgruening @erasche and @natefoo .
Contributor guide
Research direction
Read lib/galaxy/web/base/interactive_environments.py, then trace the NodeJS proxy entry point used by Galaxy interactive environments. Compare its behavior with the tinyproxy example and the documented Neo4j browser sequence. Done means the IE handles both HTTP and Bolt ports and the proxy provides the configuration needed by the shell.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, neo4j, nodejs, python
- Domain
- backend, databases, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100