Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .formatter.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ locals_without_parens = [
field: 3,
expect: 1,
relate: 1,
translate: 1,
guard: 1,
customize: 1,
order: 1,
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
erlang 28.1
elixir 1.19.4-otp-28
erlang 28.3.1
elixir 1.19.5-otp-28
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ by adding `diffo` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:diffo, "~> 0.1.3"}
{:diffo, "~> 0.1.4"}
]
end
```
Expand Down Expand Up @@ -68,11 +68,11 @@ Contributions are welcome, please start with either a [discussion](https://githu

## Acknowledgements

Thanks to [Telstra](https://www.telstra.com.au/) for supporting innovation in orchestration and inventory shared-tech which resulted in the award winning difference engine [2024 TMF Excellence Award in Autonomous Networks](https://www.tmforum.org/about/awards-and-recognition/excellence-awards/winners-2024/) powering three network service entities enabling outstanding product experience [2025 TMF Excellence Award in Customer Experience](https://www.tmforum.org/about/awards-and-recognition/excellence-awards/winners-2025/) and inspiring both this open source and internal shared-tech.
Thanks to my colleagues in the Telco industry, in particular those who I've collaborated with in the Telco industry.

Thanks to the [Ash Core](https://github.com/ash-project) for [ash](https://github.com/ash-project/ash) 🚀
Thanks to the vibrant Elixir and Ash communities, and in particular the [Ash Core](https://github.com/ash-project) for [ash](https://github.com/ash-project/ash) 🚀

Thanks to [Sagastume](https://github.com/sagastume) for [boltx](https://github.com/tiagodavi/ex4j) which is used by the [Ash Neo4j DataLayer](https://github.com/diffo-dev/ash_neo4j)
Thanks to [Florin Patrascu](https://github.com/florinpatrascu) for [bolt_sips](https://github.com/florinpatrascu/bolt_sips) and[Luis Sagastume](https://github.com/sagastume) for [boltx](https://github.com/sagastume/boltx), both forerunners of [bolty](https://github.com/diffo-dev/bolty) the bolt driver for neo4j.

Thanks to the [Neo4j Core](https://github.com/neo4j) for [neo4j](https://github.com/neo4j/neo4j) and pioneering work on graph databases.

Expand Down
2 changes: 1 addition & 1 deletion config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import Config

config :boltx, Bolt,
config :bolty, Bolt,
uri: "bolt://localhost:7687",
auth: [username: "neo4j", password: "password"],
user_agent: "DiffoDev/1",
Expand Down
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ config :logger, level: :warning
config :ash, disable_async?: true
config :ash, :missed_notifications, :ignore

config :boltx, Bolt,
config :bolty, Bolt,
uri: "bolt://localhost:7687",
auth: [username: "neo4j", password: "password"],
user_agent: "DiffoTest/1",
Expand Down
12 changes: 6 additions & 6 deletions diffo.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SPDX-License-Identifier: MIT
```elixir
Mix.install(
[
{:diffo, "~> 0.1.3"}
{:diffo, "~> 0.1.4"}
],
consolidate_protocols: false
)
Expand All @@ -24,7 +24,7 @@ If you are not already familiar with Ash then please explore [Ash Get Started](h

In this livebook tutorial you will learn:

* Installing Neo4j and Configuring Boltx
* Installing Neo4j and Configuring Bolty
* Implementing a Minimal Service
* Adding Initial Parties and Places
* Defining Service Features and Characteristics
Expand All @@ -33,7 +33,7 @@ In this livebook tutorial you will learn:
* Advancing Service State
* Relating a Service with other Services and Resources

## Installing Neo4j and Configuring Boltx
## Installing Neo4j and Configuring Bolty

Diffo uses the [Ash Neo4j DataLayer](https://github.com/diffo-dev/ash_neo4j), which requires Neo4j to be installed

Expand All @@ -59,16 +59,16 @@ config = [
]
```

Boltx needs a process in your supervision tree, this will start one with the config if not already running:
Bolty needs a process in your supervision tree, this will start one with the config if not already running:

```elixir
AshNeo4j.BoltxHelper.start(config)
AshNeo4j.BoltyHelper.start(config)
```

Now you should be able to verify that Neo4j is running:

```elixir
AshNeo4j.BoltxHelper.is_connected()
AshNeo4j.BoltyHelper.is_connected()
```

You can get all nodes related to other nodes the following query:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SPDX-License-Identifier: MIT
```elixir
Mix.install(
[
{:diffo, "~> 0.1.3"}
{:diffo, "~> 0.1.4"}
],
consolidate_protocols: false
)
Expand All @@ -32,7 +32,7 @@ In this 'Diffo Provider Instance Extension' livebook you will learn about:
* Using the Assigner
* Composing a Resource from partially assigned Resources

### Installing Neo4j and Configuring Boltx
### Installing Neo4j and Configuring Bolty

Diffo uses the [Ash Neo4j DataLayer](https://github.com/diffo-dev/ash_neo4j), which requires Neo4j to be installed

Expand All @@ -58,16 +58,16 @@ config = [
]
```

Boltx needs a process in your supervision tree, this will start one with the config if not already running:
Bolty needs a process in your supervision tree, this will start one with the config if not already running:

```elixir
AshNeo4j.BoltxHelper.start(config)
AshNeo4j.BoltyHelper.start(config)
```

Now you should be able to verify that Neo4j is running:

```elixir
AshNeo4j.BoltxHelper.is_connected()
AshNeo4j.BoltyHelper.is_connected()
```

You can get all nodes related to other nodes the following query:
Expand Down
1 change: 1 addition & 0 deletions lib/diffo/provider/components/base_instance.ex
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ defmodule Diffo.Provider.BaseInstance do
allow_nil? false
public? true
default &Diffo.Uuid.uuid4/0
source :uuid
end

attribute :which, :atom do
Expand Down
2 changes: 0 additions & 2 deletions lib/diffo/provider/components/entity.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ defmodule Diffo.Provider.Entity do
relate [
{:entity_refs, :RELATES, :incoming, :EntityRef}
]

translate id: :uuid
end

jason do
Expand Down
3 changes: 1 addition & 2 deletions lib/diffo/provider/components/party.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ defmodule Diffo.Provider.Party do
end

neo4j do
translate id: :key

relate [
{:party_refs, :RELATES, :incoming, :PartyRef},
{:external_identifiers, :OWNS, :outgoing, :ExternalIdentifier},
Expand Down Expand Up @@ -90,6 +88,7 @@ defmodule Diffo.Provider.Party do
primary_key? true
allow_nil? false
public? true
source :key
end

attribute :href, :string do
Expand Down
3 changes: 1 addition & 2 deletions lib/diffo/provider/components/place.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ defmodule Diffo.Provider.Place do
end

neo4j do
translate id: :key

relate [
{:place_refs, :RELATES, :incoming, :PlaceRef}
]
Expand Down Expand Up @@ -84,6 +82,7 @@ defmodule Diffo.Provider.Place do
primary_key? true
allow_nil? false
public? true
source :key
end

attribute :href, :string do
Expand Down
4 changes: 2 additions & 2 deletions lib/diffo/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule Diffo.Repo do
end

def start_link(_stack) do
config = Application.get_env(:boltx, Bolt)
Boltx.start_link(config)
config = Application.get_env(:bolty, Bolt)
Bolty.start_link(config)
end
end
9 changes: 4 additions & 5 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Diffo.MixProject do
@moduledoc false
use Mix.Project

@version "0.1.3"
@version "0.1.4"
@name "Diffo"
@description "TMF Service and Resource Manager with a difference"
@github_url "https://github.com/diffo-dev/diffo"
Expand Down Expand Up @@ -94,11 +94,10 @@ defmodule Diffo.MixProject do
{:ash_outstanding, "~> 0.2.3"},
{:ash_jason, "~> 3.0"},
{:ash_state_machine, "~> 0.2.12"},
{:ash_neo4j, ash_neo4j_version("~> 0.2.12")},
{:boltx, "~> 0.0.6"},
{:ash, ash_version("~> 3.0 and >= 3.10.0")},
{:ash_neo4j, ash_neo4j_version("~> 0.2.13")},
{:ash, ash_version("~> 3.0 and >= 3.19.1")},
{:uuid, "~> 1.1"},
{:igniter, "~> 0.5", only: [:dev, :test]},
{:igniter, ">= 0.6.29 and < 1.0.0-0", [env: :prod, hex: "igniter", repo: "hexpm", optional: true]},
{:ex_doc, "~> 0.37", only: [:dev, :test], runtime: false}
]
end
Expand Down
Loading
Loading