Running old and new platform at the same time #12520
Labels
Feature:New Platform
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
We need to figure out how to run the new and the old platform at the same time. There are several options to accomplish that:
Running old platform as a sub-system of the new platform
If we go this route, new platform will be handling all incoming requests with
expressjs
. If it can handle request completely on its own it will do so without even touching the old platform, otherwise we'll "redirect" request to the old platform with the help ofserver.inject
API provided byHapiJS
. This may look like this:It looks like
server.inject
API provides everything we need (validation of parameters, all server hooks are called etc.) including ability to setrequest.auth
field if needed (to mark request as already authenticated).This approach also applies nicely to our plan of gradual migration to the new platform: once some logic is fully supported by a new platform then it's no longer "redirected" to the old platform.
Relying on
expressjs
also means that we'll have to do a bit more work in the new platform initially though:jade
templates;Exposing new platform API to the old platform
If we go this route, then entire HTTP stack will be managed by the old platform (
HapiJS
) and new platform we'll have to expose pure programmatic APIs that old platform can leverage.The text was updated successfully, but these errors were encountered: