Tag Archives: graph databases

Building a Twitter Clone with Neo4j – Part Six

We are getting close to wrapping up the back-end API for our Twitter clone, so thank you for sticking with this awfully long series since the beginning. One of the big community features of Twitter is the Trending Hashtags. It lets users know what is being talked about even if the people a user follows aren’t talking about it. It’s kind of weird in that way since part of the point of Twitter is following just a few hundred or thousand people to reduce the noise, and here we are bringing noise back in to our feed. Regardless, this is actually pretty easy to implement, so let’s have a crack at it.
Continue reading

Tagged , , , , , , ,

Building a Twitter Clone with Neo4j – Part Five

In part four, we continued cloning Twitter by adding hashtag and mentions functionality. Then we went beyond it by adding the ability to edit a post. So we have a social network where people can follow each other and post stuff. Today we’re adding the ability to say a user likes a post, reposts a post and the most important query of all, being finally able to see our feed or timeline.
Continue reading

Tagged , , , , , , ,

Building a Twitter Clone with Neo4j – Part Four

We left off last time having just added the ability to follow people, see who we’ve followed and has followed us, block and unblock people and finally see whom we have put on our naughty list of blocked users. So we have a social network where people can create relationships, but they have nothing to say because we haven’t implemented that yet!
Continue reading

Tagged , , , , , , , ,

Building a Twitter Clone with Neo4j – Part Three

In part two we defined our API and got registering a user, checking a user and getting a user profile. A social network of unconnected people doesn’t live up to its name, so let’s go ahead and build the ability to follow people.

Continue reading

Tagged , , , , , , , ,

Searching for objects using multiple dimensions

Lets take a look at a scenario where you are trying to search for things by their attributes, not their description. They can be users, documents, or any object that could be described by discrete values in multiple dimensions. What does that mean exactly? Well, let me give you an example: searching for a dog. My family includes 2 four legged furry creatures named Tyler and Ronnie. They are my half lab, half golden retrievers. Dogs come in all shapes and sizes, from teacup breeds with adult weights around 5 lbs, to giant Mastiff breeds over 150 lbs. But most people don’t care exactly how much a dog weights, only their general size.


Continue reading

Tagged , , , , , , , , ,

Neo4j is faster than MySQL in performing recursive query

5mysql

A user on StackOverflow was wondering about the performance between Neo4j and MySQL for performing a recursive query. They started with Neo4j performing the query in 240 seconds. Then an optimized cypher query got them down to 40 seconds. Then I got them down to…
Continue reading

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

Writing a Cypher Stored Procedure

luke-cage-jidenna

I’ve been so busy these last 6 months I just finally got around to watching Luke Cage on Netflix. The season 1 episode 5 intro is Jidenna performing “Long live the Chief” and it made me pause the series while I figured out who that was. I’m mostly a hard rock and heavy metal guy, but I do appreciate great pieces of lyrical work and this song made me take notice. Coincidently on the Neo4j Users Slack (get an invite) @sleo asked…
Continue reading

Tagged , , , , , , , , , ,

Our own Multi-Model Database – Part 6

shitty6

Back in Part 2 we ran some JMH tests to see how many empty nodes we could create. Let’s try that test one more time, but adding some properties. Our nodes will have a username, an age and a weight randomly assigned. It’s not a long test, but just enough to give us a ballpark.
Continue reading

Tagged , , , , , , ,

Our own Multi-Model Database – Part 5

shitty5

In part 4 I promised metrics and a shell, so that’s what we’ll tackle today. We are lucky that the Metrics library can be plugged into Jooby without much effort… and double lucky that the Crash library can also be plugged into Jooby without much effort. This is what we are all about here because we’re a bunch of lazy, impatient developers who are ignorant of the limits of our capabilities and who would rather reuse open source code instead of falling victim to the “Not Invented Here” syndrome and do everything from scratch.
Continue reading

Tagged , , , , , , , ,

Property Level Security with Neo4j Enterprise

security-patrol-guard

In Neo4j 3.1 Enterprise edition, we introduced the first wave of security features that are coming down the pipeline. Now you can start off with Administrators, Architects, Publishers and Readers as built in default groups. You can read about their capabilities in the docs.

If you’ve been paying attention, you know Neo4j thrives under it’s dynamic customizability. The developers decided to let us build our own custom Roles and limit their capabilities to a set of Stored Procedures. With this, we can build any kind of access control we want, but let’s go for the jugular and let’s see how we can build property level security for Neo4j.
Continue reading

Tagged , , , , , ,