The DoveCôte way of microservices

Developers should be able to develop and test their services locally, without any additional, hefty environment setup.

any additional, hefty environment setup. A visual representation of interactions between services is a must on complicated systems. It should reflect the actual architecture of services.

Developers shouldn’t worry about configuring service discovery—i.e., in which address each service lives.

Microservices should scale out-of-the-box. No extra configuration should be necessary.

It shouldn’t matter to the developer where their services are deployed physically. This is actually the definition of the cloud—as-serverless-as-possible.

Health monitoring is extremely important. We can’t state this enough. Any broken link in a series of microservices is a dead-end.

important. We can’t state this enough. Any broken link in a series of microservices is a dead-end. Microservices could be built in a stateful fashion. A service shouldn’t depend on a 3rd-party solution for keeping a simple, temporary state.

Currently, the best bet on serverless architectures is AWS Lambda. It’s a service that lets you upload your services as zip files (yes…) and AWS schedules and runs them in the cloud. The problem with Lambda is it’s simply developer-hostile. Vendor lock-in is a huge problem, and testing and deploying your functions is another, huge-r problem.

How does DoveCôte solve these problems?

DoveCôte has 2 main interfaces. One is the design tab, and the other is the monitor tab. In the designer, you simply drag and drop services and components onto the canvas. Most of the code and all the hustle of configuration is handled automatically, so you just have to type what your function does, in an event-driven fashion.

Design

Here’s an example of a service that adds two numbers:

module.exports = function(additionResponder) {

additionResponder.on('add', function(req, callback) {

callback(req.firstNumber + req.secondNumber);

});

};

That’s it. DoveCôte deploys this as a public endpoint for you, so it’s instantly available to the internet. The additionResponder here is a box you drag-and-drop in the editor, and it’s automatically injected into your function.

The beauty of this design is that it lets you require any Node.js library. You could require mongoose and use a MongoDB database on the other end of the world. You could require mqtt and delve deep into the world of IoT. What tools you are going to use in your services are entirely up to you, and you are not vendor-locked-in in any way.

Behind the scenes, DoveCôte makes use of the excellent library cote for interoperability, service discovery and communication among your services.

Drag-and-drop your services and components, wire them together with virtual pipes and you are done.

Once you are satisfied with your code, a single click deploys your application to the cloud and gives you a public endpoint, as well as documentation and sample code generated to test your services. Copy/paste the samples into the browser’s console and instantly test if your services work.

The good thing is, although it all looks like magic, it’s just intelligent design. The mechanism behind DoveCôte is so simple and idempotent, it can run on your local machine by just including a small bootstrap module in your code. Design in the frontend and download your code and run it locally. Or develop locally and just upload your code with a single command to see it in the designer. It works both ways. Locally, your services run on your machine. When deployed they run in… why should you care? It just works. But if you wonder, DoveCôte runs your services in isolated Docker containers, so that they can be deployed on any server and are guaranteed to work wherever they are. You can even throw in your own pool of machines.

Monitor

Visualizing communication among the services are extremely important in microservices. Often you will find that a single request goes through 5–8 services in order to be answered. Therefore it’s essential that you see which service is connected to another. The monitor tab gives you a visual overview of your services, their connections, and a log of all of your services combined in an intuitive interface.

These two interfaces solve the problem of designing, visualizing, orchestration and monitoring of your services. Service discovery is automatic. Deployment is also automatic, so the only thing left to you is to enjoy your set up.