cevado

cevado

Boto - A library to unify data sources through attribute modeling in a seamless graph

Boto is a library heavily inspired on Clojure/Clojurescript library called Pathom.

The idea here is to stop thinking of data inside entities and actually as a graph of relations between attributes. I’m using the word attribute here to differentiate it from just a key-value pair. An attribute has a unique meaning through your application, even if provided by different sources. Imagine an id of an external service that can be queried in a local storage(being it a cache or sql database).

For boto it doesn’t matter where you’re getting this data from, it can be an ecto query, an http request, grpc request. Anything that you can express with an elixir syncrhonous function that receives a set of attributes as parameter and returns a set of mapped attributes.

I understand that it’s not an easy thing to understand, so there is a livemd file showing some examples of how to use the library:

It’s worth mentioning that this is not a complete project and please don’t use it in production yet. I’m iterating over it to achieve a result that is more idiomatic to the erlang ecossystem. There are a lot of open issues on codeberg, and I’m more than happy to discuss good approaches with the community.

Actually, i’ve been iterating ideas around it for quite some time, for exemple:
https://forum.elixirforum.com/t/ectoapi-a-library-to-use-ecto-to-describe-external-api-resources/
https://forum.elixirforum.com/t/should-we-have-namespaced-atoms-in-elixir/

Most Liked

csadewa

csadewa

It’s fascinating! How a query from some input information got resolved (via the graph-like connection?) to get relevant output information remind me of prolog / Rule based, which the engine automatically infer output fact from basic set of input fact.

cevado

cevado

it’s a graph for sure, I’m using erlang digraph implementation. the attributes are vertices, and the edges are the resolvers, directed from the input to the outputs.

and you can produce facts about the attributes. for the weather example in the livemd file, you can have a :locantion@is_cold? attribute that requires :location@temp, in the same way you can have a :location@is_hot?. since resolvers are just functions, and attributes are values with a meaning, you can model different ideas around it.

I’m currently thinking on how to handle failures while I finish improving the documentation and write tests.

Where Next?

Popular in Announcing Top

martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
maltoe
Hello! Came here to announce ChromicPDF, a pet project PDF generator I’ve been working on for the past few months. Why another PDF gener...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52673 488
New
hpopp
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
mplatts
With HEEX released we decided to start a components library using Tailwind CSS - check it out here: Petal Components. We also have a boi...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39467 209
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement