|0.0.12||Aug 17, 2021|
|0.0.11||Aug 16, 2021|
#987 in Network programming
Asbru - A Data-oriented Service Mesh
/!\ 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
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:
- ✅ Manage a configuration files.
- ✅ Docker build
- ❌ Codegen a
- ✅ Object generation layout
- ✅ Modfiles
- ✅ Cargo
- ✅ Rust types on GraphQL scalars
- ✅ Enum
- ✅ Simple Query
- ❌ Interfaces
- ❌ Union
- ❌ Mutations
- ❌ Connections
- ❌ Architecture & Connect to services with a directive (at Airbnb it's something like
- ✅ serviceBackedQuery
- ❌ serviceBackedNode
- ❌ serviceBackedConnection
- ❌ Dataloaders
- ❌ Intra-request cache
- ❌ Tracing
- ❌ Extensions (Apollo Studio)
- ❌ Subscriptions
- ❌ derivedField
- ❌ GRPC
No features right now, but soon.