[SOLVED] Importing from Java objects

Get help with your data
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Raja.Paturi
Posts:2
Joined:15 Jun 2011 20:33
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[SOLVED] Importing from Java objects

Post by Raja.Paturi » 18 Jul 2011 16:27

Hi there,

So I currently have my data in a mysql database and I use it to draw my graphs on gephi, which works perfectly fine. I was wondering if there is any way to draw graphs from data stored in java objects, coz in that case all the data will exist in the memory of my java program which will potentially help to speed up my application.

Thanks

User avatar
mbastian
Gephi Architect
Posts:728
Joined:10 Dec 2009 10:11
Location:San Francisco, CA
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Importing from Java objects

Post by mbastian » 19 Jul 2011 16:15

You can create a Gephi plugin and integrate your program JAR in the plugin, so it can be runned directly from Gephi (and run in the same JVM). If that works, you would be able to directly access the Java objects.

If your program needs to run independently (and therefore in its JVM), it becomes more complicated. An easier way might exist, but you could make a socket client-server communication between the two programs and transfer your objects via serialization. Java has this thing called RMI to do that but it might just be easier to do it by hand.

You can also have a look at the Graph Streaming plugin, as it already has the socket in place and gives you a easy way to send objects to Gephi while running.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable