I've been doing a lot of reading and thinking about Neo4j lately. I think 
my interest may have reached the level of obsession. I'd never worked with 
graph databases until discovering Neo4j. Typically, when I've been forced 
to work with RDBMS' it's only been after someone has put a gun to my head, 
they simply don't map to the way I view problems. NoSQL databases like 
Mongo are better in a number of ways but I still find them lacking for the 
types of use cases that I'm interested in.

In any case, I've been working on a distributed sensor network project 
lately and I've been experimenting with messaging systems including AMQP 
and MQTT. When I first started thinking about using Neo4j in my project I 
found myself wishing there was support for querying Neo4j via AMQP. I 
figure it would be easy enough to write a bridge but that seems like a 
messy hack to me. How difficult would it be to make Neo4j speak AMQP 
natively? Could it be done through a server plugin?

The initial desire to run queries via AMQP messages got me thinking about 
other possible uses for the protocol's capabilities in Neo4j. What I think 
is the most natural and potentially exciting thing that I'd really like to 
see is the integration of a publish/subscribe pattern into the graph. I'm 
thinking about the possibility of subscribing to a node and having messages 
published when specific things occur to that node such as a property being 
added, modified, deleted or possibly when a relationship is added or 
changes in some way. Other possibilities would be subscriptions to labels, 
indexes,  While I'm obviously not familiar with everyone else's use cases 
or domains I'm fairly certain that I'm not the only one with a project that 
could benefit greatly from this type of functionality.

Last night, while reading the excellent Graph Databases 
<http://graphdatabases.com> another use for AMQP integration came to mind. 
It seems that an AMQP broker would make an excellent load balancer. I 
should be simple enough to separate reads from writes using and distribute 
them intelligently to either a slave or the master. It might also be used 
to help with high availability (most AMQP brokers are clusterable so that 
wouldn't become a single point of failure either).

I also have a feeling that using a protocol such AMQP might have the nice 
side effect of increasing query performance when compared to a RESTful API 
as the connection to the broker is not built and torndown with each 
message. I've seen a few projects where this has been the case.

The two major brokers are RabbitMQ and Apache's Qpid. Rabbit is probably 
the most popular but Qpid is written in Java and may make more sense for 
integration with Neo4j.

I'd be very interested to hear other people's thoughts on the subject. I'm 
not what anyone would call an expert Java programmer, the embedded world 
that I live in is much smaller and is generally coded in C. I have no idea 
how difficult it would be to do either of the things I've proposed (a 
querying plugin, or a the much deeper integration allowing for pub/sub). 
The other thing is that I might simply be insane and these ideas are 
terrible. Either way I'd love to hear anyone's and everyone's thoughts.

Thanks.

Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to