Author: bleny Date: 2010-08-19 17:01:38 +0200 (Thu, 19 Aug 2010) New Revision: 119 Url: http://nuiton.org/repositories/revision/diswork/119 Log: draft presentation diswork 20/08 Added: trunk/src/site/diswork_2010-08-20.odp trunk/src/site/schema_diswork_architecture.svg Modified: trunk/src/site/rst/devel-draft-0.2.rst trunk/src/site/rst/user/how_to_use.rst Added: trunk/src/site/diswork_2010-08-20.odp =================================================================== (Binary files differ) Property changes on: trunk/src/site/diswork_2010-08-20.odp ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/src/site/rst/devel-draft-0.2.rst =================================================================== --- trunk/src/site/rst/devel-draft-0.2.rst 2010-08-11 14:46:03 UTC (rev 118) +++ trunk/src/site/rst/devel-draft-0.2.rst 2010-08-19 15:01:38 UTC (rev 119) @@ -281,7 +281,6 @@ UDP et nécessite d'utiliser TCP pour les échanges, car TCP peut découper d'aussi gros messages ce qui n'est pas le cas d'UDP. - :: application @@ -375,8 +374,8 @@ Ne plus utiliser de système de fichier -------------------------------------- -On pourrait préférer faire en sorte que chaque -noeud conserve ses données localement et les propose à qui les demande. +Et préférer un système de partage de fichiers, les +noeuds conservent leurs données localement et les proposent à qui les demande. Ça évite tout risque de perte de données mises en ligne mais ça à l'inconvénient de nécessiter à un noeud d'être présent et d'attendre que quelqu'un demande @@ -388,5 +387,7 @@ Il faut aussi trouver le moyen de mettre les noeuds en relation, une solution serait d'avoir, à la eMule, des serveurs centralisés dont le seul rôle est -d'indexé les fichiers proposés par les noeuds. Les noeuds peuvent ensuite faire -des recherches via ce serveur central. \ No newline at end of file +d'indexer les fichiers proposés par les noeuds. Les noeuds peuvent ensuite faire +des recherches via ce serveur central. + +Ça nous éloigne beaucoup (trop) du Cahier des charges initial. \ No newline at end of file Modified: trunk/src/site/rst/user/how_to_use.rst =================================================================== --- trunk/src/site/rst/user/how_to_use.rst 2010-08-11 14:46:03 UTC (rev 118) +++ trunk/src/site/rst/user/how_to_use.rst 2010-08-19 15:01:38 UTC (rev 119) @@ -38,49 +38,49 @@ :: - // First, start a daemon + // First, start a daemon DisworkConfig config = DisworkConfig.newConfig(); daemon = new DisworkDaemon(config); // submit the application daemon.submitApplication("fake-app", "1.0", new FileInputStream("fake-app-1.0.zip")); - - // now all the nodes will be able to run jobs that need fake-app version 1.0 - - // create a new job - JobDescription job = new JobDescription(); - job.setJobName("My Job"); - job.setApplication("fake-app", "1.0"); - job.setCommandLine("%java -jar fake-app.jar"); - - // now, defining data in input - - // this will be downloaded by the worker before job start - job.addInput("example.com_index", new URL("http://www.example.com/")); - // this will, needed for fake-app will be provided to the worker - job.addInput("input.txt", new FileInputStream("input.txt")); - - // defining expected data in output - job.addOutput("output.txt"); - job.addOutput("example.com_index"); - - // setting standard input and output file - job.setStandardInput("input.txt"); - job.setStandardOutput("output.txt"); - - // submit the job - daemon.submitJob(job); - - // waiting for the job to finish - while(! daemon.isFinished(job)) { - Thread.sleep(5 * 60 * 1000); - } - - // check that job is successful and read the result files - if(daemon.isSuccessful(job)) { - // results will contains keys "output.txt" and "example.com_index" - // values are InputStream on the content of those files - Map<String, InputStream> results = daemon.getResults(job); - } + + // now all the nodes will be able to run jobs that need fake-app version 1.0 + + // create a new job + JobDescription job = new JobDescription(); + job.setJobName("My Job"); + job.setApplication("fake-app", "1.0"); + job.setCommandLine("%java -jar fake-app.jar"); + + // now, defining data in input + + // this will be downloaded by the worker before job start + job.addInput("example.com_index", new URL("http://www.example.com/")); + // this will, needed for fake-app will be provided to the worker + job.addInput("input.txt", new FileInputStream("input.txt")); + + // defining expected data in output + job.addOutput("output.txt"); + job.addOutput("example.com_index"); + + // setting standard input and output file + job.setStandardInput("input.txt"); + job.setStandardOutput("output.txt"); + + // submit the job + daemon.submitJob(job); + + // waiting for the job to finish + while(! daemon.isFinished(job)) { + Thread.sleep(5 * 60 * 1000); + } + + // check that job is successful and read the result files + if(daemon.isSuccessful(job)) { + // results will contains keys "output.txt" and "example.com_index" + // values are InputStream on the content of those files + Map<String, InputStream> results = daemon.getResults(job); + } - \ No newline at end of file + Added: trunk/src/site/schema_diswork_architecture.svg =================================================================== --- trunk/src/site/schema_diswork_architecture.svg (rev 0) +++ trunk/src/site/schema_diswork_architecture.svg 2010-08-19 15:01:38 UTC (rev 119) @@ -0,0 +1,474 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="374.27817" + height="162.07574" + id="svg2" + version="1.1" + inkscape:version="0.47 r22583" + sodipodi:docname="schema_diswork_architecture.svg" + inkscape:export-filename="/home/bleny/Bureau/schema_diswork_architecture.png" + inkscape:export-xdpi="480.92572" + inkscape:export-ydpi="480.92572"> + <defs + id="defs4"> + <linearGradient + id="linearGradient3802"> + <stop + style="stop-color:#bbbbbb;stop-opacity:0.57647061;" + offset="0" + id="stop3804" /> + <stop + style="stop-color:#bbbbbb;stop-opacity:0.08627451;" + offset="1" + id="stop3806" /> + </linearGradient> + <linearGradient + id="linearGradient4075"> + <stop + style="stop-color:#12ebe7;stop-opacity:0.57647061;" + offset="0" + id="stop4077" /> + <stop + style="stop-color:#12ebe7;stop-opacity:0.08627451;" + offset="1" + id="stop4079" /> + </linearGradient> + <linearGradient + id="linearGradient4069"> + <stop + id="stop4071" + offset="0" + style="stop-color:#3eb43e;stop-opacity:0.57647061;" /> + <stop + id="stop4073" + offset="1" + style="stop-color:#3eb43e;stop-opacity:0.08627451;" /> + </linearGradient> + <linearGradient + id="linearGradient3946"> + <stop + id="stop3948" + offset="0" + style="stop-color:#fdff2e;stop-opacity:0.57647061;" /> + <stop + id="stop3950" + offset="1" + style="stop-color:#fdff2e;stop-opacity:0.08627451;" /> + </linearGradient> + <linearGradient + id="linearGradient3940"> + <stop + id="stop3942" + offset="0" + style="stop-color:#c154e7;stop-opacity:0.57647061;" /> + <stop + id="stop3944" + offset="1" + style="stop-color:#c154e7;stop-opacity:0.08627451;" /> + </linearGradient> + <linearGradient + id="linearGradient3934"> + <stop + id="stop3936" + offset="0" + style="stop-color:#ef595e;stop-opacity:0.57647061;" /> + <stop + id="stop3938" + offset="1" + style="stop-color:#ef595e;stop-opacity:0.08627451;" /> + </linearGradient> + <linearGradient + id="linearGradient3594"> + <stop + style="stop-color:#668ad3;stop-opacity:0.57480317;" + offset="0" + id="stop3596" /> + <stop + style="stop-color:#668ad3;stop-opacity:0.08661418;" + offset="1" + id="stop3598" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective10" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3934" + id="linearGradient3911" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-58.314079,33.528902)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3940" + id="linearGradient3918" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-58.314079,66.64888)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3594" + id="linearGradient4081" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(217.00317,0.40887451)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3946" + id="linearGradient2913" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-58.314079,99.768872)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3594" + id="linearGradient2970" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(217.00317,0.40887451)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3934" + id="linearGradient2972" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-58.314079,33.528902)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3940" + id="linearGradient2974" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-58.314079,66.64888)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3946" + id="linearGradient2976" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-58.314079,99.768872)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3934" + id="linearGradient2985" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-281.47162,33.528902)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3940" + id="linearGradient2990" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-281.47162,66.64888)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3594" + id="linearGradient2992" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(217.00317,0.40887451)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3594" + id="linearGradient2997" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-281.47162,0.40887451)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3946" + id="linearGradient3009" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-58.314079,99.768872)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3946" + id="linearGradient3014" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-281.47162,99.768872)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3802" + id="linearGradient3024" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-281.47162,132.57034)" + x1="64.726387" + y1="9.1919765" + x2="440.57327" + y2="121.58464" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3594" + id="linearGradient3808" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-281.47162,0.40887451)" + x1="-15.395237" + y1="1.6637709" + x2="226.55714" + y2="103.30186" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.2489205" + inkscape:cx="187.13908" + inkscape:cy="81.037872" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1680" + inkscape:window-height="975" + inkscape:window-x="0" + inkscape:window-y="24" + inkscape:window-maximized="1" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="couches" + inkscape:groupmode="layer" + id="layer1" + transform="translate(242.83511,-43.483757)"> + <g + id="g2884"> + <g + transform="translate(-275.31725,0)" + id="g4040"> + <rect + id="rect2820" + width="150.12064" + height="28.914286" + x="256.13968" + y="43.983757" + style="fill:url(#linearGradient4081);fill-opacity:1;stroke:#000000;stroke-opacity:1" + ry="4.9650793" /> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + x="286.35526" + y="61.751446" + id="text2816"><tspan + sodipodi:role="line" + id="tspan2818" + x="286.35526" + y="61.751446" + style="font-size:12px">Diswork daemon</tspan></text> + </g> + </g> + <g + id="g2879"> + <rect + id="rect3641" + width="150.12064" + height="28.914286" + x="-19.17757" + y="77.103783" + style="fill:url(#linearGradient3911);fill-opacity:1;stroke:#000000;stroke-opacity:1" + ry="4.9650793" /> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + x="22.616146" + y="96.274796" + id="text3637"><tspan + id="tspan3782" + sodipodi:role="line" + x="22.616146" + y="96.274796" + style="font-size:12px">Diswork FS</tspan></text> + </g> + <g + id="g2874"> + <rect + ry="4.9650793" + style="fill:url(#linearGradient3918);fill-opacity:1;stroke:#000000;stroke-opacity:1" + y="110.22376" + x="-19.17757" + height="28.914286" + width="150.12064" + id="rect3651" /> + <text + id="text3647" + y="129.15454" + x="42.482357" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + xml:space="preserve"><tspan + style="font-size:12px" + y="129.15454" + x="42.482357" + id="tspan3649" + sodipodi:role="line">DHT</tspan></text> + </g> + <g + id="g2869"> + <rect + id="rect3661" + width="150.12064" + height="28.914286" + x="-19.17757" + y="143.34375" + style="fill:url(#linearGradient2913);fill-opacity:1;stroke:#000000;stroke-opacity:1" + ry="4.9650793" /> + <text + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + x="45.73138" + y="161.11145" + id="text3657"><tspan + sodipodi:role="line" + id="tspan3659" + x="45.73138" + y="161.11145" + style="font-size:12px">JVM</tspan></text> + </g> + <rect + ry="4.9650793" + style="fill:url(#linearGradient3024);fill-opacity:1;stroke:#000000;stroke-opacity:1" + y="176.14522" + x="-242.33511" + height="28.914286" + width="373.37927" + id="rect3022" /> + <text + id="text3026" + y="195.31622" + x="-96.485321" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + xml:space="preserve"><tspan + style="font-size:12px" + y="195.31622" + x="-96.485321" + id="tspan3028" + sodipodi:role="line">Machine hôte</tspan></text> + </g> + <g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="appli" + style="display:inline"> + <path + transform="translate(242.83511,-43.483757)" + style="fill:#ececec;stroke:#000000;stroke-opacity:1" + d="m -44.601934,49.171257 c -0.0729,0.01758 -0.106515,0.06504 -0.15625,0.09375 -0.5357,0.309289 -0.88742,2.43629 -1.0625,5.09375 l -38.8125,0 0,8.15625 38.8125,0 c 0.17485,2.662148 0.52614,4.81533 1.0625,5.125 1.59155,0.91888 15.90625,-7.349739 15.90625,-9.1875 0,-1.722901 -12.58368,-9.123093 -15.46875,-9.28125 -0.09617,-0.0053 -0.208351,-0.01758 -0.28125,0 z" + id="path4106" /> + <rect + transform="translate(242.83511,-43.483757)" + ry="4.9650793" + style="fill:url(#linearGradient3808);fill-opacity:1;stroke:#000000;stroke-opacity:1" + y="43.983757" + x="-242.33511" + height="95.054955" + width="150.12064" + id="rect2940" /> + <rect + transform="translate(242.83511,-43.483757)" + id="rect2964" + width="150.12064" + height="28.914286" + x="-242.33511" + y="143.34375" + style="fill:url(#linearGradient3014);fill-opacity:1;stroke:#000000;stroke-opacity:1" + ry="4.9650793" /> + <text + transform="translate(242.83511,-43.483757)" + xml:space="preserve" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + x="-177.42616" + y="161.11145" + id="text2966"><tspan + sodipodi:role="line" + id="tspan2968" + x="-177.42616" + y="161.11145" + style="font-size:12px">JVM</tspan></text> + <text + transform="translate(242.83511,-43.483757)" + id="text3016" + y="88.484863" + x="-166.80605" + style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" + xml:space="preserve"><tspan + style="font-size:12px;text-align:center;text-anchor:middle" + y="88.484863" + x="-166.80605" + id="tspan3018" + sodipodi:role="line">Application</tspan><tspan + style="font-size:12px;text-align:center;text-anchor:middle" + y="103.48486" + x="-166.80605" + sodipodi:role="line" + id="tspan3020">Utilisateur</tspan></text> + </g> +</svg>