GraphStream Users

Archives de la liste Aide


Re: Transmission de données Clients/Serveur


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: graphstream-users AT litislab.fr
  • Subject: Re: Transmission de données Clients/Serveur
  • Date: Mon, 14 Apr 2014 17:03:11 +0700

Hello,

And welcome on this mailing list.

GraphStream provides a way to describe how to send data that describe the graph and how to receive this data. *Source are objects able to produce a stream of events that GraphStream can use. *Sink are objects able to receive a stream of events.

So, FileSourceDGS for example, can convert a dgs file to produce events described in this file. On the other hand, FileSinkDGS is able to store the stream of GraphStream events into a file.

You have to connect your sink to a source. A graph is a source and a sink, so you can connect your graph to a FileSourceDGS : in this case your graph will be fed by the events of your file. But you can also connect a FileSinkDGS to your graph and all modifications occuring in your graph will be saved inside the dgs file.

For your problem, DGS describes only how events are serialized, but you have to define how the events are sent from the server to clients (http, ssh, any other crazy protocol). You can have a look to the NetStream protocol which is the one implemented in GraphStream to provide exchange over a network :
https://github.com/graphstream/gs-netstream/wiki/NetStream-Manual

Good luck. Hope this will help.

Guilhelm

Le 14 avr. 2014 15:53, <magrison AT bouyguestelecom.fr> a écrit :
Bonjour,

Dans le cadre d'un projet de monitoring grâce à GraphStream, je suis
confronté à plusieurs problèmes.

Tout d'abord afin que vous compreniez mieux le contexte, je suis partit sur un
système "Client / Serveur". En effet le serveur génère des lignes "DGS" en
continu (puisque la source est une base de donnée alimentée toutes les
secondes), et ce dernier doit donc envoyer ces lignes à tous les clients
connectés.

J'ai cru comprendre que les fonctions Sink* permettaient de créer un lien
entre une source de donnée et un graph, mais je n'arrive pas à comprendre son
utilité réelle. Puique qu'il est semble tout à fait possible grâce à
FileSource de lire un InputStream.

Vous l'aurez compris je n'ai pas trouvé la solution adéquate afin d'envoyer
mes lignes "DGS" générées par mon serveur à chacun de mes clients,
GraphStream proposant un grand nombre de Classes à implémenter, j'aimerais
savoir s'il existe moyen efficace d'y parvenir.

Merci d'avance,

Cordialement,



Archives gérées par MHonArc 2.6.16.

Top of page