magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.07k stars 684 forks source link

Research and build a proof-of-concept UPWARD PHP server [SPIKE] #441

Closed ericerway closed 5 years ago

ericerway commented 6 years ago

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

Question Answer
Magento version 2.3.0-develop
Operating System + version Magento ECE or any *nix

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 is graphql-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.

zetlen commented 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:

zetlen commented 5 years ago

Associated internal ticket is https://magento2.atlassian.net/browse/MAGECLOUD-2983.