Category Archives: Problems

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 , , , , , , , , , , , , ,

Dynamic Rule Based Decision Trees in Neo4j – Part 3

At Graph Connect this year I did a short lightning talk on building Decision Trees using Neo4j. The slides are up and down below, the video is up. After the talk, someone asked, “What if we don’t know all the facts ahead of time?”. They wanted to be able to step through the tree and ask for the facts as needed at each step. So today we’re going to see how to do that.
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 Eleven

Up to this point, our users can send and receive messages, but we don’t have a way to show them all of their conversations, only one conversation at a time and they have to guess who messaged them before they can see those. Not very useful, what we need is a directory of all the conversations our user is part of. Let’s go ahead and add this feature to tie things together.
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 , , , , , , , , , ,

Building a Dating site with Neo4j – Part Eight

Up to this point we have a timeline of posts from people we want to date, but no way to interact with those people. The first step begins today as we will allow users to High Five and Low Five posts. Recall that once a user has high fived your post, you will be able to message them for up to 5 days when the high five expires. If you do not wish to message them, that’s fine, their high five gives you an additional high five to give to someone else in the hopes they message you. Remember that all users get 5 “free” High Fives a day, if they want more they have to earn them. You can get a High Five on a post that is older than 5 days, it still counts. This is needed to create the opportunity to bring back a user who hasn’t been to the dating site in a while with a High Five to an old Post. Otherwise after 5 days of inactivity, those users would be practically deleted.
Continue reading

Tagged , , , , , , , , ,

Building a Dating site with Neo4j – Part Seven

Now it is time to create the timeline for our users. Most of the time, the user wants to see posts from people they could High Five in order to elicit a conversation. Sometimes, they want to see what their competition is doing and what kind of posts are getting responses… also who they can low five. I don’t think they don’t want to see messages from people who are not like them and don’t want to date them but I could be wrong.
Continue reading

Tagged , , , , , , , , , ,

Building a Dating site with Neo4j – Part Six

Without posts, we can’t have High Fives and that defeats the purpose of our dating site, so it’s time to let our users post things. We want to allow two types of posts, text posts and image posts. Today we’re going to focus on text posts and getting them working and we’ll deal with images in another post. The first thing we want to do is prevent users from posting bad things. So we’re going to create a PostValidator to deal with the user input:
Continue reading

Tagged , , , , , , , ,