Tag Archives: network

Modeling Events in Neo4j

No. Not modeling events, I’m talking about modeling events. Things that happen at different times typically in some known sequence. If you are a long time follower of my blog you know I love promoting the date property of an event into the relationship type to make use of Neo4j’s individual Node-RelationshipType partitioning to speed up my queries, but I’m going to show you something different today.
Continue reading

Tagged , , , , , , , , , ,

Filtering Connected Dynamic Forms

Sometimes I contrast Neo4j against relational databases by saying Neo4j is more like a dynamic typed language, and relational databases are more like a static typed language. In Neo4j you don’t have Tables or table definitions, any property can be of any valid value (Java primitives, arrays of Java primitives as well as time and spatial types). Two nodes with the same Label can have completely different properties, and any key can be of any type for different nodes. So for example a User labeled node may have the “id” property be “xyz”, while the “id” property for a Location labeled node may be a spatial type… but another User labeled node may also have the “id” property be a number or an array of floats, or whatever. This kind of freedom can drive people crazy, but it can also be leveraged to make very dynamic applications easy.
Continue reading

Tagged , , , , , , , ,

Network Routing in Neo4j

People use Neo4j to manage enterprise architectures all the time. If you haven’t seen this presentation from Thomas Lawrence from Amadeus, then you owe it to yourself to watch it. But what about lower level networks? Can we use Neo4j to model routing in a physical network? Of course we can, and today I’ll show you how.

Continue reading

Tagged , , , , , , , , , , , ,

Calculating the best Rail Road paths in Neo4j

Did you know that Chicago is the most important railroad center in North America? Chicago has more lines of track radiating in more directions than from any other city. The windy city has long been the most important interchange point for freight traffic between the nation’s major railroads and it is the hub of Amtrak, the intercity rail passenger system. You may not realize it, but railroad tracks and graph theory have a history together. Back in the mid 1950s the US Military had an interest in finding out how much capacity the Soviet railway network had to move cargo from the Western Soviet Union to Eastern Europe. This lead to the Maximum Flow problem and the Ford–Fulkerson algorithm to solve it.

Continue reading

Tagged , , , , , , , , , , ,

Neo4j Stored Procedures for Devs that don’t know Java (yet)

When I joined Neo4j, I didn’t know how to write Java. I was a SQL developer who knew some Ruby and that’s about it. Luckily I had Michael Hunger, Stefan Armbruster, David Montag and others to help me out. I realize however that you may not be so lucky. So today I’m going to share with you a set of slides to help you start you on your journey of using the full power of Neo4j.
Continue reading

Tagged , , , , , , , , , ,

Dynamic Rule Based Decision Trees in Neo4j – Part 4

So far I’ve only showed you how to traverse a decision tree in Neo4j. The assumption being that you would either create the rules yourself from expert knowledge or via an external algorithm. Today we’re going to add an algorithm to build a decision tree (well a decision stream) right into Neo4j. We will simply pass in the training data and let it build the tree for us. If you are reading this part without reading parts one, two, and three, you should because this builds on what we learned along the way.

Continue reading

Tagged , , , , , , , , , , , , ,

Finding your neighbors using Neo4j

In Mr. Rogers’ Neighborhood, the question “Won’t you be my neighbor?” is an invitation for somebody to be close to you. In graphs, it’s an invitation to traverse. The closest neighbors of a node are those reachable by a single relationship hop, but we can also consider nodes two, three or more hops away our neighbors as well. How can we find them in Neo4j? Using the “star”:
Continue reading

Tagged , , , , , , , , , ,

Building a Dating site with Neo4j – Part Twelve

It’s time to add “visions of love” to our dating site. So far our posts have been just text status updates and while it is possible to fall in love with someone’s words, it’s harder if they look like the troll that lives under the bridge. So what’s the plan here? Well… like most databases out there, it’s not a good idea to store images in Neo4j. What we are going to store instead is a link to where the image resides… but we also don’t want to deal with having images all over our file system and then having to worry about storage space and replicating them, geographically distributing them for faster access, etc. Hosting images is a problem solved by the use of Content Delivery Networks. So let’s leverage one and build our feature.
Continue reading

Tagged , , , , , , , , , ,

Building a Dating site with Neo4j – Part Ten

A few days ago I taught the Neo4j Modeling class in Dallas… well my own version of the class since I teach some of the older material plus some of my blog posts. If you ever get the chance, take the class, it will open your eyes at what is possible when “third normal form” gets thrown out the window and a whole new world of possibilities is before you. The next modeling class I’m teaching will be at Graph Connect in NYC on September 20-21, 2018. I recommend you join me, unless of course you are looking at this after it occurred, then catch the next one.
Continue reading

Tagged , , , , , , , , ,

Building a Dating site with Neo4j – Part Nine

Now that our users can high five and low five each other, we want to show the other person those high fives and low fives. Well…do we really want to show the low fives? I’m not sure. A few years ago we talked about how to store the people who “swiped left” on a user (aka the “asholes” of Tinder). In this case, the user is not rejecting a person forever, they are just putting down one of their posts. If it’s two people who are competing for dates, then maybe the low five has a negative intent, but it would make the person who wrote the post feel they are doing something right. If the low five was from a potential mate, it could be a case of “negging” ( which is stupid and you should never do that to people), it could be in jest if it was from someone they already had a conversation with, it could just have negative intent or maybe a clumsy tap on the wrong button. We don’t really know.
Continue reading

Tagged , , , , , , , , , ,