Blonde Maybe
Blonde Maybe
ATApache TinkerPop
Created by Blonde Maybe on 4/28/2023 in #questions
Simple production database alternatives for small Gremlin.Net applications
Hi! What production database alternatives are there out there for small DotNet applications with Gremlin.Net? The reason why I'm asking is because there does not seem to be any easy to use and maintain solutions: they either require a lot production infrastructure and maintenance (JanusGraph), have high enterance fees (Datastax Enterprice), are only partially supporting old versions og Gremlin (CosmosDB) or are lacking pre-defined serialisers for DotNet (e.g ArangoDB). I might be misjudging hugely in the above paragraph, but I hope I it gives an explanation of the issue with our current use case: As a small project team building a small Gremlin application in C# that needs a way of running our application in a production environment for small-scale usage and demos: how can we do that most efficiently? PS: We would have tried out AWS Neptune DB if we were not bound to using Azure by business policy. Any tips and advice appreciated!
5 replies
ATApache TinkerPop
Created by Blonde Maybe on 3/27/2023 in #questions
Order group count result alphabetically
9 replies
ATApache TinkerPop
Created by Blonde Maybe on 3/15/2023 in #questions
Dotnet best practice: converting Vertex properties to Model
A very common task in Dotnet is to convert a stored entity into a Model class. How is this best accomplished in Gremlin.Net? In other words: what does "the magic step" look like in the snippet below?
private record Person()
{
public string Name { get; set; }
public int Age { get; set; }
}

...

Person person = g.AddV("Person")
.Property("Name", "Frank")
.Property("Age", 33)
//Magic step
.Next()
private record Person()
{
public string Name { get; set; }
public int Age { get; set; }
}

...

Person person = g.AddV("Person")
.Property("Name", "Frank")
.Property("Age", 33)
//Magic step
.Next()
My best guess without manually mapping each property from ElementMap would be something along the lines of:
var personMap = g.AddV("Person")
.Property("Name", "Frank")
.Property("Age", 33)
.ElementMap<dynamic>()
.Next()

// Pseudocode:
Person person = FromJson<Person>(ToJson(personMap))
var personMap = g.AddV("Person")
.Property("Name", "Frank")
.Property("Age", 33)
.ElementMap<dynamic>()
.Next()

// Pseudocode:
Person person = FromJson<Person>(ToJson(personMap))
But this seems like a hack, and not a proper solution.
7 replies
ATApache TinkerPop
Created by Blonde Maybe on 3/15/2023 in #questions
What is the use of adding type information to e.g ElementMap<type> in Gremlin.Net?
10 replies