Diffo is a Telecommunications Management Forum (TMF) Service and Resource Manager, built for autonomous networks.
This repo contains two independent example domains, plus an orientation to the underlying Diffo Provider primitives. Read in this order:
- The Access Domain — the warm-up. A single fictional telco delivering DSL service over copper to its own customers. Five resources, one service, a small state machine. Walks the pattern end-to-end.
- The Provider Domain — lifts the lid on the primitives Access has been using the whole time (Specification, Instance, typed Characteristics, Pools, Assignments, Relationships, Place, Party, state machine, the TMF JSON encoder).
- The NBN Domain — the deeper case. A fictional wholesale broadband network shared by many Retail Service Providers. Adds multi-tenancy via Ash Policy, a longer delivery chain, and the named-vs-metrics characteristic pattern with cross-resource inheritance.
Each domain ships with a runnable livebook.
Access Livebook
End-to-end scenario through the code-interface — exchange shelf with line cards, a customer access path through copper, qualify and design a DSL service for the subscriber, then read the inheritance chain.
NBN Livebook
The wholesale story — pick an RSP, build the shareable NNI Group / CVC, provision a subscriber's NBN Ethernet access end-to-end, then read the full delivery chain through inheritance and the live metrics on each resource.
API reference (auto-generated)
- Access Domain API — every code-interface function on
DiffoExample.Access. - NBN Domain API — every code-interface function on
DiffoExample.Nbn.
Both are regenerated from the domain DSL with mix gen.api_docs.
Installation
The package can be installed by adding diffo_example to your list of dependencies in mix.exs:
def deps do
[
{:diffo_example, "~> 0.2"}
]
endYou need Neo4j available. We recommend the Neo4j Community 5 latest, available at the Neo4j Deployment Centre which can be installed locally. You can also configure connection to a cloud-based database service such as Neo4j AuraDB.
Contributions
Contributions are welcome, please start with an issue.
Acknowledgements
Thanks to my colleagues in the Telco industry.
Thanks to the vibrant Elixir and Ash communities, and in particular the Ash Core for ash 🚀
Thanks to Florin Patrascu for bolt_sips and Luis Sagastume for boltx, both forerunners of bolty — the Bolt driver for Neo4j.
Thanks to the Neo4j Core for neo4j and pioneering work on graph databases.