Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / docs / source / platform_examples.rst
1 .. raw:: html
2
3    <object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
4    <script>
5    window.onload=function() { // Wait for the SVG to be loaded before changing it
6      var elem=document.querySelector("#TOC").contentDocument.getElementById("PlatformBox")
7      elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1;stroke:#000000;stroke-width:0.35277778;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1";
8    }
9    </script>
10    <br/>
11    <br/>
12
13 Platform Examples
14 =================
15
16 Here is a very simple platform file, containing 3 resources (two hosts
17 and one link), and explicitly giving the route between the hosts.
18
19 .. literalinclude:: ../../examples/platforms/two_hosts.xml
20    :language: xml   
21
22 The root tag must be ``<platform>``, and its ``version`` attribute
23 specifies the used DTD version. When the DTD evolutions introduce
24 backward-incompatible changes, this number gets updated. Use the
25 ``simgrid_update_xml`` utility to upgrade your platform files on need.
26
27
28 Then, every platform element must be located within a given
29 **networking zone** introduced with the :ref:`pf_tag_zone` tag.  Zones
30 are in charge of the routing: an host wants to communicate with
31 another host of the same zone, it is the zone's duty to find the list
32 of links that are involved in the communication. Here, since we use
33 ``routing="Full"``, all routes must be explicitly given using the
34 :ref:`pf_tag_route` and :ref:`pf_tag_linkctn` tags (this :ref:`routing
35 model <pf_rm>` is both simple and inefficient :) It is OK to not
36 specify each and every route between hosts, as long as you don't start
37 at runtime any communications on the missing routes.
38
39 Any zone may contain sub-zones itself, leading to a hierarchical
40 decomposition of the platform. This can be more efficient (as the
41 inter-zone routing gets factorized with :ref:`pf_tag_zoneroute`), and
42 allows to have more than one routing model in your platform. For
43 example, you could have a coordinate-based routing for the WAN parts
44 of your platforms, a full routing within each datacenter, and a highly
45 optimized routing within each cluster of the datacenter.  In this
46 case, determining the route between two given hosts gets @ref
47 routing_basics "somewhat more complex" but SimGrid still computes
48 these routes for you in a time- and space-efficient manner.
49 Here is an illustration of these concepts:
50
51 .. image:: img/zone_hierarchy.png
52
53 The zone "AS2" models the core of a national network interconnecting a
54 small flat cluster (AS4) and a larger hierarchical cluster (AS5), a
55 subset of a LAN (AS6), and a set of peers scattered around the world
56 (AS7).
57
58 .. todo:: Add more examples, such as the cloud example descibed in
59           previous paragraph
60