Crates.io | asbru |
lib.rs | asbru |
version | 0.0.12 |
source | src |
created_at | 2021-08-05 16:25:38.580604 |
updated_at | 2021-08-17 13:31:52.369252 |
description | A Data-oriented service mesh generator |
homepage | |
repository | https://github.com/miaxos/asbru |
max_upload_size | |
id | 432068 |
size | 111,211 |
/!\ WIP: Asbru won't be usable until version 0.1.0 /!
/!\ The target is to have a MVP right now, so the code might be ugly sometimes, it's on purpose to create a prototype first. /!\
Asbru
is an async_graphql
Data-oriented Service Mesh generator: it'll generate an async_graphql
project from a schema with resolvers, dataloaders, data-transformation. It'll create a Data-oriented service mesh from your schema so you'll just have to describe your microservices with your described schema to have a Data-Oriented Service Mesh like Airbnb's.
Asbru
will be able to send metrics to apollo studio, use dataloaders patterns, store cache data into an external datastorage, be served serverless and even more.
Asbru
is an opensource project based on Viaduct, an Airbnb's project presented here.
Tested at Rust version: rustc 1.53.0 (53cb7b09b 2021-06-17)
The rendered code is split accros three folders following an architecture inspired by the Domain Driven Design with 3 layers:
| main.rs
| schema.rs
| application/
| entity/entity.rs
| entity/query.rs
| entity/mutation.rs
| domain/
| entity/entity.rs
| infrastructure/
| http.rs
| db.rs
| ...
infrastructure
will contains every code and definitions structuring the whole application, each files should describe a high-level API which abstract the implementation, in practise, it might be coupled with the implementation.
For instance, instead of using directly reqwest
to do http call, we create a higher level API, which describe how to do a HTTP call, and we provide an implementation for it with reqwest
.
domain
will describe our domains data, which called are made to call an entity, the associated dataloaders.
application
will describe entity with a GraphQL implementation to describe query, mutations, subscriptions.
An interactive example is available with this configuration.
Available schema here:
async_graphql
layout
@serviceBackedNode
).
❌ GRPC
No features right now, but soon.