This adds two hypothetical variants to the Mu demo, "building" new capabilities
up from the basic Express and MongoDB app we start with:
1) The first variant is to leverage the Mu SDK for service discovery and
configuration, eliminating the "loosely typed" approach that is common with
Docker (e.g., having to fetch connection URLs from arguments, environment
variables, etc). This extends the Mu type system "into" the Docker container,
whereas previously it stopped at the boundary.
2) The second variant really takes this to the next level, embellishing the nice
DSL-like approach. In this model, infrastructure is expressed in code.
Instead of manually creating a volume, we will arrange for the mongodb/mongodb
to auto-mount a mu/x/fs/volume, as per [the cloud-neutral design doc](/docs/xcloud.md).
This just adds a simple voting app for the demo script. It leverages
a Node.js Express app for the frontend and a MongoDB database for the backend.
It conditionally provisions and attaches to an AWS Elastic Block Store volume
in the event that it's targeting an AWS cluster, and ephemeral storage otherwise.
This was really just a brainstorming exercise that helped get to the final
model we landed on. I'm archiving it for posterity. I'll decide whether to
carry it forward or delete it and leave it as an artifact for future reference
as I make more progress on the overall architecture and file format specification.
This was an interesting example I found in the Mulesoft GitHub repos. It seemed like
a perfect candidate for Riff/Mu/Lambda, so I sketched out what it might look like.
This change adds a .mu/ directory to the vote50 app. Inside are the "expected"
contents that the Mu compiler should output. Eventually we will validate against
this that the (currently non-existent) compiler generates the correct thing.
This isn't complete, although I can manually create bits and pieces of the stacks
using CloudFormation. More files will come; for example, the code packages.
In a nutshell:
.mu/ # Shared files agnostic to the cloud target
aws-native-cf/ # Files specific to the AWS CloudFormation target
app.template.yaml # The CloudFormation stack for the overall app
services/ # A directory containing service-specific stacks
voting.template.yaml # The CloudFormation stack for the VotingService
services/ # Service files agnostic to the cloud target
voting.proto # The gRPC definition for VotingService's API
mu.yaml # The Mu package manifest (minimal for now)