Friends, on the eve of the May holidays, we decided not to overwhelm you with complex technical articles, so we found quite interesting, and most importantly, easy-to-read material, which we gladly share with you. This material we want to coincide with the launch of the course
"Web-developer in Python" .
The original can be found
here .

')
The acquisition of
Vivendi dailymotion three years ago was a turning point for our organization. This allowed us to rethink the vector of our work, to rethink our work from beginning to end. We used the opportunity to assess
dailymotion as a whole, rethink our infrastructure and, more importantly, the architecture of our products.
In the end, the conducted self-analysis confirmed what we already knew: we wanted to territorially distribute our platform and develop
API-interfaces , mobile and TV applications. This marked the rejection of the current monolithic structure and the adoption of an API-based approach. This article describes the path we took.
Criteria and concept checksWe started the project with the definition of API criteria, which ultimately narrowed to four points:
- Ensuring a good DX (developer experience), ease of use and implementation;
- Cultivating a solid and growing community , one that would aggregate and use common technologies;
- Behavior similar to the gateway in terms of software architecture , aimed at simplifying the transformation of our system integration from monolith to SOA (service-oriented architecture);
- The ability to implement API management tools, namely API management, documentation, and data access.
Next, we selected several API models and tested several concepts in order to understand their feasibility:
- Rest API with Swagger
- GraphQL API with Graphene
- API with Falcor

After rigorous testing, we found that
GraphQL and its implementations of Graphene best fit our criteria in comparison with other models. This allowed our front-end developers to more easily use our API, and at the same time simplify its use in client applications (for example, React JS and Apollo Client). In our architecture, GraphQL also turned out to be simpler and more efficient as a pattern gateway. As a result, we finally decided to move on with GraphQL and Graphene.
Production pathIn April 2017, after intensive semi-annual development, we went into production with our API. By the summer, we transplanted all the
dailymotion products (web, mobile and TV) to our GraphQL API.

When we chose GraphQL three years ago, it was still in beta and did not reach the popularity it has today. We were the first major players in this arena and this made our internal reconstruction even more pleasant.
Birth TartifletteIn the first months of 2018, after more than half a year of using Graphene, we decided to go a step further and write our own GraphQL engine. This allowed us to implement some requirements that were not met by Graphene. We developed criteria for our own engine. He must:
- Provide the best DX , oriented to the thinking of Python developers;
- Use SDL (Schema Definition Language);
- Use asyncio as a self-executing engine;
After nearly a year of development and many weeks of testing our infrastructure (an average of over 100 million calls per day were processed), we proudly offer our own open source Tartiflette engine to the GraphQL community.
DNA tartifletteTartiflette is a implementation of GraphQL Server built on
Python 3.6+The
GraphQL scheme
is described using the new
SDL (Schema Definition Language) ;
Productivity is a key element of our work and this is reflected in
Tartiflette ;
Built to reflect
Zen of Python . Not overly complicated.
Hello world on Tartiflette
import asyncio from tartiflette import Engine, Resolver @Resolver("Query.hello") async def resolver_hello(parent, args, ctx, info): return "hello " + args["name"] async def run(): ttftt = Engine(""" type Query { hello(name: String): String } """) result = await ttftt.execute( query='query { hello(name: "Chuck") }' ) print(result)
You can learn about the new functionality in the
tartiflette.io manual .
What happens next with Tartiflette?Open source Tartiflette is only the first step. Here are some ideas and future plans for the development of Tartiflette:
- "Polishing" documentation for users and the community;
- Providing more examples and expanding use cases to encourage you to experiment with Tartiflette's features ;
- Increased productivity , mainly at the level of the performing engine.
And we also need you!
You can use our project for almost any purpose and help us develop Tartiflette! Please check it for strength, feel free to look for errors or inconsistencies in the code and provide feedback to improve the product. We truly believe that Tartiflette will be better in close collaboration with the community.
How to contribute to the project?Tartiflette on Github ;
Read the
tartiflette.io documentation;
Send feedback and suggestions to
Slack ;
Join the
Twitter community.