Coworks Logo

Introduction

Coworks is a unified serverless microservices framework based on AWS technologies.

Each atomic microservice (defined as class TechMicroService) is a simple python class deployed as a serverless AWS Lambda, and composition of microservices (defined as class BizMicroService) is performed over the AWS Step Function product.

Other AWS technologies are used for logging, administration, …

Documentation

Using and derived from Chalice and some ideas from Flask-Classy.

Other tools used:

  • Terraform - Infrastructure configuration management tool.

What does microservice mean in Coworks?

In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms.

In Microservice Architecture (Aligning Principles, Practices, and Culture), authors M. Amundsen, I. Nadareishvili, R. Mitra, and M. McLarty add detail to the definition by outlining traits microservice applications share:

  • Small in size
  • Messaging enabled
  • Bounded by contexts
  • Autonomously developed
  • Independently deployable
  • Decentralized
  • Built and released with automated processes

In Coworks, microservices are serverless services over APIs.

Small in size
Simply implemented as a python class.
Messaging enabled
API Gateway request-response managed services.
Service oriented
Technological service on Lambda and Functional service over Step Function.
Independently deployable
All needed deployment information defined in the python class.
Decentralized
Serverless components.
Smart endpoints
Deriving directly from class methods.

Two levels of microservice

In Coworks microservices are divided in two categories :

Small technical microservice

Implemented as a simple AWS Lambda function, this kind of microservice is dedicated to technical operations over a specific service.

Here are some examples of technical services in Coworks :

  • Mail
  • Jinja templating
  • Odoo

Functional business microservice

Implemented over AWS Step Function, this kind of microservice allows non programmer to construct functional business workflows.

Here are some examples of business services in Coworks :

  • Invoicing Process
  • Automated Dashbords

Distinction between TechMicroservice and BizMicroservice is based not only on granularity size but also:

  • TechMicroservice should only be used as receivers of orders coming from BizMicroservices.
  • A BizMicroservice represents a logical workflow of actions while a MicroService represents a simple concrete action.
  • A ThechMicroservice is an independant microservice while a BizMicroservice is connected to event handlers (cron, notification, event, …).
  • A ThechMicroservice is more a handler pattern and BizMicroservice a reactor pattern.

Taking part in the project

If you want to contribute to this project in any kind, your help will be very welcome. Don’t hesitate to contact any project’s member.

Indices and tables