I’ve previously looked at how we can query graph databases using Elixir. But now if we want to generate graph data structures natively, how can we do that? Well, turns out that there is the excellent
libgraph package by Paul Schoenfelder that allows us to do just that.
libgraph project page provides a rationale for why this package was developed. Basically it addresses a number of shortcomings in the earlier Erlang module
digraph, both as regards performance and extensibility.
We’re going to give a quick introduction here to
libgraph, talk about serializing and visualizing
libgraph graphs, import a
In earlier posts I’ve shown how to access and manipulate RDF graphs using Elixir and separately also how to access and manipulate labeled property graphs (or LPG graphs). What I’d like to focus on here is conversions from one graph form to another in Elixir.
But first a quick recap on why.
Why graphs? Because graphs are everywhere. Because graphs are about connected data. Because graphs are essentially about large-scale data integration.
We heard recently at the London leg of the Neo4j GraphTour about the relationship between graphs and ML. Expect to see graphs figure more prominently in ML solutions.
Previously in this series I have been looking at how to access RDF graphs from Elixir. But this is only one side of the graph story. There is also a whole other world of property graphs to consider.
Property graphs – also known as ‘labeled’ property graphs – are more generic than RDF graphs in that both nodes and edges may be attributed properties, and edges may be directed or undirected. That said, property graphs typically employ local names and have a weak data model and so do not support any common semantics.
See here for a nice exposition by…
Now one can’t really claim to be a bona fide data scientist these days if one isn’t brandishing some flavour of notebook to save and run one’s calculations. And arguably one of the best known names in this breed of application is the Jupyter Notebook which is an excellent vehicle for data processing with Python. And Python as a language has become almost synonymous with data wrangling.
In this post I aim to provide some reasons for why Elixir (and under the hood Erlang) ushers in a whole new paradigm for distributed compute and how it makes this both simple and fun to master for semantic web applications.
(And just to anticipate any comment on the figure above signifying some kind of distributed compute pattern, check out the note at the end of this post.)
The essence of distributed compute is embedded deep within the genes of the language. Erlang was by design developed by Ericsson to manage telephony applications and to provide for fault tolerant processing…
Following up on my last post about querying RDF using the Elixir
SPARQL.Client.ex libraries from Marcel Otto, I wanted to focus here on a simple use case with SHACL and an RDF shape used to provide a template description for the result graph. That is, instead of using a specific SPARQL query we will generate SPARQL queries from the RDF shape that defines the valid result graphs. And in doing so we will also bump up against some limitations with the current
SPARQL.ex implementation and show how we might work around those.
In my last post I talked about the
RDF.ex package by Marcel Otto for RDF processing in Elixir. Now Marcel has also added a
SPARQL.ex package for querying RDF datastores with SPARQL. So let’s have a look at that. In fact there are two separate packages:
SPARQL.ex for querying in-memory RDF models, and
SPARQL.Client.ex for dispatching queries to remote RDF models. So let’s first deal with local (in-memory) models and then go on to remote models. (And again a special thanks to Marcel for reviewing this post and making super-useful comments as well as suggesting improvements.)
I’ve recently begun to look at Elixir again. This time though in a little more detail. I had been aware of this elegant new language some years back when it was still shiny and new but then other things intervened and it all got pushed back. And Erlang too I had earlier played with and was also very struck with. But now seemed like a pretty good time to take up this exploring again and to get a better handle on the language and see what it could actually do for me.
I won’t say too much about Elixir itself…
Distributed data, distributed compute – the graph! | #writing, #workseeking