Under the hood

Architecture guideline

The answer to all your questions for the best implementation of Carbone

Introduction

Carbone Cloud is a turnkey solution that can be easily integrated into any environment.

Here are a few architectural points you can take into account to optimize your document production.

Calling Sequence

Synchrone / Asynchrone

By default, the Carbone API can be used in synchro mode, as shown in the diagram below:

Carbone Synchronious Call

When you send your data to generate a report, the API returns when the document is produced and available.

In some cases, for long renderings (several hundred pages) or when using Batch processing, asynchronous mode is required. In this case, you must add a webhook url in the carbone-webhook-url header.

Asynchronous jobs documentation

The call sequence is then as follows:

Carbone Asynchronious Call

Render and Download with single API call

You can also optimize callflow by retrieving the final file when calling POST /render/:idTemplate.

To do this, simply add the query parameter ?download=true. Here is documentation

Here's the calling sequence:

Carbone single Call

Please note that you need to be able to handle HTTP calls to retrieve a file in response to a POST.

Template management

There are several ways to manage templates:

You need to load your templates into the studio, then retrieve the templateID and insert it into your API calls.

You then push your templates our API POST /template and retrieve the templateID programmatically.

You can decide to send the template in a volatile way, with each generation call. You must then call the API POST /render/template with the following body

  {
    data      : {},
    template  : "base64-encoded-file",
    convertTo : "pdf"
  }

You can add template management to your application by embedding the studio. You can then allow your users to modify or create new templates without leaving your application. The `templateID is then retrieved by Studio events.

Privacy

Carbone design is security based. Our tool uses the minimum of information and does not store or log any json data from your renders.

We comply with the General Data Protection Regulation and Carbone's infrastructure is entirely based in Europe (in France and Germany) to guarantee the maximum protection of your data.

However, if your safety requirements are more challenging, you can also use Carbone in your infrastructure.

Carbone self hosted

Using the Cloud version is recommended for most users.

You can, however, set up a self-hosted instance of Carbone if you wish :

You can run Carbone from your Linux, MacOS or Windows machine, but also deploy on AWS with ECS, GCP with Cloud Run, Azure with Container Apps or in your Kubernetess Cluster.

Carbone on AWS

If your intracture is already deployed on AWS, Carbone is also available on the AWS Marketplace. Using this solution, you can benefit from our tool in just a few minutes, with invoicing generated directly by AWS. Read more