Document toolboxDocument toolbox

Migrating off Play

Current Bridge server devs want to migrate off Play Framework BRIDGE-848 - Getting issue details... STATUS . Here is a plan for doing so in an incremental way.

BridgeServer2 (https://github.com/Sage-Bionetworks/BridgeServer2)

  • Built on a servlet framework such as Spring Boot (Spring MVC).
  • Initially a thin service that forwards most or all calls to BridgePF.

BridgePF (https://github.com/Sage-Bionetworks/BridgePF)

  • Old Play Framework service. (PF stands for "Play Framework".)

Steps:

  1. Create a domain such as webservices-old.sagebridge.org, which points to BridgePF (and remains so through the end of BridgePF's lifecycle).
  2. Bridge-New will initially be a thin service that forwards most or all calls to BridgePF.
    1. Figure out CORS and SSL.
    2. Request ID that's sent from Bridge-New to BridgePF, so we can map between Bridge-New requests and BridgePF requests.
  3. Implement error handlers and interceptors in BridgeServer2.
  4. Move all non-Play code to a separate package to be consumed by BridgePF and BridgeServer2.
    • This step will likely be the most painful, since (afaik) Play doesn’t support snapshot versions, so we’ll need manually manage the package versions. It is a necessary step, however, if we want to migrate gradually.

  5. Flip DNS so webservices.sagebridge.org points to Bridge-New. Traffic now comes to Bridge-New and is forwarded to BridgePF.
  6. Implement new Controllers in BridgeServer2. Migrate old Controllers and other Play-specific code at our leisure.
  7. As APIs are migrated to Bridge-New, BridgePF will get less and less traffic.
  8. When all APIs are migrated, BridgePF will get no more traffic, and we can shut it down.
  9. Move the shared code from the shared package to BridgeServer2, so that version management is easier.