Author Archives: maxdemarzi

Tracking User Paths in an IVR with Neo4j

I started my software development career writing applications for a Call Center at a small bank in Florida. I remember the bank had purchased whatever the “Cadillac” of Interactive Voice Response (IVR) systems was then for some crazy amount of money. Today you can build an IVR overnight using Twilio.

twilio

When you sign up with Twilio, you get to choose your phone number (more or less). For example, I picked +1 (636) 451-7411, which spells out +1 (neo) 4j1-7411. If you were to call this number right now (assuming I have not run out of Twilio credits) you’ll connect to my IVR.
Continue reading

Tagged , , , , ,

Scaling Concurrent Writes in Neo4j

concurrent writes

A while ago, I showed you a way to scale Neo4j writes using RabbitMQ. Which was kinda cool, but some of you asked me for a different solution that didn’t involve adding yet another software component to the stack.

Turns out we can do this in just Neo4j using a little help from the Guava library. The solution involved a background service running that holds the writes in a queue, and every once in a while (like say every second) commits those writes in one transaction.
Continue reading

Tagged , , , , , , , ,

Kickstarting a Neo4j Video Series

Learn how to build high performance @neo4j applications with this video training course.

I’m on Kickstarter to ask for your help in order to create a set of videos to teach you how to build high performance Neo4j applications. I am going to capture the lessons I’ve learned over the past 4 years working with graph databases and share them with you.

These videos will teach you everything you need to know about building high performance applications using Neo4j.
Continue reading

Tagged , , , , , ,

Translating Cypher To Neo4j Java API 2.0

cypher-translate-2.0ish600x293

About 6 months ago we looked at how to translate a few lines of Cypher in to way too much Java code in version 1.9.x. Since then Cypher has changed and I suck a little less at Java, so I wanted to share a few different ways to translate one into the other just in case you stuck in a mid-eighties time warp and are paid by the number of lines of code you write per hour.

But first, lemme take a #Selfie let’s make some data. Michael Hunger has a series of blog posts on getting and creating data in Neo4j, we’ll steal borrow his ideas. Let’s create 100k nodes:

WITH ["Jennifer","Michelle","Tanya","Julie","Christie","Sophie","Amanda","Khloe","Sarah","Kaylee"] AS names 
FOREACH (r IN range(0,100000) | CREATE (:User {username:names[r % size(names)]+r}))

Continue reading

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

Neo4j all the way Down!

ext_inside_server_inside_embedded

Just because you can, doesn’t mean you should. However sometimes it can be comforting to know how. I am going to show you how to run Neo4j Embedded and Neo4j Server at the same time…and an Unmanaged Extension inside that Neo4j Server. There aren’t any real good reasons why you’d want to do this, but it’s April Fools, so here we go.

Continue reading

Tagged , , , , ,

Caching Partial Traversals in Neo4j

cache_all_the_things

Sometimes you’ll find yourself looking at a traversal and thinking… “I’m going to be doing this one thing over and over again.” That sounds kind of wasteful and years of recycling have taught us not to be wasteful. Let’s take a look at an example from our past. Look back at the Neo Love application, the one with the picture of Marilyn Monroe and Groucho Marx. Let’s see what a Neo4j 2.0 version of that query would look like:

Continue reading

Tagged , , , , , , , ,

It’s over 9000! Neo4j on WebSockets

it__s_over_9000_

In the last blog post we managed to run Neo4j at Ludicrous Speed over http using Undertow and get to about 8000 requests per second. If we needed more speed we can scale up the server or we can scale out to multiple servers by switching out the GraphDatabaseFactory and using the HighlyAvailableGraphDatabaseFactory class instead in Neo4j Enterprise Edition.

But can we go faster on a single server without new hardware? Well… yes, if we’re willing to drop http and switch to Web Sockets.

Continue reading

Tagged , , , , , , , ,

Neo4j at Ludicrous Speed

spaceballs_ludicrous_speed

In the last blog post we saw how we could get about 1,250 requests per second (with a 10ms latency) using an Unmanaged Extension running inside the Neo4j server… but what if we wanted to go faster?

The easy answer is to Scale Up. However, trying to add more cores to my Apple laptop doesn’t sound like a good time. Another answer is running a Neo4j Cluster and (almost) linearly scaling our read requests as we add more servers. So a 3 server cluster would give us between 3,500 and 3,750 requests per second.

But can we go faster on a single server without new hardware? Well… yes.
Continue reading

Tagged , , , ,

Online Payment Risk Management with Neo4j

credit_cards_512

I really like this saying by Corey Lanum:

Finding the relationships that should not be there is a great use case for Neo4j, and today I want to highlight an example of why. When you purchase something online, the merchant hands off your information to the payment gateway which processes your actual payment. Before they accept the transaction, they run it via series of risk management tests to validate that it is a real transaction and protect themselves from fraud. One of the hardest things for SQL based systems to do is cross check the incoming payment information against existing data looking for relationships that shouldn’t be there.
Continue reading

Tagged , , , , , , , ,

Neo4j Spatial Part 2

nomnomnom

In part 1 of this series we looked at how to get started with Neo4j Spatial and we looked at some of the pieces we’ll use today to build a proof of concept application. I’m calling the application “Nom Nom Nom” in reference to its onomatopoeic meme.

So we’ll get data from Factual, get data from OpenTable, combine them and import them into Neo4j:

Continue reading

Tagged , , , ,
Follow

Get every new post delivered to your Inbox.

Join 1,676 other followers