forked from processone/tsung
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Design_fr.txt
104 lines (65 loc) · 3.02 KB
/
Design_fr.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
Arbre de supervision OTP:
========================
tsung est divisé en deux applications aux sens OTP:
** un controlleur unique (tsung_controller)
* ts_config_server (gen_server). Serveur de configuration server. La
définition des sessions est gardé part le serveur de configuration.
* ts_mon (gen_server)
* ts_os_mon (gen_server)
* ts_timer (utilisé par ts_client en global) (gen_fsm)
serveurs utilisés pour construire les messages:
* ts_msg_server (gen_server)
* ts_user_server (gen_server) utilisé par ts_launcher et jabber_*
pour l'unicité des utilisateurs
** plusieurs injecteurs (tsung). Plusieus noeuds peuvent être actifs
simultanément
* ts_launcher (gen_fsm) lance les clients simulés (selon un processus de
Poisson).
* ts_session_cache (gen_server) cache les sessions (interroge le
config_server si la session n'est pas encore dans le cache)
* 1 processus erlang par client simulé (ts_client), sous la
supervision de ts_client_sup (simple_one_for_one)
Le principaux modules sont:
==========================
1/ ts_launcher. Le processus maître qui va lancer les autres
processus (un par beam)
1.1/ processus clients initiant les connexions TCP
(module ts_client). Ces processus sont lancés par le processus
maître avec un intervalle de temps suivant une distribution de
probabilité exponentielle d'intensité paramétrable au démarrage
(unité = sec). Le nombre de clients total est également
paramétrable au démarrage du processus maître (il s'agit bien du
nombre de client total et non du nombre de clients simultanés)
1.2/ Le processus de monitoring (module ts_mon)
2/ Un module pour gérer les échantillons aléatoires (module ts_stats)
4/ Les modules spécifiques pour gérer les différents protocoles (module
ts_jabber ou ts_http par ex.).
Comment rajouter un nouveau protocole ou étendre un existant:
============================================================
Tout protocole doit exporter les fonctions suivantes:
-export([init_dynparams/0,
add_dynparams/4,
get_message/1,
session_defaults/0,
parse/2,
parse_config/2,
new_session/0]).
cf. fichier template doc/ts_template.erl
Références:
==========
- Erlang
http://www.erlang.org/
Design principles:
http://www.erlang.org/doc/r7b/doc/design_principles/part_frame.html
- Jabber
http://docs.jabber.org/general/html/protocol.html
- modélisation stochastiques :
Plus de détails sur ce type de modélisation sont disponibles dans les
documents suivants (dans le contexte du protocole HTTP)
Nicolas Niclausse. Modélisation, analyse de performance et
dimensionnement du World Wide Web. Thèse de Doctorat, Université
de Nice - Sophia Antipolis, Juin 1999.
http://www-sop.inria.fr/mistral/personnel/Nicolas.Niclausse/these.html
Z. Liu, N. Niclausse, C. Jalpa-Villanueva & S. Barbier. Traffic
Model and Performance Evaluation of Web Servers Rapport de
recherche INRIA, RR-3840 (http://www.inria.fr/rrrt/rr-3840.html)