Skip to main content

Introduction

caution

This is experimental version of CellularJS(version < 1.0.0), so it is not ready for production. API may be changed, you should use it at your own risk!.

1. What is it?#

CellularJS is a hybrid microservices framework. The main purpose of the framework is providing flexible scalability for software development, or you can say, better developer experience.

2. Hybrid microservices#

CellularJS is not only about code, but also come with very flexible strategy to help your business grow from zero to big, and that strategy is supported by hybrid architecture.

Hybrid architecure or hybrid microservices can be monolithic or a combination of monolithic and microservices, ..., it all depends on your needs. The main idea behind hybrid architecture is starting with small stuff then grow it up on demand. This architecture is very suitable for people who want to focus on business viability, and also need a room for scalability at the same time.

3. How it come true?#

Hybrid microservices sounds interesting but it is not easy, there are many traps out there. Let's see how CellularJS help you out.

At the heart of CellularJS are many stuff got inspiration from Domain Driven Design(DDD):

  • From anti-corruption layer and (a part of) ubiquitous language, it is "message": Services, no matter green or brown, when they want to talk to each others they must use a unified language. In CellularJS, the language is implemented as internal message.
  • From bounded context and aggregate root, it is "flow": It is ugly if a service can access directly into internal of other service for changing state or anything else. For integrity, it is only allowed to access via published services.

All of above theories will have nothing special if you choose microservices as development method. The natural physical isolation of microservices will help you detect bounded context violation easier. Hybrid architecture, because of lack of this isolation, is fragile. Thus, you need to have a theory to guide you.

Beside of a good theory like DDD, you also need a tool too. You can consider CellularJS as a tool that enhance isolation by programmatic way. CellularJS create a programmatic network(or virtual network) where services can communicate with each others via a message flow.

With the help of virtual network, your services will become protocol-agnostic. No matter the driver use function call, HTTP, or AMQP, ..., you will get the same message. As a result, you can move to real microservices more easily.

One more time, hybrid architecture is fragile, you need a good theory to follow. CellularJS is about programmatic isolation tool, NOT a physical one.

Happy coding ๐Ÿ˜

4. Contributor#

Do you like it? Have a look at contributor guideline.