Over a million developers have joined DZone.

Graphity Server for Social Activity Streams Released (GPLv3)

DZone's Guide to

Graphity Server for Social Activity Streams Released (GPLv3)

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

It's been almost two years since I published my first "ideas and works" on graphity, which is now a collection of algorithms to support efficient storage and retrieval for more than 10k social activity streams per second.

Recently I released the first version of this collection of algorithms as the Graphity News Stream Server. A big thanks to Sebastian Schlicht who worked with me to implement most of the Servlet.  He did an amazing job! The Graphity Server is a Neo4j-powered servlet with the following properties:

  • Response times for requests are usually less than 10 milliseconds (+network i/o e.g. TCP round trips coming from HTTP)
  • The Graphity News Stream Server is free, open-source software (GPLv3) and hosted in the metalcon Git repository. (Please also use the bug tracker there to submit bugs and feature requests)
  • It is running two Graphity algorithms: One is read-optimized and the other one is write-optimized, if you expect your application to have more write than read requests.
  • The server comes with a REST API, which makes it easy to hang whatever application you have in the server.
  • The server’s response also follows the activitystrea.ms format, so out of the box there is a large amount of clients available to render the response of the server.
  • The server ships together with unit tests and extensive documentation, especially for the news stream server protocol (NSSP), which specifies how to talk to the server. The server can currently handle about 100 write requests in medium size (about a million nodes) networks. I do not recommend using this server if you expect your user base to grow beyond 10 million users (though we are working to get the server scaling). This is mostly due to the fact that our database won’t really scale beyond one machine right now, and some internal stuff has to be handled synchronized.

Koding.com is currently thinking about implementing Graphity-like algorithms to power their activity streams. Richard from their team pointed out, in a very fruitful discussion, how to avoid the Neo4j limit of 2^15 = 32768 relationship types by using an overlay network. So his ideas of an overlay network have been implemented in the read-optimized graphity algorithm. Big thanks to him!

Now I am really excited to see what kind of applications you will build when using Graphity.

If You Use Graphity

Please tell me if you start using Graphity.  That will be awesome to know, and I will most certainly include you in a list of testimonials.

If you want to help spread the word about Graphity (which is great for any users, because more developers using it means newer versions will come much faster) you can vote up my answer in stack overflow:


How to Get Started

Its so simple!

  1. You clone the Git repository or get the souce code.
  2. Switch to the repo and type sudo ./install.sh.
  3. Copy the war file to your Tomcat webapps folder (if you don’t know how to setup Tomcat and Maven, which are needed, we have a detailed setup guide)
  4. You’re done!   There are more configuration details are in our README.md!
  5. Look in the newswidget folder to find a simple HTML / JavaScript client that can interact with the server.
I also created a small, simple screencast to demonstrate the setup: 

Get Involved

There are plenty ways to get involved:

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}