[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 583: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/session.php on line 639: sizeof(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4516: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3262)
Gephi forums •Graph Streaming - URL formatting question
Page 1 of 2

Graph Streaming - URL formatting question

Posted: 26 Jan 2012 20:54
by digimetic
Hi,

I'm hoping this question is easy enough to answer. So far I've had terrific success using the Streaming plug-in. However, throughout all my testing I was creating new projects & workspaces where the default name of the workspace was "Workspace 0". Again, this always works:

Code: Select all

"http://localhost:8080/workspace0?operation=updateGraph -d "{...}"


Yet when I've saved a project and renamed the workspace, I can't seem to figure the value for the URL string using the new workspace name. e.g.

Code: Select all

http://localhost:8080/newWorkspaceName?operation=updateGraph -d "{...}"
No exceptions are thrown, but the graph data isn't getting updated. Thoughts? I'm hoping I'm just being dumb about the syntax.

Many thanks,

- B

Re: Graph Streaming - URL formatting question

Posted: 27 Jan 2012 00:01
by panisson
Hi, good to know that the GraphStreaming plug-in is being useful to you!
The context used in the URL is given by the lowercase of the workspace name without spaces.
The code used for the context extraction is the following:

Code: Select all

WorkspaceInformation wi = workspace.getLookup().lookup(WorkspaceInformation.class);
String context = "/"+wi.getName().replaceAll(" ", "").toLowerCase();
If you are using a workspace with name "New Workspace Name", you should use the following URL:

Code: Select all

http://localhost:8080/newworkspacename?operation=updateGraph -d "{...}"

Re: Graph Streaming - URL formatting question

Posted: 27 Jan 2012 04:40
by digimetic
Thanks for the quick reply panisson,

yep, extremely useful plug-in fact; i love it! i was doing case-matching in the URL. e.g. both the workspace name and URL contained the string "NewWorkspaceName".

i'll give it a shot with lowercase only.

thanks again!

B

Re: Graph Streaming - URL formatting question

Posted: 27 Jan 2012 21:48
by digimetic
hi again,

well, the change met with partial success. using lowercase letters for the workspace name in the URL definitely worked.

however, trying to apply additional changes to the .gephi file doesn't work. here's a use case:

*open existing file having previously streamed data (same format, attribute names, data types, etc)
*start the Master Server
*attempt to stream data to the file

basically the process used to push data at the 3rd step above just hangs; i've tried both cURL and scripting HTTP requests in a c# console app. same results, things just hang w/out any thrown expecptions, timeouts, et al.

and other thoughts on why this might be happening?"

thanks,

B

Re: Graph Streaming - URL formatting question

Posted: 30 Jan 2012 13:06
by panisson
Hi, could you explain what you are doing in the third step: "attempt to stream data to the file"?

Re: Graph Streaming - URL formatting question

Posted: 30 Jan 2012 13:35
by digimetic
sure,

by "streaming" i mean pushing any json string to the master's url

for example, you can go through the sample steps on the Streaming specification on the wiki (create the three nodes via cURL statements at a command prompt). when you're done, rename the workspace, and save the file, and close Gephi. then open Gephi again, open that file, and start the Master. again, execute a few more cUrl statements; try statements for adding new nodes, changing existing nodes (e.g. size attribute), deleting nodes, et al. no matter what, cUrl remains unresponsive and the graph remains unchanged.

in my case, i'm using the latest build of Geph as well as the latest version of the Streaming plug-in (as far as i can tell, i'm downloading it from within the Gephi plug-in installer). my machine is running Windows 7 64bit. there's nothing special about the Master that i've set up; it's using the default URL (http://localhost:8080/), no username or password and no SSL.

additionally, i'm using an SSIS package (SQL Server 2008) to manage the streaming actions. data is parsed from a database, and a stored procedure is used to parse that data into json statements. each of those statements is then iterated over and passed as an HTTP request via a C# scripting task. when the package first executes on a new Gephi file, everything is fine. i can watch thousands of nodes fill the workspace over time (it's quite nice actually). however, subsequent executions of the package hang when attempting to pass data to Gephi. thinking it might be something with the package that was failing, i've tested by passing requests from cUrl at a command prompt to Gephi - but the problem still happens. the request seems to get caught up on something; it almost behaves likes it's being responding to thread blocking behavior where the call just sits there waiting for its turn.

it's been years since i've done any serious Java development, so i'm hesitant to debug this in Eclipse. wish i could give you more details in that respect.

thanks again for your help. really appreciate it,

ben

Re: Graph Streaming - URL formatting question

Posted: 30 Jan 2012 18:06
by panisson
Hi ben,
It seems there's a bug in the lock/unlock operations when the http server is started. It happens when the server is started with a non-empty graph in the workspace. I'm looking it right now, and I'll let you know when a patch will be available.
Thanks for your patience.

Re: Graph Streaming - URL formatting question

Posted: 30 Jan 2012 18:15
by panisson
I submitted an issue at https://github.com/gephi/gephi-plugins/issues/3, and I'm working on it.
New comments and patches will be posted there.

Re: Graph Streaming - URL formatting question

Posted: 30 Jan 2012 18:34
by digimetic
thanks man! super appreciate it.

Re: Graph Streaming - URL formatting question

Posted: 31 Jan 2012 14:35
by panisson
Hi, I'm about to release a patched version of the plugin.
Could you please install and test the attached file? I'm posting here because unfortunately github does not support attachments in its issue tracking system.
Thanks,
André