3

I'm trying to develop an interactive web application using GraphStream. The idea is to run a couple of community detection algorithms on graphs and visualize them. I wish to use D3.js as graph rendering framework and use GraphStream library in a java websocket server ( Tomcat ) that runs the algorithms. I wish to know if GraphStream already has websocket capabilities that could directly talk to client ( browser ) websocket endpoint. Suggestions for a more correct or feasbile architecture are also welcome.

adsun
  • 773
  • 9
  • 30

1 Answers1

3

Great idea. There is a WebSocket implementation that provides GraphStream's event model to the browser. It implements a network protocol, GS-NetStream.

The actual version is compatible with gs-core v1.3.

You can run the exemples from the test/ folder.

In the test folder, run these commands in that order:

  1. Install dependencies : npm install ws express
  2. Compile the Test1.java with gs-core-1.3 in the classpath: javac -cp path/to/gs-core-1.3.jar:. Test1.java
  3. Run the node server : node Test1server.js
  4. Run the Java app :java -cp path/to/gs-core-1.3.jar Test1
  5. go to http://localhost:8080/Test1.html
  6. Use the code in Test1.html as an example for your project
Yoann
  • 556
  • 3
  • 11
  • Yes, I'm pretty much interested and any form of help in getting forward is appreciated. – adsun Oct 13 '15 at 16:39
  • Also, It would be great if you could provide some steps to run the examples in https://github.com/graphstream/gs-netstream/tree/master/js/test. I tried running the test1.java and test1.html. But I'm getting errors in test1.java such as `code` Listening?... Received: GET /gs/stream HTTP/1.1 java.lang.NumberFormatException: For input string: "GET /gs/stream HTTP/1.1" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:580) at java.lang.Integer.(Integer.java:867) at TestServer$1.run(TestServer.java:41) – adsun Oct 13 '15 at 20:00
  • I edited my answer. The JS gs-netstream implementation has been updated. See my edits to help you run the exemples. – Yoann Oct 15 '15 at 21:49
  • @Yoann I will looking at taking this project too. Any hints/tips that will be nice to know? Thanks – bob9123 May 22 '17 at 22:36