- This topic has 8 replies, 1 voice, and was last updated 8 years, 9 months ago by Matthias Feldotto.
May 21, 2015 at 7:36 pm #889AViraniGuest
I am trying to build a file sharing application which uses Chord as
overlay. I tried following the getting started documentation but
not relate much.
I am trying to implement a distribution of a single file which is to
be downloaded by all the peers and once they have the file, the peer
is responsible to publish it whenever it joins the ring.
Would appreciate if someone could help me or guide me with this.
ViraniMay 21, 2015 at 7:37 pm #890KalmanGuest
I am trying to understand your approach.
So one single node in the network should publish a file and this file
should be downloaded by all other nodes.
For that, follow the download procedure on
and the two other network files.
Unzip and install everything according the video in the getting
No the relevant parts:
– A filesharing application is already implemented, so you could use
Chord and the corresponding filesharing application.
– The corresponding config file to start the simulator is here: ..-/
– For example you could start: FSChord-1000_Peers.xml
– in the corresponding action file, it is written, what should happen
in the simulation: config/application-filesharing2/filesharing2-
Currently it is written:
Ecuador 1m FilesharingApplication:join
Ukraine 2m-5m FilesharingApplication:join
Denmark 6m-20m FilesharingApplication:join
Brazil 21m-30m FilesharingApplication:join
Poland 31m-40m FilesharingApplication:join
Malaysia 41m-50m FilesharingApplication:join
France 51m-60m FilesharingApplication:join
Malaysia 100m-120m FilesharingApplication:publishResourcesFromSet
France 100m-120m FilesharingApplication:publishResourcesFromSet files1
France 121m FilesharingApplication:lookupResourceFromSetPeriodically
Malaysia 121m FilesharingApplication:lookupResourceFromSetPeriodically
So there are 20 files in the set files1 and 20 files in the set
In your case you seem only to want one single file: 20 -> 1
And this single file should be published by one single node (instead
of here, all nodes in Malaysia)
So you have to create one single node as well, or a group in the
config file that contains only one node.
Once you run the simulation with the config file, your results should
KalmanMay 21, 2015 at 7:38 pm #891AViraniGuest
Appreciate your help. It solves the problem of sharing just one file.
The other thing that I am trying to implement is isolating File
sharing application only for Chord. The current file sharing
application integrates all the available overlay. I have trouble with
the file publishing part.
ViraniMay 21, 2015 at 7:38 pm #892AViraniGuest
Is there any way to define the size of the filesMay 21, 2015 at 7:39 pm #893Matthias FeldottoGuest
yes of course you can define the size of the files. Therefore look in one configuration file in the part ResourceSpace/ResourceSet, there you can set the size as attribute and also the file distribution.
To your question about different overlays: I didn’t get your problem. In the simulator only the configured overlays are used. So you can use only the Chord overlay.
MatthiasMay 21, 2015 at 7:39 pm #894AViraniGuest
Finally am able to get more understanding of the simulation. There are
two things which I am having trouble with.
1. When I import and build the project, I have like 500 warnings and
when i compile, I get exception errorr and the simulation stops.
2. I was trying to code file sharing application on chord overlay,
similar to KBRdummyapplication, but i have trouble with the publish
part. I am guessing that I am able to create join and leave.
Appreciate you guys helping.
AviraniMay 21, 2015 at 7:40 pm #895Matthias FeldottoGuest
Regarding to your two points:
There are still many warnings in the code, at the moment we are working on a version with a better code style and less warnings; but nevertheless they make no problems during simulation. To your exception: I cannot help you without knowing more details …
I don’t know where your problem is. Please be a little more concrete. As further hint: you find also a full working file sharing application (filesharing2) in the code.
MatthiasMay 21, 2015 at 7:40 pm #896AViraniGuest
Like always this forum has helped me answer many of my questions.
The simulation does not work when I implement it from Eclipse but the
good part is it works when I run it using terminal.
My question this time is related to configuration file.
1. Is there a way to define same group ids (for instance UnitedStates)
with different # of nodes and properties.
2. In configuration file, what should I be modifying to give the size
of the files in Mb or Kb.
3.. Does the file sharing application in the simulator, simulates the
complete file sharing method.
4.. Is there a way to check if all the nodes have received the files.
ViraniMay 21, 2015 at 7:40 pm #897Matthias FeldottoGuest
sorry, for the late answer, but now you can find a new version of the simulator at http://www.peerfact.org
Regarding to your questions:
1. several groups in the same location are now possible with the tags “id” (identifier) and “groupId” (location).
2. You can define the size in the ResourceSet (compare existing configurations for the filesharing2 application)
3. The filesharing application simulates filesharing with stores and lookups, I do not know what you mean with “the comlete filesharing method”.
4. The successful lookup or store is notified by the analyzers.
Furthermore, there will be an extension to the existing filesharing application in the next release which makes handling more easy.
- You must be logged in to reply to this topic.