Skip to content

The Tangram Composer is a server/edge side HTML composition service.

License

Notifications You must be signed in to change notification settings

thetangram/composer

Repository files navigation

Build Status GoDoc License Go Report Card

The Tangram Composer

The Tangram Composer is a server/edge side HTML composition service. Its main goal is solving the microservices frontend issue faced when you build a distributed microservices system, each microservice with it's own lifecycle and rollout. In this scenario it's usual to build the user interface as a monolith (aka. BFF), aggregator of microservices data. This model creates user interface-microservices one to one dependencies, so in a lot of cases the rollout of each piece is bound, then the service autonomy is harder and going to continous deployment can be compromissed.

Features

  • Compose HTML based on HTML components/microservices
  • 100% stateless service.
  • Can be deplloyed as stand alone service or in a serverless architecture.
  • Request headers and cookies passthrough to components.
  • Request headers and cookies filtering to components.
  • Component response headers merging.
  • Component meta information, scripts and stylesheets merging.
  • Concurrent composition.
  • Stand alone and container based artifacts.
  • ... TBD

Documentation

You can find all the project documentation in the documentation folder. We recommend you to start reading the project description and the glossary.

About the name

From Wikipedia The tangram (Chinese: 七巧板; pinyin: qīqiǎobǎn; literally: "seven boards of skill") is a dissection puzzle consisting of seven flat shapes, called tans, which are put together to form shapes. The objective of the puzzle is to form a specific shape (given only an outline or silhouette) using all seven pieces, which may not overlap.

Getting Started

Requisites

In order to build The Tangram Composer you need Go, Make, Dep, Docker and zip. The complete list of tools:

  • Go 1.9+, as programming language.
  • Make, as build automation tool.
  • Dep, as dependency management tool.
  • Docker 17.09+, to build container.
  • Zip, to package AWS Lambda deployment.

Project structure

This project follows the Standard Go Project Layout.

Building

This project uses make as build automation tool. The Makefile rules are:

  • clean, to remove all binaries from dist/ directory.
  • compile (default rule), to complile the code.
  • run, to compile and run the standalone version.
  • test, to run the test and code coverage.
  • build, to compile and genrate the final binary artifacts. THis artifacts are full-independent binary files, and also ave some optimizations.
  • package, to generate the docker image (installed in the local repository) and the AWS Lamdba package.

Other projects like this

This is not the one and only composition solution. We have a lot of friends out there, giving us a lot of inspiration. Take a look on them.

  • Compoxure is a composition middleware that acts as a proxy replacement for ESI os SSI for backend services and compose fragments from microservices into the response
  • Skipper is the Zalando's HTTP router and reverse proxy for service composition.
  • Convergent UI is a special Zuul Filter that aims to provide a solution to the Distributed Composition problem faced when building a GUI within a Micro Services Architecture.

Releases

No releases published

Packages

No packages published