Compare commits

...

257 Commits

Author SHA1 Message Date
Никита Чернышов
5dd9e26f07 chernyshov_nikita_lab_3 is ready 2024-12-15 16:26:38 +04:00
60e2c7996c Merge pull request 'nikolaeva_yana_lab_3' (#337) from nikolaeva_yana_lab_3 into main
Reviewed-on: #337
2024-12-15 14:54:45 +04:00
95d2554f95 Merge pull request 'kurushina_ksenia_lab_3' (#331) from kurushina_ksenia_lab_3 into main
Reviewed-on: #331
2024-12-15 14:52:52 +04:00
d9c57f2e8e Merge pull request 'fadeeva_nastya_laab_8' (#330) from fadeeva_nastya_lab_8 into main
Reviewed-on: #330
2024-12-15 14:52:33 +04:00
158c0670a4 Merge pull request 'ismailov_rovshan_lab_8 is ready' (#329) from ismailov_rovshan_lab_8 into main
Reviewed-on: #329
2024-12-15 14:49:58 +04:00
df8cf26c03 Merge pull request 'ismailov_rovshan_lab_7 is ready' (#328) from ismailov_rovshan_lab_7 into main
Reviewed-on: #328
2024-12-15 14:49:13 +04:00
9495f5cd12 Merge pull request 'ismailov_rovshan_lab_6 is ready' (#327) from ismailov_rovshan_lab_6 into main
Reviewed-on: #327
2024-12-15 14:48:54 +04:00
9e71d368c8 Merge pull request 'ismailov_rovshan_lab_5 is ready' (#326) from ismailov_rovshan_lab_5 into main
Reviewed-on: #326
2024-12-15 14:48:34 +04:00
5c8dbc4ae3 Merge pull request 'ismailov_rovshan_lab_4 is ready' (#325) from ismailov_rovshan_lab_4 into main
Reviewed-on: #325
2024-12-15 14:48:19 +04:00
e89eb8fc8d Merge pull request 'melnikov_igor_lab_5' (#321) from melnikov_igor_lab_5 into main
Reviewed-on: #321
2024-12-15 14:46:53 +04:00
a74ea43db8 Merge pull request 'fadeeva_nastya_lab_7' (#316) from fadeeva_nastya_lab_7 into main
Reviewed-on: #316
2024-12-15 14:44:23 +04:00
f1afb24c8b Merge pull request 'fadeeva_nastya_lab_6' (#315) from fadeeva_nastya_lab_6 into main
Reviewed-on: #315
2024-12-15 14:43:59 +04:00
2c12d97510 Merge pull request 'fadeeva_nastya_lab_5' (#314) from fadeeva_nastya_lab_5 into main
Reviewed-on: #314
2024-12-15 14:43:43 +04:00
00c170a00c Merge pull request 'fadeeva_nastya_lab_4' (#313) from fadeeva_nastya_lab_4 into main
Reviewed-on: #313
2024-12-15 14:43:22 +04:00
c620f10752 Merge pull request 'ismailov_rovshan_lab_3' (#312) from ismailov_rovshan_lab_3 into main
Reviewed-on: #312
2024-12-15 14:41:48 +04:00
e46d33bc4d Merge pull request 'bondarenko_max_lab_8' (#311) from bondarenko_max_lab_8 into main
Reviewed-on: #311
2024-12-15 14:40:29 +04:00
1a11fca0e4 Merge pull request 'bondarenko_max_lab_7' (#310) from bondarenko_max_lab_7 into main
Reviewed-on: #310
2024-12-15 14:39:55 +04:00
db9395340c Merge pull request 'fadeeva_nastya_lab_3 is ready' (#309) from fadeeva_nastya_lab_3 into main
Reviewed-on: #309
2024-12-15 14:39:41 +04:00
9485011484 Merge pull request 'bondarenko_max_lab_6' (#308) from bondarenko_max_lab_6 into main
Reviewed-on: #308
2024-12-15 14:39:12 +04:00
75c4fde178 Merge pull request 'bondarenko_max_lab_5' (#307) from bondarenko_max_lab_5 into main
Reviewed-on: #307
2024-12-15 14:37:58 +04:00
93f689f155 Merge pull request 'vasina_ekaterina_lab_8' (#301) from vasina_ekaterina_lab_8 into main
Reviewed-on: #301
2024-12-15 14:35:41 +04:00
6e224cf288 Merge pull request 'vasina_ekaterina_lab_7' (#300) from vasina_ekaterina_lab_7 into main
Reviewed-on: #300
2024-12-15 14:35:19 +04:00
a9fba22e19 Merge pull request 'vasina_ekaterina_lab_6' (#299) from vasina_ekaterina_lab_6 into main
Reviewed-on: #299
2024-12-15 14:35:05 +04:00
d7008ca1e5 Merge pull request 'vasina_ekaterina_lab_4' (#297) from vasina_ekaterina_lab_4 into main
Reviewed-on: #297
2024-12-15 14:33:15 +04:00
3fb94595bc Merge pull request 'bondarenko_max_lab_4' (#295) from bondarenko_max_lab_4 into main
Reviewed-on: #295
2024-12-15 14:23:54 +04:00
14de0603a8 Merge pull request 'vasina_ekaterina_lab_3' (#294) from vasina_ekaterina_lab_3 into main
Reviewed-on: #294
2024-12-15 14:23:19 +04:00
31346e7082 Merge pull request 'fadeeva_nastya_lab_2 is ready' (#293) from fadeeva_nastya_lab_2 into main
Reviewed-on: #293
2024-12-15 14:23:01 +04:00
fc6f211197 Merge pull request 'alkin_ivan_lab_3' (#292) from alkin_ivan_lab_3 into main
Reviewed-on: #292
2024-12-15 14:22:40 +04:00
b5944df141 Merge pull request 'chernyshov_nikita_lab_2' (#289) from chernyshov_nikita_lab_2 into main 2024-12-15 14:13:35 +04:00
Никита Чернышов
1812ac159e Chernyshov Nikita Lab2 is Ready 2024-12-15 14:13:35 +04:00
fa4c181ac0 Merge pull request 'Chernyshov Nikita Lab1 is Ready' (#270) from chernyshov_nikita_lab_1 into main
Reviewed-on: #270
2024-12-15 14:12:49 +04:00
4343669b5a Merge pull request 'alkin_ivan_lab_2' (#271) from alkin_ivan_lab_2 into main
Reviewed-on: #271
2024-12-15 14:12:18 +04:00
d95e2a9d3a Merge pull request 'nikolaeva_yana_lab_2' (#272) from nikolaeva_yana_lab_2 into main
Reviewed-on: #272
2024-12-15 14:12:00 +04:00
2f9c00b03b Merge pull request 'novopolcev_alexander_lab_3' (#281) from novopolcev_alexander_lab_3 into main
Reviewed-on: #281
2024-12-15 14:06:49 +04:00
51af80f3ad Merge pull request 'novopolcev_alexander_lab_2' (#249) from novopolcev_alexander_lab_2 into main
Reviewed-on: #249
2024-12-15 14:01:47 +04:00
1fffeaa7e9 Merge pull request 'putilin_pavel_lab_4' (#252) from putilin_pavel_lab_4 into main
Reviewed-on: #252
2024-12-15 13:55:43 +04:00
a463ec8241 Merge pull request 'afanasev_dmitry_lab_8 is ready' (#244) from afanasev_dmitry_lab_8 into main
Reviewed-on: #244
2024-12-15 13:55:04 +04:00
7a1ba7aa9a Merge pull request 'polevoy_sergey_lab_8' (#246) from polevoy_sergey_lab_8 into main
Reviewed-on: #246
2024-12-15 13:54:40 +04:00
08cc99b0fc Merge pull request 'nikolaeva_yana_lab_1 is ready' (#254) from nikolaeva_yana_lab_1 into main
Reviewed-on: #254
2024-12-15 13:53:35 +04:00
6556e21d9a Merge pull request 'kurushina_ksenia_lab_1' (#256) from kurushina_ksenia_lab_1 into main
Reviewed-on: #256
2024-12-15 13:52:48 +04:00
7accd18aea Merge pull request 'fadeeva_nastya_lab_1' (#263) from fadeeva_nastya_lab_1 into main
Reviewed-on: #263
2024-12-15 13:41:31 +04:00
bfc6d8bb95 Merge pull request 'kurushina_ksenia_lab_2' (#261) from kurushina_ksenia_lab_2 into main
Reviewed-on: #261
2024-12-15 13:40:51 +04:00
cdd0a7b7c9 Merge pull request 'bondarenko_max_lab_2' (#231) from bondarenko_max_lab_2 into main
Reviewed-on: #231
2024-12-15 13:38:02 +04:00
27850eb504 Merge pull request 'haliullov_kamil_lab_1' (#232) from haliullov_kamil_lab_1 into main
Reviewed-on: #232
2024-12-15 13:37:40 +04:00
6feebae507 Merge pull request 'karamushko_maxim_lab1' (#234) from karamushko_maxim_lab_1 into main
Reviewed-on: #234
2024-12-15 13:36:09 +04:00
1648f5995a Merge pull request 'kalyshev_yan_lab_6' (#235) from kalyshev_yan_lab_6 into main
Reviewed-on: #235
2024-12-15 13:35:48 +04:00
bf8d06a85d Merge pull request 'bazunov andrew lab 8 ready' (#239) from bazunov_andrew_lab_8 into main
Reviewed-on: #239
2024-12-15 13:35:08 +04:00
de0f1780c7 Merge pull request 'afanasev_dmitry_lab_6 is ready' (#242) from afanasev_dmitry_lab_6 into main
Reviewed-on: #242
2024-12-15 13:33:07 +04:00
e54fd14090 Merge pull request 'minhasapov_ruslan_lab_6' (#211) from minhasapov_ruslan_lab_6 into main
Reviewed-on: #211
2024-12-15 13:32:11 +04:00
ce580c4572 Merge pull request 'minhasapov_ruslan_lab_5' (#210) from minhasapov_ruslan_lab_5 into main
Reviewed-on: #210
2024-12-15 13:31:35 +04:00
84f32a0993 Merge pull request 'ismailov_rovshan_lab_2 is ready' (#222) from ismailov_rovshan_lab_2 into main
Reviewed-on: #222
2024-12-15 13:30:41 +04:00
7a36b2b0af Merge pull request 'presnyakova_victoria_lab_6' (#219) from presnyakova_victoria_lab_6 into main
Reviewed-on: #219
2024-12-15 13:30:18 +04:00
02d6165c7e Merge pull request 'polevoy_sergey_lab_6' (#218) from polevoy_sergey_lab_6 into main
Reviewed-on: #218
2024-12-15 13:30:03 +04:00
18c838d58c Merge pull request 'polevoy_sergey_lab_5' (#215) from polevoy_sergey_lab_5 into main
Reviewed-on: #215
2024-12-15 13:29:40 +04:00
9d6529c11d Merge pull request 'rogashova_ekaterina_lab_6' (#214) from rogashova_ekaterina_lab_6 into main
Reviewed-on: #214
2024-12-15 13:29:18 +04:00
1dc61d09d4 Merge pull request 'artamonova_tatyana_lab_6 is ready' (#205) from artamonova_tatyana_lab_6 into main
Reviewed-on: #205
2024-12-15 13:27:00 +04:00
84edc080bd Merge pull request 'artamonova_tatyana_lab_7 is ready' (#206) from artamonova_tatyana_lab_7 into main
Reviewed-on: #206
2024-12-15 13:26:41 +04:00
885ad1ffec Merge pull request 'artamonova_tatyana_lab_8 is ready' (#207) from artamonova_tatyana_lab_8 into main
Reviewed-on: #207
2024-12-15 13:26:25 +04:00
4b1c9666a0 Merge pull request 'polevoy_sergey_lab_4' (#208) from polevoy_sergey_lab_4 into main
Reviewed-on: #208
2024-12-15 13:23:01 +04:00
135f79e158 Merge pull request 'minhasapov_ruslan_lab_4' (#209) from minhasapov_ruslan_lab_4 into main
Reviewed-on: #209
2024-12-15 13:22:35 +04:00
62b20a244e Merge pull request 'minhasapov_ruslan_lab_8' (#213) from minhasapov_ruslan_lab_8 into main
Reviewed-on: #213
2024-12-15 13:21:15 +04:00
e8f3643fd1 Merge pull request 'minhasapov_ruslan_lab_7' (#212) from minhasapov_ruslan_lab_7 into main
Reviewed-on: #212
2024-12-15 13:20:57 +04:00
2a388e9788 Merge pull request 'rogashova_ekaterina_lab_7' (#216) from rogashova_ekaterina_lab_7 into main
Reviewed-on: #216
2024-12-15 13:20:37 +04:00
3be8ceb996 Merge pull request 'rogashova_ekaterina_lab_8' (#217) from rogashova_ekaterina_lab_8 into main
Reviewed-on: #217
2024-12-15 13:20:08 +04:00
84786b8531 Merge pull request 'presnyakova_victoria_lab_7' (#220) from presnyakova_victoria_lab_7 into main
Reviewed-on: #220
2024-12-15 13:18:44 +04:00
6b370579f8 Merge pull request 'presnyakova_victoria_lab_8' (#221) from presnyakova_victoria_lab_8 into main
Reviewed-on: #221
2024-12-15 13:18:29 +04:00
a608e3a24b Merge pull request 'aleikin_artem_lab4' (#225) from aleikin_artem_lab4 into main
Reviewed-on: #225
2024-12-15 13:17:00 +04:00
4f7d9d4ba1 Merge pull request 'bondarenko_max_lab_3' (#233) from bondarenko_max_lab_3 into main
Reviewed-on: #233
2024-12-15 13:12:06 +04:00
547212dca6 Merge pull request 'bazunov andrew lab 7 ready' (#238) from bazunov_andrew_lab_7 into main
Reviewed-on: #238
2024-12-15 13:10:45 +04:00
58f4127148 Merge pull request 'putilin_pavel_lab_3' (#241) from putilin_pavel_lab_3 into main
Reviewed-on: #241
2024-12-15 13:10:28 +04:00
f12a88ed52 Merge pull request 'afanasev_dmitry_lab_7 is ready' (#243) from afanasev_dmitry_lab_7 into main
Reviewed-on: #243
2024-12-15 13:09:46 +04:00
e3979acf4d Merge pull request 'polevoy_sergey_lab_7' (#245) from polevoy_sergey_lab_7 into main
Reviewed-on: #245
2024-12-15 13:08:23 +04:00
8640f9e8fc Merge pull request 'kosheev_maksim_lab_4' (#247) from kosheev_maksim_lab_4 into main
Reviewed-on: #247
2024-12-15 13:08:03 +04:00
c26a7b8d97 Merge pull request 'kosheev_maksim_lab_7' (#250) from kosheev_maksim_lab_7 into main
Reviewed-on: #250
2024-12-15 13:04:27 +04:00
29320bae24 Merge pull request 'novopolcev_alexander_lab_1' (#248) from novopolcev_alexander_lab_1 into main
Reviewed-on: #248
2024-12-15 13:03:47 +04:00
5449675d39 Merge pull request 'artamonova_tatyana_lab_5 is ready' (#204) from artamonova_tatyana_lab_5 into main
Reviewed-on: #204
2024-12-15 12:53:40 +04:00
b895c806e7 Merge pull request 'rogashova_ekaterina_lab_5' (#203) from rogashova_ekaterina_lab_5 into main
Reviewed-on: #203
2024-12-15 12:52:53 +04:00
920dec1ede Merge pull request 'polevoy_sergey_lab_3' (#202) from polevoy_sergey_lab_3 into main
Reviewed-on: #202
2024-12-15 12:52:33 +04:00
fdba824237 Merge pull request 'minhasapov_ruslan_lab_3' (#201) from minhasapov_ruslan_lab_3 into main
Reviewed-on: #201
2024-12-15 12:51:37 +04:00
yasha
10a12d8da0 fadeeva_nastya_laab_8 2024-12-15 08:54:42 +04:00
25b2a2c481 ismailov_rovshan_lab_8 is ready 2024-12-15 07:33:40 +04:00
c699558126 ismailov_rovshan_lab_7 is ready 2024-12-15 07:30:26 +04:00
4226945dca ismailov_rovshan_lab_6 is ready 2024-12-15 07:24:34 +04:00
239da31a0d ismailov_rovshan_lab_5 is ready 2024-12-15 06:47:19 +04:00
693c6bd91d ismailov_rovshan_lab_4 is ready_fix 2024-12-15 05:52:18 +04:00
31c074f6bb ismailov_rovshan_lab_4 is ready 2024-12-15 05:45:25 +04:00
21c4aa5f5e . 2024-12-15 03:37:34 +04:00
yasha
75b27fd1f5 fadeeva_nastya_lab_7 2024-12-15 02:13:35 +04:00
yasha
05293340a3 fadeeva_nastya_lab_6 2024-12-15 01:36:56 +04:00
yasha
ef4acd4ec6 fadeeva_nastya_lab_5 2024-12-15 01:24:02 +04:00
yasha
356bb54247 fadeeva_nastya_lab_4 2024-12-15 01:08:36 +04:00
c9b601dda5 ismailov_rovshan_lab_3 is ready 2024-12-14 02:58:05 +04:00
a3dc157784 ismailov_rovshan_lab_3 is ready 2024-12-14 02:55:05 +04:00
c06d3e291b bondarenko_max_lab_8_is_ready 2024-12-14 02:03:56 +04:00
4c83bd29bf bondarenko_max_lab_7_is_ready 2024-12-14 01:37:52 +04:00
yasha
a3827d5b4b fadeeva_nastya_lab_3 is ready 2024-12-14 01:21:48 +04:00
b64b354a74 bondarenko_max_lab_5_is_ready 2024-12-14 01:13:43 +04:00
8ef7197268 bondarenko_max_lab_6_is_ready 2024-12-14 01:03:28 +04:00
8e5776d104 bondarenko_max_lab_5 2024-12-13 23:52:37 +04:00
25f8ce44eb bondarenko_max_lab_5_is_ready 2024-12-13 23:51:05 +04:00
a25c242bda bondarenko_max_lab_4_is_ready 2024-12-13 22:49:58 +04:00
429ab85f80 bondarenko_max_lab_4_is_ready 2024-12-13 22:46:31 +04:00
681b9b4c00 bondarenko_max_lab_4_is_ready 2024-12-13 22:44:20 +04:00
ae4ba4c88d vasina_ekaterina_lab_8 is ready 2024-12-13 18:41:44 +04:00
91b02cece8 vasina_ekaterina_lab_7 is ready 2024-12-13 18:40:29 +04:00
fb3994fcab vasina_ekaterina_lab_6 is ready 2024-12-13 18:37:07 +04:00
af77bb1076 vasina_ekaterina_lab_4 is ready 2024-12-13 18:16:02 +04:00
3fb0096475 bondarenko_max_lab_4 is done 2024-12-13 05:48:37 +04:00
752036c0ae vasina_ekaterina_lab_3 is ready 2024-12-13 03:02:14 +04:00
yasha
544d4c2714 fadeeva_nastya_lab_2 is ready 2024-12-13 00:31:02 +04:00
5247783708 alkin_ivan_lab_3 2024-12-12 22:44:53 +04:00
7e69d49c4d Revert "alkin_ivan_lab_1"
This reverts commit b38e7552
2024-12-12 22:16:56 +04:00
753e2f6593 Revert "alkin_ivan_lab_1"
This reverts commit ee80d0ffdd.
2024-12-12 22:12:41 +04:00
055bb25d6b novopolcev_alexander_lab_3 is ready 2024-12-11 14:11:10 +04:00
e760640200 bondarenko_max_lab_4 2024-12-10 21:33:59 +04:00
Yana
063b93d78e nikolaeva_yana_lab_3 2024-12-10 20:14:57 +04:00
Yana
44a4ee7eec nikolaeva_yana_lab_2 2024-12-10 19:37:07 +04:00
3df2cc1a48 alkin_ivan_lab_2 2024-12-09 23:56:12 +04:00
8c5f33678e alkin_ivan_lab_2 2024-12-09 23:49:29 +04:00
Никита Чернышов
2cfe26ee1b Chernyshov Nikita Lab1 is Ready 2024-12-09 21:54:17 +04:00
ee80d0ffdd alkin_ivan_lab_1 2024-12-09 21:24:17 +04:00
63854633e1 alkin_ivan_lab_1 2024-12-09 21:05:04 +04:00
b38e755299 alkin_ivan_lab_1 2024-12-09 21:03:02 +04:00
yasha
65121a52d7 fadeeva_nastya_lab_1 is ready 2024-12-08 23:10:06 +04:00
Kseniy
7811d112d9 kurushina_ksenia_lab_3 2024-12-08 22:45:52 +04:00
Kseniy
abea29a111 kurushina_ksenia_lab_3 2024-12-08 22:45:33 +04:00
Kseniy
529b2c8782 kurushina_ksenia_lab_2 2024-12-08 20:55:28 +04:00
db8939f045 kurushina_ksenia_lab_1 is ready 2024-12-05 18:43:39 +04:00
Pavel
219c77a03f putilin_pavel_lab_4 2024-12-05 16:44:57 +04:00
8462ae9c2f nikolaeva_yana_lab_1 is ready 2024-12-04 23:33:28 +04:00
a5a422fc0f kosheev_maksim_lab_7 is ready 2024-12-04 15:01:33 +04:00
a1bca21933 kosheev_maksim_lab_7 is ready 2024-12-04 15:01:16 +04:00
6f030312a7 novopolcev_alexander_lab_2 is ready 2024-12-04 12:12:21 +04:00
2fc7e3e67f novopolcev_alexander_lab_1 is ready 2024-12-04 10:46:19 +04:00
9bbe7b8b53 kosheev_maksim_lab_4 is ready3 2024-12-04 00:28:01 +04:00
0add49368f kosheev_maksim_lab_4 is ready2 2024-12-04 00:27:02 +04:00
41d7a3d8fd kosheev_maksim_lab_4 is ready 2024-12-04 00:21:19 +04:00
bc087de470 Merge pull request 'pupkov_alexey_lab8 is ready' (#200) from pupkov_alexey_lab_8 into main
Reviewed-on: #200
2024-12-03 23:12:44 +04:00
a4cf38e0c5 Merge pull request 'pupkov_alexey_lab7 is ready' (#199) from pupkov_alexey_lab_7 into main
Reviewed-on: #199
2024-12-03 23:12:20 +04:00
7da1307156 Merge pull request 'pupkov_alexey_lab6 is ready' (#198) from pupkov_alexey_lab_6 into main
Reviewed-on: #198
2024-12-03 23:11:57 +04:00
9fd3c9ba1f Merge pull request 'putilin_pavel_lab_1 is ready' (#188) from putilin_pavel_lab_1 into main
Reviewed-on: #188
2024-12-03 23:10:25 +04:00
6ea7581574 Merge pull request 'pupkov_alexey_lab_5' (#197) from pupkov_alexey_lab_5 into main
Reviewed-on: #197
2024-12-03 23:09:31 +04:00
ce3325db81 Merge pull request 'pupkov_alexey_lab4 is ready' (#196) from pupkov_alexey_lab_4 into main
Reviewed-on: #196
2024-12-03 23:09:03 +04:00
22dd0c1a6f Merge pull request 'polevoy_sergey_lab_2' (#195) from polevoy_sergey_lab_2 into main
Reviewed-on: #195
2024-12-03 23:08:36 +04:00
506d1bb364 Merge pull request 'pupkov_alexey_lab3 is ready' (#194) from pupkov_alexey_lab_3 into main
Reviewed-on: #194
2024-12-03 23:06:03 +04:00
d70e738ef0 Merge pull request 'minhasapov_ruslan_lab_2' (#193) from minhasapov_ruslan_lab_2 into main
Reviewed-on: #193
2024-12-03 23:05:37 +04:00
183054d1d4 Merge pull request 'rogashova_ekaterina_lab_4' (#192) from rogashova_ekaterina_lab_4 into main
Reviewed-on: #192
2024-12-03 23:05:12 +04:00
574e9bba1b Merge pull request 'mochalov_danila_lab_8 is ready' (#191) from mochalov_danila_lab_8 into main
Reviewed-on: #191
2024-12-03 23:04:46 +04:00
898f188739 Merge pull request 'morozov_vladimir_lab_8 is ready' (#190) from morozov_vladimir_lab_8 into main
Reviewed-on: #190
2024-12-03 23:04:30 +04:00
8985b761bd Merge pull request 'morozov_vladimir_lab_7 is ready' (#189) from morozov_vladimir_lab_7 into main
Reviewed-on: #189
2024-12-03 23:04:13 +04:00
043da1373f Merge pull request 'agliullov_daniyar_lab_1 is ready' (#187) from agliullov_daniyar_lab_1 into main
Reviewed-on: #187
2024-12-03 23:03:40 +04:00
972d1442f3 Merge pull request 'morozov_vladimir_lab_6 is ready' (#186) from morozov_vladimir_lab_6 into main
Reviewed-on: #186
2024-12-03 23:03:25 +04:00
5b6a3e7971 Merge pull request 'mochalov_danila_lab_7' (#185) from mochalov_danila_lab_7 into main
Reviewed-on: #185
2024-12-03 22:51:07 +04:00
46da8f27b8 Merge pull request 'morozov_vladimir_lab_5 is ready' (#184) from morozov_vladimir_lab_5 into main
Reviewed-on: #184
2024-12-03 22:18:46 +04:00
1dc8fb7ecd Merge pull request 'kosheev_maksim_lab_6' (#182) from kosheev_maksim_lab_6 into main
Reviewed-on: #182
2024-12-03 22:18:04 +04:00
4347288bb2 Merge pull request 'kosheev_maksim_lab_5 is ready' (#180) from kosheev_maksim_lab_5 into main
Reviewed-on: #180
2024-12-03 22:16:59 +04:00
b63718633c Merge pull request 'kadyrov_aydar_lab_8' (#179) from kadyrov_aydar_lab_8 into main
Reviewed-on: #179
2024-12-03 22:16:33 +04:00
46e167424e Merge pull request 'kadyrov_aydar_lab_6' (#177) from kadyrov_aydar_lab_6 into main
Reviewed-on: #177
2024-12-03 22:15:55 +04:00
7002b58201 Восьмая лабораторная готова 2024-12-03 06:39:03 +04:00
a3c467e867 Седьмая лабораторная готова 2024-12-03 04:36:38 +04:00
e7a219301e afanasev_dmitry_lab_8 is ready 2024-12-03 01:24:29 +04:00
bc54fabeb5 afanasev_dmitry_lab_7 is ready 2024-12-03 01:18:16 +04:00
90206c821f afanasev_dmitry_lab_6 is ready 2024-12-03 01:05:19 +04:00
Pavel
f6614533d7 Revert "putilin_pavel_lab_2"
This reverts commit 9808787f27.
2024-12-03 00:00:30 +04:00
Pavel
3ef7c65962 putilin_pavel_lab_3 2024-12-02 23:57:46 +04:00
Pavel
9808787f27 putilin_pavel_lab_2 2024-12-02 23:12:59 +04:00
NAP
e61cfe3336 kadyrov_aydar_lab_6_fix is ready 2024-12-01 21:48:26 +04:00
NAP
b6079c266e kadyrov_aydar_lab_6_fix is ready 2024-12-01 21:45:58 +04:00
7f5ad611b5 Merge pull request 'morozov_vladimir_lab_4 is ready' (#176) from morozov_vladimir_lab_4 into main
Reviewed-on: #176
2024-11-29 15:49:54 +04:00
014088a385 Merge pull request 'kadyrov_aydar_lab_7' (#178) from kadyrov_aydar_lab_7 into main
Reviewed-on: #178
2024-11-29 15:49:07 +04:00
a171fb7572 Merge pull request 'morozov_vladimir_lab_3 is ready' (#175) from morozov_vladimir_lab_3 into main
Reviewed-on: #175
2024-11-29 15:47:09 +04:00
e01e3267c6 Merge pull request 'afanasev_dmitry_lab_5 is ready' (#173) from afanasev_dmitry_lab_5 into main
Reviewed-on: #173
2024-11-29 15:46:43 +04:00
271ce7249c Merge pull request 'afanasev_dmitry_lab_4 is ready' (#172) from afanasev_dmitry_lab_4 into main
Reviewed-on: #172
2024-11-29 15:46:26 +04:00
0887bc1d98 Merge pull request 'kosheev_maksim_lab_2' (#171) from kosheev_maksim_lab_2 into main
Reviewed-on: #171
2024-11-29 10:24:02 +04:00
5dbc6a294b Merge pull request 'bogdanov_dmitry_lab_8' (#167) from bogdanov_dmitry_lab_8 into main
Reviewed-on: #167
2024-11-29 10:23:33 +04:00
df05f3f538 Merge pull request 'bogdanov_dmitry_lab_7' (#166) from bogdanov_dmitry_lab_7 into main
Reviewed-on: #166
2024-11-29 10:00:15 +04:00
06873933fe Merge pull request 'bogdanov_dmitry_lab_6' (#165) from bogdanov_dmitry_lab_6 into main
Reviewed-on: #165
2024-11-29 09:15:13 +04:00
Bazunov Andrew Igorevich
69f42f260e ready 2024-11-29 00:23:15 +04:00
Zyzf
cdaa75298a add video and fixes 2024-11-26 19:13:56 +04:00
Zyzf
4390166883 done without video 2024-11-26 19:08:28 +04:00
287fb33386 bondarenko_max_lab_3 2024-11-25 02:23:32 +04:00
9ff5b267bc bondarenko_max_lab_3 is done 2024-11-25 02:10:37 +04:00
Kamil Haliullov
6beff3a600 haliullov_kamil_lab_1 is ready 2024-11-24 19:09:55 +04:00
9d7821b12b gitignore is edited 2024-11-24 18:41:58 +04:00
07a49d9b7b bondarenko_max_lab_2 is done 2024-11-24 18:40:08 +04:00
max karme
8546d15925 karamushko_maxim_lab1 2024-11-22 04:31:14 +04:00
ead1821703 kosheev_maksim_lab_3 is ready 2024-11-21 04:43:58 +04:00
ba0da1d0d4 aleikin_artem_lab4 is ready 2024-11-20 04:52:23 +04:00
ad560d4736 aleikin_artem_lab4 is ready 2024-11-20 04:51:11 +04:00
ed5444768f aleikin_artem_lab4 is ready 2024-11-20 04:47:26 +04:00
f3b2646a1e aleikin_artem_lab4 2024-11-20 04:43:04 +04:00
accd6bf3ee aleikin_artem_lab4 2024-11-20 04:42:55 +04:00
aabcb9cd0b ismailov_rovshan_lab_2 is ready 2024-11-19 01:11:40 +04:00
743c9ebc3c lab 8 done 2024-11-18 19:07:56 +04:00
f8750da593 lab 7 done 2024-11-18 18:56:40 +04:00
d91622551e lab 6 done 2024-11-18 18:50:31 +04:00
9995db128b lab 6 done 2024-11-18 18:49:38 +04:00
f70c507b05 Шестая лабораторная готова 2024-11-18 17:08:58 +04:00
715d3aed42 Готово 2024-11-18 15:39:05 +04:00
56094094e4 Готово 2024-11-18 14:20:48 +04:00
c406c5bfb5 Пятая лабораторная готова 2024-11-18 13:32:23 +04:00
c0d126982f Готово 2024-11-18 10:50:25 +04:00
1b7e6aaa75 minhasapov_ruslan_lab_8 2024-11-18 07:39:36 +04:00
729994bd69 minhasapov_ruslan_lab_8 2024-11-18 07:35:52 +04:00
0126669fcf minhasapov_ruslan_lab_7 2024-11-18 06:50:13 +04:00
17d5f3321a minhasapov_ruslan_lab_6 2024-11-18 05:37:56 +04:00
b3c516e6c1 minhasapov_ruslan_lab_5 2024-11-18 02:27:55 +04:00
7546199b38 kosheev_maksim_lab_5 video 2024-11-18 02:06:09 +04:00
4581b18842 kosheev_maksim_lab_6 video 2024-11-18 01:44:54 +04:00
877d246bb5 minhasapov_ruslan_lab_4 2024-11-18 01:14:26 +04:00
db3d13a606 minhasapov_ruslan_lab_4 2024-11-18 01:10:21 +04:00
2308bf7b72 Четвертая лабораторная готова 2024-11-18 01:00:11 +04:00
9915587ada artamonova_tatyana_lab_8 is ready 2024-11-17 22:30:37 +04:00
31381ab310 artamonova_tatyana_lab_7 is ready 2024-11-17 22:03:15 +04:00
e0a2b5991a artamonova_tatyana_lab_6 is ready 2024-11-17 21:26:10 +04:00
224878be45 artamonova_tatyana_lab_5 is ready 2024-11-17 20:03:47 +04:00
ea2cfbc71b Готово 2024-11-17 19:09:56 +04:00
75e377a2db Третья лабораторная готова 2024-11-17 08:32:19 +04:00
fc6efda0c2 minhasapov_ruslan_lab_3 2024-11-17 08:07:00 +04:00
5296d03657 pupkov_alexey_lab8 is ready 2024-11-17 00:09:30 +03:00
54c09fd553 pupkov_alexey_lab7 is ready 2024-11-17 00:07:16 +03:00
6c27ae0efe pupkov_alexey_lab6 is ready 2024-11-16 23:59:37 +03:00
320615a6c6 pupkov_alexey_lab5 2024-11-16 23:47:02 +03:00
44059e8498 pupkov_alexey_lab3 is ready changed link 2024-11-16 23:33:45 +03:00
d90f748a00 pupkov_alexey_lab4 is ready 2024-11-16 23:12:02 +03:00
837af682e2 Исправления ошибок 2024-11-16 23:03:59 +04:00
fd88e38976 Вторая лабораторная готова 2024-11-16 23:02:15 +04:00
b3916786c1 pupkov_alexey_lab3 is ready 2024-11-16 21:33:29 +03:00
b56a8a8c57 minhasapov_ruslan_lab_2 is ready 2024-11-16 21:42:21 +04:00
ff99375ec7 Готово 2024-11-15 11:50:03 +04:00
9b878c442e mochalov_danila_lab_8 is ready 2024-11-15 02:50:38 +04:00
607c741d12 morozov_vladimir_lab_8 2024-11-14 22:39:23 +04:00
58a6d4c4b4 morozov_vladimir_lab_7 2024-11-14 22:14:20 +04:00
dc4315d87b putilin_pavel_lab_1 is ready 2024-11-14 21:59:21 +04:00
27b75d1fc8 putilin_pavel_lab_1 2024-11-14 21:51:46 +04:00
Darya
a99c58df28 agliullov_daniyar_lab_1 2024-11-14 21:39:53 +04:00
c182c28c15 morozov_vladimir_lab_6 2024-11-14 20:40:46 +04:00
0021d41166 mochalov_danila_lab_7 is ready 2024-11-14 17:22:28 +04:00
74a03658f9 morozov_vladimir_lab_5 is ready 2024-11-13 21:27:51 +04:00
ff8adac44c kosheev_maksim_lab_6 is ready 2024-11-13 19:30:41 +04:00
4ad5ec7f72 kosheev_maksim_lab_6 is ready 2024-11-13 19:29:40 +04:00
54e6fe2e82 kosheev_maksim_lab_5 is ready 2024-11-13 16:26:23 +04:00
NAP
44d1f90774 kadyrov_aydar_lab_8 2024-11-12 22:59:57 +04:00
NAP
cc6705ffd6 kadyrov_aydar_lab_7 2024-11-12 22:55:00 +04:00
NAP
da69a995e6 kadyrov_aydar_lab_6 2024-11-12 22:48:48 +04:00
553d25ee56 morozov_vladimir_lab_4 is ready 2024-11-12 22:29:39 +04:00
c8b1741166 morozov_vladimir_lab_3 is ready 2024-11-12 22:23:55 +04:00
d8356af421 afanasev_dmitry_lab_5 is ready 2024-11-12 03:14:05 +04:00
b9f604b3c1 afanasev_dmitry_lab_4 is ready 2024-11-12 02:21:31 +04:00
88e8fd7b6a kosheev_maksim_lab_2 is ready_2 2024-11-11 23:36:39 +04:00
20acae9135 kosheev_maksim_lab_2 is ready 2024-11-11 23:34:00 +04:00
the
aa571e03dc Lab8 2024-11-11 13:41:38 +04:00
the
64a82977ac small fix 2024-11-11 13:04:46 +04:00
the
70653dcf6e Lab7 2024-11-11 13:03:52 +04:00
the
672cc9e867 lab 6 2024-11-11 12:42:11 +04:00
201eb8f79e Merge branch 'main' into bondarenko_max_lab_2 2024-10-29 02:33:15 +04:00
115085bb88 code is complete 2024-10-29 02:32:40 +04:00
650 changed files with 17044 additions and 0 deletions

57
.gitignore vendored Normal file
View File

@ -0,0 +1,57 @@
################################################################################
# Данный GITIGNORE-файл был автоматически создан Microsoft(R) Visual Studio.
################################################################################
/.vs/DAS_2024_1
/.vs
/aleikin_artem_lab_3/.vs
/aleikin_artem_lab_3/ProjectEntityProject/bin/Debug/net8.0
/aleikin_artem_lab_3/ProjectEntityProject/obj
/aleikin_artem_lab_3/TaskProject/bin/Debug/net8.0
/aleikin_artem_lab_3/TaskProject/obj/Container
/aleikin_artem_lab_3/TaskProject/obj
/aleikin_artem_lab_4/RVIPLab4/.vs
/aleikin_artem_lab_4/RVIPLab4/Consumer1/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/Consumer1/obj
/aleikin_artem_lab_4/RVIPLab4/Consumer2/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/Consumer2/obj
/aleikin_artem_lab_4/RVIPLab4/FirstTutorial/Receive/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/FirstTutorial/Receive/obj
/aleikin_artem_lab_4/RVIPLab4/FirstTutorial/Send/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/FirstTutorial/Send/obj
/aleikin_artem_lab_4/RVIPLab4/Publisher/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/Publisher/obj
/aleikin_artem_lab_4/RVIPLab4/SecondTutorial/NewTask/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/SecondTutorial/NewTask/obj
/aleikin_artem_lab_4/RVIPLab4/SecondTutorial/Worker/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/SecondTutorial/Worker/obj
/aleikin_artem_lab_4/RVIPLab4/ThirdTutorial/EmitLog/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/ThirdTutorial/EmitLog/obj
/aleikin_artem_lab_4/RVIPLab4/ThirdTutorial/ReceiveLogs/bin/Debug/net8.0
/aleikin_artem_lab_4/RVIPLab4/ThirdTutorial/ReceiveLogs/obj
/dozorova_alena_lab_2
/dozorova_alena_lab_3
/dozorova_alena_lab_4
/dozorova_alena_lab_5/ConsoleApp1/obj
/dozorova_alena_lab_6/ConsoleApp1/obj
/aleikin_artem_lab_4/RVIPLab4/RVIPLab4.sln
/aleikin_artem_lab_4/.vs
/aleikin_artem_lab_4/Consumer1/bin/Debug/net8.0
/aleikin_artem_lab_4/Consumer1/obj
/aleikin_artem_lab_4/Consumer2/bin/Debug/net8.0
/aleikin_artem_lab_4/Consumer2/obj
/aleikin_artem_lab_4/FirstTutorial/Receive/bin/Debug/net8.0
/aleikin_artem_lab_4/FirstTutorial/Receive/obj
/aleikin_artem_lab_4/FirstTutorial/Send/bin/Debug/net8.0
/aleikin_artem_lab_4/FirstTutorial/Send/obj
/aleikin_artem_lab_4/Publisher/bin/Debug/net8.0
/aleikin_artem_lab_4/Publisher/obj
/aleikin_artem_lab_4/SecondTutorial/NewTask/bin/Debug/net8.0
/aleikin_artem_lab_4/SecondTutorial/NewTask/obj
/aleikin_artem_lab_4/SecondTutorial/Worker/bin/Debug/net8.0
/aleikin_artem_lab_4/SecondTutorial/Worker/obj
/aleikin_artem_lab_4/ThirdTutorial/EmitLog/bin/Debug/net8.0
/aleikin_artem_lab_4/ThirdTutorial/EmitLog/obj
/aleikin_artem_lab_4/ThirdTutorial/ReceiveLogs/bin/Debug/net8.0
/aleikin_artem_lab_4/ThirdTutorial/ReceiveLogs/obj
/aleikin_artem_lab_4/RVIPLab4.sln

View File

@ -0,0 +1,16 @@
# Лабораторная работа 4
## Описание
Данная лабораторная работа предназначена для изучения проектирования приложений при помощи брокера сообщений.
### Уроки из RabbitMQ Tutorials
1. ![img.png](images/img1.png)
2. ![img.png](images/img2.png)
3. ![img.png](images/img3.png)
### Задание
Ссылка на демонстрацию работы программы: https://vk.com/video215756667_456239454?list=ln-IJETwWy23zLuysjetJ
## Выводы
1. Запуск 1 и 2 Consumer'а: Consumer-2 (без задержки) график Queued Messages держится на нуле, в то время как у Consumer-1 график возрастает (скорость обработки сообщений < 1 с).
2. Запуск 2 первых Consumer'ов: обрабатывают сообщения последовательно и накапливают очередь.

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
<option name="theme" value="material" />
<option name="button1Title" value="" />
<option name="button1Url" value="" />
<option name="button2Title" value="" />
<option name="button2Url" value="" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.ulstu</groupId>
<artifactId>lesson1</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>5.22.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,29 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
public class Recv {
private final static String QUEUE_NAME = "hello";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setPort(5672);
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String message = new String(delivery.getBody(), "UTF-8");
System.out.println(" [x] Received '" + message + "'");
};
channel.basicConsume(QUEUE_NAME, true, deliverCallback, consumerTag -> {
});
}
}

View File

@ -0,0 +1,24 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
public class Send {
private final static String QUEUE_NAME = "hello";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setPort(5672);
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
String message = "Hello World!";
channel.basicPublish("", QUEUE_NAME, null, message.getBytes());
System.out.println(" [x] Sent '" + message + "'");
}
}
}

View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
<option name="theme" value="material" />
<option name="button1Title" value="" />
<option name="button1Url" value="" />
<option name="button2Title" value="" />
<option name="button2Url" value="" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.ulstu</groupId>
<artifactId>lesson2</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>5.22.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,29 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.MessageProperties;
public class NewTask {
private static final String TASK_QUEUE_NAME = "task_queue";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setPort(5672);
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
channel.queueDeclare(TASK_QUEUE_NAME, true, false, false, null);
String message = String.join(" ", argv);
channel.basicPublish("", TASK_QUEUE_NAME,
MessageProperties.PERSISTENT_TEXT_PLAIN,
message.getBytes("UTF-8"));
System.out.println(" [x] Sent '" + message + "'");
}
}
}

View File

@ -0,0 +1,48 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
public class Worker {
private static final String TASK_QUEUE_NAME = "task_queue";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setPort(5672);
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(TASK_QUEUE_NAME, true, false, false, null);
System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
int prefetchCount = 1;
channel.basicQos(prefetchCount);
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String message = new String(delivery.getBody(), "UTF-8");
System.out.println(" [x] Received '" + message + "'");
try {
doWork(message);
} catch (InterruptedException e) {
throw new RuntimeException(e);
} finally {
System.out.println(" [x] Done");
channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
}
};
boolean autoAck = false;
channel.basicConsume(TASK_QUEUE_NAME, autoAck, deliverCallback, consumerTag -> {
});
}
private static void doWork(String task) throws InterruptedException {
for (char ch : task.toCharArray()) {
if (ch == '.') Thread.sleep(1000);
}
}
}

View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
<option name="theme" value="material" />
<option name="button1Title" value="" />
<option name="button1Url" value="" />
<option name="button2Title" value="" />
<option name="button2Url" value="" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.ulstu</groupId>
<artifactId>lesson3</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>5.22.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,25 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
public class EmitLog {
private static final String EXCHANGE_NAME = "logs";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setPort(5672);
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
channel.exchangeDeclare(EXCHANGE_NAME, "fanout");
String message = argv.length < 1 ? "info: Hello World!" : String.join(" ", argv);
channel.basicPublish(EXCHANGE_NAME, "", null, message.getBytes("UTF-8"));
System.out.println(" [x] Sent '" + message + "'");
}
}
}

View File

@ -0,0 +1,33 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
public class ReceiveLogs {
private static final String EXCHANGE_NAME = "logs";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setPort(5672);
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.exchangeDeclare(EXCHANGE_NAME, "fanout");
String queueName = channel.queueDeclare().getQueue();
channel.queueBind(queueName, EXCHANGE_NAME, "");
System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String message = new String(delivery.getBody(), "UTF-8");
System.out.println(" [x] Received '" + message + "'");
};
channel.basicConsume(queueName, true, deliverCallback, consumerTag -> {
});
}
}

38
afanasev_dmitry_lab_4/task/.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
<option name="theme" value="material" />
<option name="button1Title" value="" />
<option name="button1Url" value="" />
<option name="button2Title" value="" />
<option name="button2Url" value="" />
</component>
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ru.ulstu</groupId>
<artifactId>task</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
<version>5.22.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,38 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
public class OrderConsumer1 {
private static final String EXCHANGE_NAME = "orders";
private static final String QUEUE_NAME = "consumer1_queue";
public static void main(String[] args) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.exchangeDeclare(EXCHANGE_NAME, "fanout");
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
channel.queueBind(QUEUE_NAME, EXCHANGE_NAME, "");
System.out.println(" [*] Consumer 1 ожидает сообщений.");
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String message = new String(delivery.getBody(), "UTF-8");
channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
System.out.println(" [x] Consumer 1 получил сообщение, обработает через 3 с.: " + message);
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
};
channel.basicConsume(QUEUE_NAME, false, deliverCallback, consumerTag -> {
});
}
}

View File

@ -0,0 +1,34 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.DeliverCallback;
public class OrderConsumer2 {
private static final String EXCHANGE_NAME = "orders";
private static final String QUEUE_NAME = "consumer2_queue";
public static void main(String[] args) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
// Создаём exchange и очередь
channel.exchangeDeclare(EXCHANGE_NAME, "fanout");
channel.queueDeclare(QUEUE_NAME, false, false, false, null);
channel.queueBind(QUEUE_NAME, EXCHANGE_NAME, "");
System.out.println(" [*] Consumer 2 ожидает сообщений.");
DeliverCallback deliverCallback = (consumerTag, delivery) -> {
String message = new String(delivery.getBody(), "UTF-8");
channel.basicAck(delivery.getEnvelope().getDeliveryTag(), false);
System.out.println(" [x] Consumer 2 моментально обработал сообщение: " + message);
};
channel.basicConsume(QUEUE_NAME, false, deliverCallback, consumerTag -> {
});
}
}

View File

@ -0,0 +1,26 @@
package ru.ulstu;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
public class OrderPublisher {
private static final String EXCHANGE_NAME = "orders";
public static void main(String[] args) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
channel.exchangeDeclare(EXCHANGE_NAME, "fanout");
while (true) {
String message = "Новый заказ #" + System.currentTimeMillis();
channel.basicPublish(EXCHANGE_NAME, "", null, message.getBytes("UTF-8"));
System.out.println(" [x] Отправлено сообщение: " + message);
Thread.sleep(1000);
}
}
}
}

View File

@ -0,0 +1,31 @@
# Лабораторная работа 5
## Описание
Задание заключается в реализации алгоритмов умножения больших квадратных матриц. Необходимо разработать два алгоритма: последовательный и параллельный. А также провести бенчмарки, а затем описать результаты в отчете.
**100x100 матрица**:
- **4 потока** — наилучший результат.
- **10 потоков** — медленнее на почти в половину.
- **6 и 8 потоков** — хуже 4 потоков.
- **1 и 2 потока** — значительно медленнее.
**300x300 матрица**:
- **4 потока** — лучший результат.
- **8 потоков** — чуть хуже.
- **10 потоков** — медленнее.
- **1 и 2 потока** — значительно медленнее.
**500x500 матрица**:
- **8 потоков** — лучший результат.
- **6 и 10 потоков** — немного хуже.
- **4 потока** — значительно медленнее.
- **1 поток** — самый медленный.
**Ссылка на демонстрацию работы программы**: https://vk.com/video215756667_456239455?list=ln-z7zFcpvxLexJd3f8ss
**Вывод**:
- Если операция сложнее, рост производительности происходит с увеличением числа потоков.
- Слишком много потоков увеличивает накладные расходы (например, 10 потоков). Это может быть связано, например, с:
1. **Переключением контекстов**: Когда потоков больше, чем ядер процессора, операционная система часто переключает контексты, что занимает время.
2. **Конкуренцией за ресурсы**: Много потоков конкурируют за ограниченные ресурсы, такие как процессорное время и кэш.
3. **Управлением потоками**: С увеличением числа потоков растёт нагрузка на систему, связанную с их созданием, управлением и завершением.

29
afanasev_dmitry_lab_5/main/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

View File

@ -0,0 +1,120 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
public class MatrixMultiplier {
private final int[][] matrixA;
private final int[][] matrixB;
private final int[][] result;
private final int size;
public MatrixMultiplier(int size) {
this.size = size;
this.matrixA = generateMatrix(size);
this.matrixB = generateMatrix(size);
this.result = new int[size][size];
}
private int[][] generateMatrix(int size) {
int[][] matrix = new int[size][size];
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
matrix[i][j] = (int) (Math.random() * 10);
}
}
return matrix;
}
public void multiplySequential() {
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
for (int k = 0; k < size; k++) {
result[i][j] += matrixA[i][k] * matrixB[k][j];
}
}
}
}
public void multiplyParallel(int numThreads) throws InterruptedException {
if (numThreads == 1) {
multiplySequential();
return;
}
ExecutorService executor = Executors.newFixedThreadPool(numThreads);
int chunkSize = (int) Math.ceil((double) size / numThreads);
for (int thread = 0; thread < numThreads; thread++) {
final int startRow = thread * chunkSize;
final int endRow = Math.min(startRow + chunkSize, size);
executor.submit(() -> {
for (int i = startRow; i < endRow; i++) {
for (int j = 0; j < size; j++) {
for (int k = 0; k < size; k++) {
result[i][j] += matrixA[i][k] * matrixB[k][j];
}
}
}
});
}
executor.shutdown();
executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
}
private void resetResult() {
for (int i = 0; i < size; i++) {
Arrays.fill(result[i], 0);
}
}
static class Result {
int threads;
long time;
Result(int threads, long time) {
this.threads = threads;
this.time = time;
}
}
public static void main(String[] args) throws InterruptedException {
int[] matrixSizes = {100, 300, 500};
int[] threadCounts = {1, 2, 4, 6, 8, 10};
int runs = 5; // количество прогонов
for (int size : matrixSizes) {
System.out.println("\nРазмер матрицы: " + size + "x" + size);
MatrixMultiplier multiplier = new MatrixMultiplier(size);
List<Result> results = new ArrayList<>();
for (int threads : threadCounts) {
long totalDuration = 0;
for (int run = 0; run < runs; run++) {
multiplier.resetResult();
long startTime = System.nanoTime();
multiplier.multiplyParallel(threads);
long endTime = System.nanoTime();
totalDuration += (endTime - startTime);
}
long averageDuration = totalDuration / runs;
results.add(new Result(threads, averageDuration));
}
// Сортировка по времени выполнения
results.sort(Comparator.comparingLong(r -> r.time));
System.out.println("Результаты (среднее время за " + runs + " прогонов):");
for (Result result : results) {
System.out.printf("Потоки: %d, среднее время: %d нс\n", result.threads, result.time);
}
}
}
}

View File

@ -0,0 +1,118 @@
import java.math.BigDecimal;
import java.math.MathContext;
import java.math.RoundingMode;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class FastDeterminantCalculator {
public static void main(String[] args) {
int[] sizes = {100, 300, 500};
int[] threads = {1, 4, 8, 10};
for (int size : sizes) {
BigDecimal[][] matrix = generateMatrix(size);
for (int threadCount : threads) {
long start = System.currentTimeMillis();
BigDecimal determinant = calculateDeterminant(matrix, threadCount);
long end = System.currentTimeMillis();
System.out.printf("Matrix size: %dx%d, Threads: %d, Time: %d ms\n",
size, size, threadCount, (end - start));
}
}
}
public static BigDecimal[][] generateMatrix(int size) {
BigDecimal[][] matrix = new BigDecimal[size][size];
for (int i = 0; i < size; i++) {
BigDecimal rowSum = BigDecimal.ZERO;
for (int j = 0; j < size; j++) {
matrix[i][j] = BigDecimal.valueOf(Math.random() * 10);
if (i != j) {
rowSum = rowSum.add(matrix[i][j]);
}
}
matrix[i][i] = rowSum.add(BigDecimal.valueOf(Math.random() * 10 + 1));
}
return matrix;
}
public static BigDecimal calculateDeterminant(BigDecimal[][] matrix, int threadCount) {
int size = matrix.length;
BigDecimal[][] lu = new BigDecimal[size][size];
int[] permutations = new int[size];
ExecutorService executor = Executors.newFixedThreadPool(threadCount);
if (!luDecomposition(matrix, lu, permutations, executor)) {
executor.shutdown();
return BigDecimal.ZERO; // Матрица вырожденная
}
executor.shutdown();
BigDecimal determinant = BigDecimal.ONE;
for (int i = 0; i < size; i++) {
determinant = determinant.multiply(lu[i][i]);
if (permutations[i] != i) {
determinant = determinant.negate(); // Меняем знак при перестановке
}
}
return determinant;
}
public static boolean luDecomposition(BigDecimal[][] matrix, BigDecimal[][] lu, int[] permutations, ExecutorService executor) {
int size = matrix.length;
for (int i = 0; i < size; i++) {
System.arraycopy(matrix[i], 0, lu[i], 0, size);
permutations[i] = i;
}
for (int k = 0; k < size; k++) {
int pivot = k;
for (int i = k + 1; i < size; i++) {
if (lu[i][k].abs().compareTo(lu[pivot][k].abs()) > 0) {
pivot = i;
}
}
if (lu[pivot][k].abs().compareTo(BigDecimal.valueOf(1e-10)) < 0) {
return false;
}
if (pivot != k) {
BigDecimal[] temp = lu[k];
lu[k] = lu[pivot];
lu[pivot] = temp;
int tempPerm = permutations[k];
permutations[k] = permutations[pivot];
permutations[pivot] = tempPerm;
}
CountDownLatch latch = new CountDownLatch(size - k - 1);
for (int i = k + 1; i < size; i++) {
int row = i;
int finalK = k;
executor.submit(() -> {
MathContext mc = new MathContext(20, RoundingMode.HALF_UP);
lu[row][finalK] = lu[row][finalK].divide(lu[finalK][finalK], mc);
for (int j = finalK + 1; j < size; j++) {
lu[row][j] = lu[row][j].subtract(lu[row][finalK].multiply(lu[finalK][j], mc));
}
latch.countDown();
});
}
try {
latch.await();
} catch (InterruptedException e) {
e.printStackTrace();
return false;
}
}
return true;
}
}

View File

@ -0,0 +1,31 @@
# Лабораторная работа 6
## Описание
Задание заключается в реализации алгоритмов нахождения детерминанта квадратной матрицы. Необходимо разработать два алгоритма: последовательный и параллельный. А также провести бенчмарки, а затем описать результаты в отчете.
**100x100 матрица**:
- **8 потоков** — наилучший результат.
- **10 потоков** — результат немного хуже.
- **4 потока** — примерно такой же результат как на 10 потоках.
- **1 поток** — наихудший результат.
**300x300 матрица**:
- **10 потока** — лучший результат.
- **8 потоков** — чуть хуже.
- **4 потока** — ещё медленее.
- **1 поток** — наихудший результат.
**500x500 матрица**:
- **10 потока** — лучший результат.
- **8 потоков** — чуть хуже.
- **4 потока** — ещё медленее.
- **1 поток** — наихудший результат.
**Ссылка на демонстрацию работы программы**: https://vkvideo.ru/video215756667_456239456?list=ln-W6TTsYuIRdX8ft7ADr
**Вывод**:
- Если операция сложнее, рост производительности происходит с увеличением числа потоков.
- Слишком много потоков увеличивает накладные расходы (замтено только на неочень сложных операциях). Это может быть связано, например, с:
1. **Переключением контекстов**: Когда потоков больше, чем ядер процессора, операционная система часто переключает контексты, что занимает время.
2. **Конкуренцией за ресурсы**: Много потоков конкурируют за ограниченные ресурсы, такие как процессорное время и кэш.
3. **Управлением потоками**: С увеличением числа потоков растёт нагрузка на систему, связанную с их созданием, управлением и завершением.

View File

@ -0,0 +1,13 @@
Балансировка нагрузки — это способ распределения запросов между серверами для предотвращения их перегрузки и обеспечения быстродействия системы.
Для этого используются алгоритмы, такие как Round Robin, Least Connections, IP Hash.
Среди популярных открытых технологий — Nginx, HAProxy и Traefik. Nginx часто работает как реверс-прокси,
распределяя запросы и обрабатывая SSL. HAProxy подходит для высоконагруженных систем, а Traefik автоматически
настраивает маршрутизацию в облачных кластерах.
В базах данных балансировка нагрузки позволяет направлять запросы на чтение к репликам, а на запись — к основному узлу.
Инструменты, такие как ProxySQL, помогают автоматизировать этот процесс.
Реверс-прокси не только распределяет нагрузку, но и повышает безопасность системы, скрывая её внутреннюю архитектуру.
Таким образом, открытые технологии играют ключевую роль в создании масштабируемых и надёжных систем.

View File

@ -0,0 +1,15 @@
Распределённые системы являются основой современных сервисов, включая социальные сети. Их устройство предполагает разделение задач на микросервисы,
где каждый компонент выполняет узкоспециализированную функцию. Это упрощает разработку, позволяет масштабировать только необходимые части системы и
делает её более устойчивой к сбоям.
Для управления такими системами используются инструменты оркестрации, например, Kubernetes и Docker Swarm. Они автоматизируют развёртывание,
масштабирование и обновление сервисов, упрощая сопровождение. Однако их использование требует опыта и может осложнить отладку.
Очереди сообщений, такие как RabbitMQ или Kafka, помогают асинхронно передавать данные между сервисами. Это снижает нагрузку и обеспечивает надёжное взаимодействие,
передавая запросы, уведомления или данные для обработки.
Распределённые системы обладают преимуществами в виде масштабируемости, устойчивости и гибкости разработки.
Однако их сложность может стать серьёзным вызовом при проектировании и сопровождении.
Параллельные вычисления полезны, например, для обработки больших объёмов данных или машинного обучения,
но в некоторых случаях последовательная обработка более предпочтительна. Такой подход требует анализа задач, чтобы избежать излишней сложности.

View File

@ -0,0 +1,69 @@
services:
wp_db:
image: mariadb:10.6.4-focal
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- wp_db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=somewordpress
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
expose:
- 3306
- 33060
wordpress:
image: wordpress:latest
volumes:
- wp_data:/var/www/html
ports:
- 52384:80
restart: always
environment:
- WORDPRESS_DB_HOST=wp_db
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- WORDPRESS_DB_NAME=wordpress
db:
image: postgres:latest
container_name: db
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 1234
POSTGRES_DB: postgres
volumes:
- db_data:/var/lib/postgresql
redmine:
image: redmine:latest
container_name: redmine
ports:
- "11001:3000"
environment:
- REDMINE_DB_POSTGRESQL=db
- REDMINE_DB_DATABASE=redmine
- REDMINE_DB_USERNAME=posgres
- REDMINE_DB_PASSWORD=1234
depends_on:
- db
gitea:
image: gitea/gitea:latest
container_name: gitea
ports:
- "11002:3000"
environment:
- USER_UID=1000
- USER_GID=1000
volumes:
- gitea_data:/data
volumes:
wp_db_data:
wp_data:
db_data:
redmine_db_data:
gitea_data:

View File

@ -0,0 +1,126 @@
▎Лабораторная работа №1 - Знакомство с Docker и Docker Compose
Цель: Изучение современных технологий контейнеризации.
▎Задачи:
1. Установить Docker.
2. Изучить применение и принципы работы Docker.
3. Изучить утилиту Docker Compose и структуру файла docker-compose.yml.
4. Развернуть не менее трех различных сервисов с помощью Docker Compose.
▎Разворачивание сервисов
Необходимо развернуть минимум три сервиса из предложенного списка:
1. Redmine - система учета багов (баг-трекер).
2. WordPress - популярная система управления контентом.
3. Gitea - сервис для хранения git-репозиториев.
▎Требования к Docker Compose:
• Несколько контейнеров.
• Хотя бы один volume.
• Хотя бы один проброшенный порт на хост.
Система должна быть развернута полностью, включая создание администратора и корректное функционирование, что будет подтверждено скриншотами.
▎Ход работы
1. Установил Docker Desktop на Windows.
2. Проверил установку с помощью команды docker --version.
3. Развернул сервисы (описаны ниже).
▎Объяснение работы кода:
▎WordPress:
1. Образ сборки:
image: wordpress:latest - используется последний официальный образ WordPress.
2. Имя контейнера:
container_name: wordpress - имя контейнера устанавливается как wordpress.
3. Проброс портов:
Порт 80 контейнера пробрасывается на порт 8080 хоста.
4. Тома для хранения данных:
volumes:
- wordpress_data:/var/www/html
Том wordpress_data монтируется в директорию /var/www/html контейнера для хранения данных WordPress.
5. Переменные окружения для WordPress:
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: example_user
WORDPRESS_DB_PASSWORD: example_password
WORDPRESS_DB_NAME: example_db
Параметры для подключения к базе данных.
6. Зависимость от базы данных:
depends_on: db - указывает, что WordPress зависит от контейнера базы данных (db).
▎Redmine:
1. Образ сборки:
image: redmine:latest - используется последний официальный образ Redmine.
2. Имя контейнера:
container_name: redmine - имя контейнера устанавливается как redmine.
3. Проброс портов:
ports:"8081:3000" - порт 3000 контейнера пробрасывается на порт 8081 хоста.
4. Переменные окружения для Redmine:
environment:
REDMINE_DB_MYSQL: redmine_db
REDMINE_DB_USERNAME: redmine_user
REDMINE_DB_PASSWORD: redmine_password
Параметры для подключения к базе данных.
5. Зависимость от базы данных:
depends_on: - redmine_db - Redmine зависит от контейнера с базой данных.
▎Gitea:
1. Образ сборки:
image: gitea/gitea:latest - используется последний официальный образ Gitea.
2. Имя контейнера:
container_name: gitea - имя контейнера устанавливается как gitea.
3. Проброс портов:
ports:"8082:3000" - порт 3000 контейнера пробрасывается на порт 8082 хоста.
4. Тома для хранения данных:
volumes:
- gitea_data:/data
[Видео](https://disk.yandex.ru/d/JFWkukJKwbfhIw)

View File

@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
!**/.gitignore
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>.</DockerfileContext>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugProfile>Container (Dockerfile)</ActiveDebugProfile>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,28 @@
# См. статью по ссылке https://aka.ms/customizecontainer, чтобы узнать как настроить контейнер отладки и как Visual Studio использует этот Dockerfile для создания образов для ускорения отладки.
# Этот этап используется при запуске из VS в быстром режиме (по умолчанию для конфигурации отладки)
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
USER app
WORKDIR /app
# Этот этап используется для сборки проекта службы
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Consumer1.csproj", "."]
RUN dotnet restore "./Consumer1.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "./Consumer1.csproj" -c $BUILD_CONFIGURATION -o /app/build
# Этот этап используется для публикации проекта службы, который будет скопирован на последний этап
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./Consumer1.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
# Этот этап используется в рабочей среде или при запуске из VS в обычном режиме (по умолчанию, когда конфигурация отладки не используется)
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Consumer1.dll"]

View File

@ -0,0 +1,39 @@
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System.Text;
var factory = new ConnectionFactory
{
HostName = "rabbitmq",
UserName = "admin",
Password = "admin"
};
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
var queueName = "slow_queue";
var exchangeName = "logs_exchange";
await channel.QueueDeclareAsync(queue: queueName, durable: true, exclusive: false, autoDelete: false, arguments: null);
await channel.QueueBindAsync(queue: queueName, exchange: exchangeName, routingKey: "");
Console.WriteLine("[Consumer1] Waiting for messages...");
while (true)
{
var consumer = new AsyncEventingBasicConsumer(channel);
consumer.ReceivedAsync += (model, ea) =>
{
var body = ea.Body.ToArray();
var message = Encoding.UTF8.GetString(body);
Console.WriteLine($"[Consumer1] Received: {message}");
Thread.Sleep(new Random().Next(2000, 3000));
Console.WriteLine("[Consumer1] Done processing");
channel.BasicAckAsync(deliveryTag: ea.DeliveryTag, multiple: false);
return Task.CompletedTask;
};
await channel.BasicConsumeAsync(queue: queueName, autoAck: false, consumer: consumer);
}

View File

@ -0,0 +1,10 @@
{
"profiles": {
"Consumer1": {
"commandName": "Project"
},
"Container (Dockerfile)": {
"commandName": "Docker"
}
}
}

View File

@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
!**/.gitignore
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>.</DockerfileContext>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugProfile>Container (Dockerfile)</ActiveDebugProfile>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,28 @@
# См. статью по ссылке https://aka.ms/customizecontainer, чтобы узнать как настроить контейнер отладки и как Visual Studio использует этот Dockerfile для создания образов для ускорения отладки.
# Этот этап используется при запуске из VS в быстром режиме (по умолчанию для конфигурации отладки)
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
USER app
WORKDIR /app
# Этот этап используется для сборки проекта службы
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Consumer2.csproj", "."]
RUN dotnet restore "./Consumer2.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "./Consumer2.csproj" -c $BUILD_CONFIGURATION -o /app/build
# Этот этап используется для публикации проекта службы, который будет скопирован на последний этап
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./Consumer2.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
# Этот этап используется в рабочей среде или при запуске из VS в обычном режиме (по умолчанию, когда конфигурация отладки не используется)
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Consumer2.dll"]

View File

@ -0,0 +1,40 @@
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System.Data.Common;
using System.Text;
using System.Threading.Channels;
var factory = new ConnectionFactory
{
HostName = "rabbitmq",
UserName = "admin",
Password = "admin"
};
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
var queueName = "fast_queue";
var exchangeName = "logs_exchange";
await channel.QueueDeclareAsync(queue: queueName, durable: true, exclusive: false, autoDelete: false, arguments: null);
await channel.QueueBindAsync(queue: queueName, exchange: exchangeName, routingKey: "");
Console.WriteLine("[Consumer2] Waiting for messages...");
while (true)
{
var consumer = new AsyncEventingBasicConsumer(channel);
consumer.ReceivedAsync += (model, ea) =>
{
var body = ea.Body.ToArray();
var message = Encoding.UTF8.GetString(body);
Console.WriteLine($"[Consumer2] Received: {message}");
Console.WriteLine("[Consumer2] Done processing");
channel.BasicAckAsync(deliveryTag: ea.DeliveryTag, multiple: false);
return Task.CompletedTask;
};
await channel.BasicConsumeAsync(queue: queueName, autoAck: false, consumer: consumer);
}

View File

@ -0,0 +1,10 @@
{
"profiles": {
"Consumer2": {
"commandName": "Project"
},
"Container (Dockerfile)": {
"commandName": "Docker"
}
}
}

View File

@ -0,0 +1,26 @@
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System.Text;
var factory = new ConnectionFactory { HostName = "localhost" };
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
await channel.QueueDeclareAsync(queue: "hello", durable: false,
exclusive: false, autoDelete: false,arguments: null);
Console.WriteLine("[*] Waiting for messages...");
var consumer = new AsyncEventingBasicConsumer(channel);
consumer.ReceivedAsync += (model, ea) =>
{
var body = ea.Body.ToArray();
var message = Encoding.UTF8.GetString(body);
Console.WriteLine($" [*] Received {message}");
return Task.CompletedTask;
};
await channel.BasicConsumeAsync("hello", autoAck: true, consumer: consumer);
Console.WriteLine(" Press [enter] to exit.");
Console.ReadLine();

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,18 @@
using RabbitMQ.Client;
using System.Text;
var factory = new ConnectionFactory { HostName = "localhost" };
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
await channel.QueueDeclareAsync(queue: "hello", durable: false,
exclusive: false, autoDelete: false, arguments: null);
const string message = "Hello, World! ~from Artem";
var body = Encoding.UTF8.GetBytes(message);
await channel.BasicPublishAsync(exchange: string.Empty, routingKey: "hello", body: body);
Console.WriteLine($" [x] Sent {message}");
Console.WriteLine(" Press [enter] to exit.");
Console.ReadLine();

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
!**/.gitignore
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**

View File

@ -0,0 +1,28 @@
# См. статью по ссылке https://aka.ms/customizecontainer, чтобы узнать как настроить контейнер отладки и как Visual Studio использует этот Dockerfile для создания образов для ускорения отладки.
# Этот этап используется при запуске из VS в быстром режиме (по умолчанию для конфигурации отладки)
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
USER app
WORKDIR /app
# Этот этап используется для сборки проекта службы
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Publisher.csproj", "."]
RUN dotnet restore "./Publisher.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "./Publisher.csproj" -c $BUILD_CONFIGURATION -o /app/build
# Этот этап используется для публикации проекта службы, который будет скопирован на последний этап
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "./Publisher.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
# Этот этап используется в рабочей среде или при запуске из VS в обычном режиме (по умолчанию, когда конфигурация отладки не используется)
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Publisher.dll"]

View File

@ -0,0 +1,10 @@
{
"profiles": {
"Publisher": {
"commandName": "Project"
},
"Container (Dockerfile)": {
"commandName": "Docker"
}
}
}

View File

@ -0,0 +1,31 @@
using RabbitMQ.Client;
using System.Text;
var factory = new ConnectionFactory
{
HostName = "rabbitmq",
UserName = "admin",
Password = "admin"
};
using var connection = await factory.CreateConnectionAsync();
Console.WriteLine("Connection established.");
using var channel = await connection.CreateChannelAsync();
Console.WriteLine("Channel created.");
await channel.ExchangeDeclareAsync(exchange: "logs_exchange", type: ExchangeType.Fanout);
while (true)
{
var message = $"Event: {GenerateRandomEvent()}";
var body = Encoding.UTF8.GetBytes(message);
await channel.BasicPublishAsync(exchange: "logs_exchange", routingKey: string.Empty, body: body);
Console.WriteLine($"[Publisher] Sent: {message}");
await Task.Delay(1000);
}
static string GenerateRandomEvent()
{
var events = new[] { "Order Received", "User Message", "Create Report" };
return events[new Random().Next(events.Length)] + " #" + new Random().Next(0, 99);
}

View File

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>.</DockerfileContext>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugProfile>Container (Dockerfile)</ActiveDebugProfile>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,26 @@
using RabbitMQ.Client;
using System.Text;
var factory = new ConnectionFactory { HostName = "localhost" };
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
await channel.QueueDeclareAsync(queue: "task_queue", durable: true, exclusive: false,
autoDelete: false, arguments: null);
var message = GetMessage(args);
var body = Encoding.UTF8.GetBytes(message);
var properties = new BasicProperties
{
Persistent = true
};
await channel.BasicPublishAsync(exchange: string.Empty, routingKey: "task_queue", mandatory: true,
basicProperties: properties, body: body);
Console.WriteLine($" [x] Sent {message}");
static string GetMessage(string[] args)
{
return ((args.Length > 0) ? string.Join(" ", args) : "Hello World!");
}

View File

@ -0,0 +1,35 @@
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System.Text;
var factory = new ConnectionFactory { HostName = "localhost" };
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
await channel.QueueDeclareAsync(queue: "task_queue", durable: true, exclusive: false,
autoDelete: false, arguments: null);
await channel.BasicQosAsync(prefetchSize: 0, prefetchCount: 1, global: false);
Console.WriteLine(" [*] Waiting for messages.");
var consumer = new AsyncEventingBasicConsumer(channel);
consumer.ReceivedAsync += async (model, ea) =>
{
byte[] body = ea.Body.ToArray();
var message = Encoding.UTF8.GetString(body);
Console.WriteLine($" [x] Received {message}");
int dots = message.Split('.').Length - 1;
await Task.Delay(dots * 1000);
Console.WriteLine(" [x] Done");
// here channel could also be accessed as ((AsyncEventingBasicConsumer)sender).Channel
await channel.BasicAckAsync(deliveryTag: ea.DeliveryTag, multiple: false);
};
await channel.BasicConsumeAsync("task_queue", autoAck: false, consumer: consumer);
Console.WriteLine(" Press [enter] to exit.");
Console.ReadLine();

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,21 @@
using RabbitMQ.Client;
using System.Text;
var factory = new ConnectionFactory { HostName = "localhost" };
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
await channel.ExchangeDeclareAsync(exchange: "logs", type: ExchangeType.Fanout);
var message = GetMessage(args);
var body = Encoding.UTF8.GetBytes(message);
await channel.BasicPublishAsync(exchange: "logs", routingKey: string.Empty, body: body);
Console.WriteLine($" [x] Sent {message}");
Console.WriteLine(" Press [enter] to exit.");
Console.ReadLine();
static string GetMessage(string[] args)
{
return ((args.Length > 0) ? string.Join(" ", args) : "info: Hello World!");
}

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,31 @@
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System.Text;
var factory = new ConnectionFactory { HostName = "localhost" };
using var connection = await factory.CreateConnectionAsync();
using var channel = await connection.CreateChannelAsync();
await channel.ExchangeDeclareAsync(exchange: "logs",
type: ExchangeType.Fanout);
// declare a server-named queue
QueueDeclareOk queueDeclareResult = await channel.QueueDeclareAsync();
string queueName = queueDeclareResult.QueueName;
await channel.QueueBindAsync(queue: queueName, exchange: "logs", routingKey: string.Empty);
Console.WriteLine(" [*] Waiting for logs.");
var consumer = new AsyncEventingBasicConsumer(channel);
consumer.ReceivedAsync += (model, ea) =>
{
byte[] body = ea.Body.ToArray();
var message = Encoding.UTF8.GetString(body);
Console.WriteLine($" [x] {message}");
return Task.CompletedTask;
};
await channel.BasicConsumeAsync(queueName, autoAck: true, consumer: consumer);
Console.WriteLine(" Press [enter] to exit.");
Console.ReadLine();

View File

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RabbitMQ.Client" Version="7.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,61 @@
services:
rabbitmq:
image: rabbitmq:management
container_name: rabbitmq
restart: always
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin
networks:
- my_network
publisher:
build:
context: ./Publisher
restart: always
depends_on:
- rabbitmq
environment:
RABBITMQ_HOST: rabbitmq
RABBIT_USERNAME: admin
RABBIT_PASSWORD: admin
RABBIT_EXCHANGE: 'logs_exchange'
networks:
- my_network
consumer1:
build:
context: ./Consumer1
restart: always
depends_on:
- rabbitmq
environment:
RABBITMQ_HOST: rabbitmq
RABBIT_USERNAME: admin
RABBIT_PASSWORD: admin
RABBIT_EXCHANGE: 'logs_exchange'
RABBIT_QUEUE: 'slow_queue'
networks:
- my_network
consumer2:
build:
context: ./Consumer2
restart: always
depends_on:
- rabbitmq
environment:
RABBITMQ_HOST: rabbitmq
RABBIT_USERNAME: admin
RABBIT_PASSWORD: admin
RABBIT_EXCHANGE: 'logs_exchange'
RABBIT_QUEUE: 'fast_queue'
networks:
- my_network
networks:
my_network:
driver: bridge

View File

@ -0,0 +1,37 @@
# Лабораторная работа 4 - Работа с брокером сообщений
## ПИбд-42 || Алейкин Артем
### Описание
В данной лабораторной работе мы познакомились с такой утилитой как RabbitMQ.
### Туториалы
1. HelloWorld - Tutorial
![Консольный вывод - первый туториал](./Images/Туториал_1.png)
2. Work Queues - Tutorial
![Консольный вывод - второй туториал](./Images/Туториал_2.png)
3. Publish/Subscribe - Tutorial
![Консольный вывод - третий туториал](./Images/Туториал_3.png)
### Основное задание
Было разработано 3 приложения: Publisher, Consumer1 и Consumer2.
Первое отвечало за доставку сообщений в очереди. Оно генерирует одно сообщение раз в секунду.
Второе и Третье за обработку этих сообщений из очередей, но Consumer1 имел искусственную задержку в 2-3 секунды, в то время как Consumer2 таких ограничений не имел и работу.
### Шаги для запуска:
1. Запуск контейнеров:
```
docker-compose up -d
```
В результате мы можем посмотреть графики по этой ссылке http://localhost:15672/
![График Consumer1 - медленный](./Images/Лаба_Отчет2.png)
![График Consumer2 - быстрый](./Images/Лаба_Отчет1.png)
После этого было добавлено еще 3 клиента типа Consumer1 и только после этого их суммарной производительности стало хватать для обработки сообщений.
![График Consumer1 для нескольких клиентов - медленный](./Images/Лаба_Отчет3.png)
![График Consumer2 - быстрый](./Images/Лаба_Отчет4.png)
Видео демонстрации работы: https://vk.com/video248424990_456239611?list=ln-v0VkWDOiRBxdctENzV

10
alkin_ivan_lab_2/.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
# .gitignore
__pycache__/
*.pyc
*.pyo
*.pyd
*.db
*.log
*.bak
*.swp
*.swo

View File

@ -0,0 +1,89 @@
Для выполнения второй лабораторной работы по созданию распределённого приложения с использованием Docker и Docker Compose, давайте разберем все этапы, шаг за шагом. Я предлагаю реализовать вариант программы 1 и программу 2 следующим образом:
### 1. Вариант программы 1
Программа будет искать в каталоге `/var/data` файл с наибольшим количеством строк и перекладывать его в `/var/result/data.txt`.
### 2. Вариант программы 2
Программа будет искать наименьшее число из файла `/var/data/data.txt` и сохранять его третью степень в файл `/var/result/result.txt`.
### Структура проекта
1. `moiseev-vv-lab_2/worker-1`: Программа для нахождения файла с наибольшим количеством строк.
2. `moiseev-vv-lab_2/worker-2`: Программа для нахождения минимального числа в файле и записи его третьей степени.
### Шаги реализации:
#### 1. Реализация программы 1
```python
#### 2. Реализация программы 2
```python
Для обоих приложений создадим Dockerfile. Вот пример для **worker-1**:
Пояснение:
- **Stage 1**: Мы используем `python:3.10-slim` как образ для сборки, где копируем файл `main.py` и устанавливаем зависимости, если это необходимо.
- **Stage 2**: В этом слое мы копируем скомпилированные файлы из предыдущего этапа и определяем команду для запуска приложения.
Аналогичный Dockerfile будет для **worker-2**.
### Docker Compose файл
Теперь нужно настроить файл `docker-compose.yml`, который позволит запустить оба приложения:
Пояснение:
- **services**: Мы объявляем два сервиса — `worker-1` и `worker-2`.
- **build**: Указываем контекст сборки для каждого сервиса (директории, где находятся Dockerfile и код).
- **volumes**: Монтируем локальные директории `./data` и `./result` в контейнеры, чтобы обмениваться файлами между сервисами.
- **depends_on**: Задаем зависимость `worker-2` от `worker-1`, чтобы второй сервис запускался только после первого.
### .gitignore
Для предотвращения попадания ненужных файлов в репозиторий, добавляем файл `.gitignore`. Пример для Python проектов:
```
# .gitignore
__pycache__/
*.pyc
*.pyo
*.pyd
*.db
*.log
*.bak
*.swp
*.swo
```
### Шаги для сборки и запуска
1. Склонировать репозиторий и перейти в директорию с лабораторной работой:
```bash
git clone <репозиторий>
cd moiseev-vv-lab_2
```
2. Скопировать файлы для `worker-1` и `worker-2` в соответствующие папки.
3. Создать файл `docker-compose.yml`.
4. Запустить приложение с помощью команды:
```bash
docker-compose up --build
```
5. Проверить вывод, результаты должны быть в директориях `./data` и `./result`.
### Заключение
Это пример, как можно реализовать простейшее распределённое приложение с использованием Docker. Первое приложение генерирует данные для второго, который обрабатывает их и записывает результат в файл. Docker и Docker Compose позволяют легко управлять и изолировать каждое приложение.ker Compose для запуска двух программ, обрабатывающих данные в контейнерах.
## Видео ВК
https://vkvideo.ru/video150882239_456240341

View File

@ -0,0 +1,7 @@
FROM python:3.9-slim
WORKDIR /app
COPY . /app
CMD ["python", "generate_data.py"]

View File

@ -0,0 +1,29 @@
import os
import random
def generate_random_files(directory, num_files, num_lines_per_file, min_value, max_value):
os.makedirs(directory, exist_ok=True)
for i in range(num_files):
file_path = os.path.join(directory, f"file_{i + 1}.txt")
with open(file_path, 'w') as f:
for _ in range(num_lines_per_file):
random_number = random.randint(min_value, max_value)
f.write(f"{random_number}\n")
print(f"Generated file: {file_path}")
def main():
data_directory = '/var/data'
num_files = 10
num_lines_per_file = 12
min_value = 1
max_value = 100
generate_random_files(data_directory, num_files, num_lines_per_file, min_value, max_value)
print(f"Generated {num_files} files in {data_directory}")
if __name__ == "__main__":
main()

View File

@ -0,0 +1,18 @@
# docker-compose.yml
services:
worker-1:
build:
context: ./worker-1
volumes:
- ./data:/var/data
- ./result:/var/result
depends_on:
- worker-2
worker-2:
build:
context: ./worker-2
volumes:
- ./data:/var/data
- ./result:/var/result

View File

@ -0,0 +1,14 @@
# worker-1/Dockerfile
# Stage 1: Build the application
FROM python:3.10-slim as builder
WORKDIR /app
COPY ./main.py .
# Stage 2: Set up the runtime environment
FROM python:3.10-slim
WORKDIR /app
COPY --from=builder /app/main.py .
CMD ["python", "main.py"]

View File

@ -0,0 +1,35 @@
# worker-1/main.py
import os
def find_file_with_most_lines(directory):
files = os.listdir(directory)
max_lines = 0
target_file = None
for filename in files:
filepath = os.path.join(directory, filename)
if os.path.isfile(filepath):
with open(filepath, 'r') as file:
lines = file.readlines()
if len(lines) > max_lines:
max_lines = len(lines)
target_file = filepath
return target_file
def main():
source_directory = '/var/data'
result_file = '/var/result/data.txt'
file_to_copy = find_file_with_most_lines(source_directory)
if file_to_copy:
with open(file_to_copy, 'r') as source, open(result_file, 'w') as dest:
dest.writelines(source.readlines())
print(f"File with the most lines: {file_to_copy} copied to {result_file}")
else:
print("No files found in the source directory.")
if __name__ == "__main__":
main()

View File

@ -0,0 +1,14 @@
# worker-1/Dockerfile
# Stage 1: Build the application
FROM python:3.10-slim as builder
WORKDIR /app
COPY ./main.py .
# Stage 2: Set up the runtime environment
FROM python:3.10-slim
WORKDIR /app
COPY --from=builder /app/main.py .
CMD ["python", "main.py"]

Some files were not shown because too many files have changed in this diff Show More