Closed ericerway closed 5 years ago
Here is a short summary of the issues we uncovered at our first scoping meeting last Thursday with @melnikovi, @rganin, @bbatsche, and @billygilbert. We may have a followup meeting to define and size the research-spike story, but I think we can do it on Slack, for less interruption to everyone’s schedule. Here is what we discussed:
Associated internal ticket is https://magento2.atlassian.net/browse/MAGECLOUD-2983.
This issue is for the following packages:
[ ]
venia-concept
[ ]pwa-buildpack
[ ]peregrine
[ ]pwa-devdocs
[X]upward-js
[X]upward-spec
This issue is a:
[ ] Bug [X] Feature suggestion [ ] Documentation issue [ ] Other (Please Specify)
Environment
Description
Libraries which create HTTP servers using UPWARD configuration files should exist in many languages. PHP should be the highest priority for the next implementation of UPWARD, because a PHP UPWARD server would greatly simplify deployments of PWA Studio storefronts to the Magento Cloud.
UPWARD is not JavaScript-specific; it is a specification whose reference implementation is in JavaScript,
upward-js
, much like GraphQL is a cross-platform protocol whose reference implementation isgraphql-js
. Yet GraphQL servers and clients are implemented in many popular languages.Research and try to implement a PHP application which handles web requests as defined by an UPWARD configuration file.
Expected result:
A PWA developer should be able to deploy a PWA build artifact, including static files, environment variables, and an UPWARD configuration, to an environment that only supports PHP. That environment should provide a script or executable which interprets the UPWARD file, binds to a port, and serves HTTP requests according to the UPWARD file's instructions.
Possible solutions:
The UPWARD PHP server MAY BE implemented as a Magento 2.3 Module, but it does not have to be; it can be a standalone PHP application.
In either case, it may have external dependencies (such as Apache/nginx, Redis) but not beyond the external dependencies of Magento 2.3 itself.
A cross-platform test suite for UPWARD implementations exists. The Quickstart section of the README describes how to run the full test suite on any server launched by a shell script. The test suite is authoritative, but incomplete.