-
Notifications
You must be signed in to change notification settings - Fork 49
Чукарев Михаил Лаб. 1 Группа 6511 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Mishachuu
wants to merge
14
commits into
itsecd:main
Choose a base branch
from
Mishachuu:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+591
−107
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
71cf8d6
Создан класс по предметной области, написан генератор и сервис
Mishachuu 27946c8
Merge branch 'main' into main
Mishachuu 1f95905
clear trash
Mishachuu bd57423
Merge branch 'main' of https://github.com/Mishachuu/cloud-development
Mishachuu 96ebef3
studentcard
Mishachuu c963c58
add summary
Mishachuu 52acc9a
fix
Mishachuu 695e953
mega fix
Mishachuu 0615dd3
add readmy
Mishachuu 38fcfcc
super mega fix
Mishachuu d57dbaf
Update README.md
Mishachuu 32ad6e2
super mega last fix
Mishachuu 7b3c7ad
Merge branch 'main' of https://github.com/Mishachuu/cloud-development
Mishachuu 518cfec
fix
Mishachuu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,4 +38,4 @@ | |
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,5 +6,6 @@ | |
| } | ||
| }, | ||
| "AllowedHosts": "*", | ||
| "BaseAddress": "" | ||
| "BaseAddress": "https://localhost:5001/api/vehicles" | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,128 +1,85 @@ | ||
| # Современные технологии разработки программного обеспечения | ||
| [Таблица с успеваемостью](https://docs.google.com/spreadsheets/d/1an43o-iqlq4V_kDtkr_y7DC221hY9qdhGPrpII27sH8/edit?usp=sharing) | ||
|
|
||
| ## Задание | ||
| ### Цель | ||
| Реализация проекта микросервисного бекенда. | ||
|
|
||
| ### Задачи | ||
| * Реализация межсервисной коммуникации, | ||
| * Изучение работы с брокерами сообщений, | ||
| * Изучение архитектурных паттернов, | ||
| * Изучение работы со средствами оркестрации на примере .NET Aspire, | ||
| * Повторение основ работы с системами контроля версий, | ||
| * Интеграционное тестирование. | ||
| ## Лабораторная работа №1 — «Кэширование» | ||
|
|
||
| **Вариант №17 — «Транспортное средство»** | ||
| **Выполнил:** Чукарев Михаил, группа 6511 | ||
|
|
||
| ### Описание | ||
|
|
||
| Реализован сервис генерации данных о транспортных средствах с кэшированием ответов в Redis и оркестрацией через .NET Aspire. | ||
|
|
||
| ### Что реализовано | ||
|
|
||
| ### Лабораторные работы | ||
| <details> | ||
| <summary>1. «Кэширование» - Реализация сервиса генерации контрактов, кэширование его ответов</summary> | ||
| <br> | ||
|
|
||
| В рамках первой лабораторной работы необходимо: | ||
| * Реализовать сервис генерации контрактов на основе Bogus, | ||
| * Реализовать кеширование при помощи IDistributedCache и Redis, | ||
| * Реализовать структурное логирование сервиса генерации, | ||
| * Настроить оркестрацию Aspire. | ||
|
|
||
| </details> | ||
| <details> | ||
| <summary>2. «Балансировка нагрузки» - Реализация апи гейтвея, настройка его работы</summary> | ||
| <br> | ||
|
|
||
| В рамках второй лабораторной работы необходимо: | ||
| * Настроить оркестрацию на запуск нескольких реплик сервиса генерации, | ||
| * Реализовать апи гейтвей на основе Ocelot, | ||
| * Имплементировать алгоритм балансировки нагрузки согласно варианту. | ||
|
|
||
| <br> | ||
| </details> | ||
| <details> | ||
| <summary>3. «Интеграционное тестирование» - Реализация файлового сервиса и объектного хранилища, интеграционное тестирование бекенда</summary> | ||
| <br> | ||
| <summary>Генерация данных (Bogus)</summary> | ||
| <br> | ||
|
|
||
| В рамках третьей лабораторной работы необходимо: | ||
| * Добавить в оркестрацию объектное хранилище, | ||
| * Реализовать файловый сервис, сериализующий сгенерированные данные в файлы и сохраняющий их в объектном хранилище, | ||
| * Реализовать отправку генерируемых данных в файловый сервис посредством брокера, | ||
| * Реализовать интеграционные тесты, проверяющие корректность работы всех сервисов бекенда вместе. | ||
| - Класс `VehicleGenerator` с `RuleFor` для каждого поля | ||
| - Поля: VIN, производитель, модель, год выпуска, тип кузова, тип топлива, цвет, пробег, дата последнего ТО | ||
|
|
||
| <br> | ||
| <br> | ||
| </details> | ||
|
|
||
| <details> | ||
| <summary>4. (Опционально) «Переход на облачную инфраструктуру» - Перенос бекенда в Yandex Cloud</summary> | ||
| <br> | ||
|
|
||
| В рамках четвертой лабораторной работы необходимо перенестиервисы на облако все ранее разработанные сервисы: | ||
| * Клиент - в хостинг через отдельный бакет Object Storage, | ||
| * Сервис генерации - в Cloud Function, | ||
| * Апи гейтвей - в Serverless Integration как API Gateway, | ||
| * Брокер сообщений - в Message Queue, | ||
| * Файловый сервис - в Cloud Function, | ||
| * Объектное хранилище - в отдельный бакет Object Storage, | ||
|
|
||
| <br> | ||
| <summary>Кэширование (Redis + IDistributedCache)</summary> | ||
| <br> | ||
|
|
||
| - Сервис `VehicleService` инкапсулирует логику работы с кэшем | ||
|
|
||
| <br> | ||
| </details> | ||
|
|
||
| ## Задание. Общая часть | ||
| **Обязательно**: | ||
| * Реализация серверной части на [.NET 8](https://learn.microsoft.com/ru-ru/dotnet/core/whats-new/dotnet-8/overview). | ||
| * Оркестрация проектов при помощи [.NET Aspire](https://learn.microsoft.com/ru-ru/dotnet/aspire/get-started/aspire-overview). | ||
| * Реализация сервиса генерации данных при помощи [Bogus](https://github.com/bchavez/Bogus). | ||
| * Реализация тестов с использованием [xUnit](https://xunit.net/?tabs=cs). | ||
| * Создание минимальной документации к проекту: страница на GitHub с информацией о задании, скриншоты приложения и прочая информация. | ||
| <details> | ||
| <summary>Структурное логирование</summary> | ||
| <br> | ||
|
|
||
| **Факультативно**: | ||
| * Перенос бекенда на облачную инфраструктуру Yandex Cloud | ||
| - Логирование через `ILogger<T>` | ||
|
|
||
| Внимательно прочитайте [дискуссии](https://github.com/itsecd/cloud-development/discussions/1) о том, как работает автоматическое распределение на ревью. | ||
| Сразу корректно называйте свои pr, чтобы они попали на ревью нужному преподавателю. | ||
| <br> | ||
| </details> | ||
|
|
||
| По итогу работы в семестре должна получиться следующая информационная система: | ||
| <details> | ||
| <summary>C4 диаграмма</summary> | ||
| <img width="1584" height="771" alt="Современные_технологии_разработки_ПО_drawio" src="https://github.com/user-attachments/assets/71d6356f-7eb4-463d-b9f3-c953e5312993" /> | ||
| </details> | ||
| <summary>CORS</summary> | ||
| <br> | ||
|
|
||
| ## Варианты заданий | ||
| Номер варианта задания присваивается в начале семестра. Изменить его нельзя. Каждый вариант имеет уникальную комбинацию из предметной области, базы данных и технологии для общения сервиса генерации данных и сервера апи. | ||
| - Доверенные origins вынесены в `appsettings.json` (`Cors:AllowedOrigins`) | ||
| - `AllowAnyMethod`, `AllowAnyHeader` | ||
|
|
||
| [Список вариантов](https://docs.google.com/document/d/1WGmLYwffTTaAj4TgFCk5bUyW3XKbFMiBm-DHZrfFWr4/edit?usp=sharing) | ||
| [Список предметных областей и алгоритмов балансировки](https://docs.google.com/document/d/1PLn2lKe4swIdJDZhwBYzxqFSu0AbY2MFY1SUPkIKOM4/edit?usp=sharing) | ||
| <br> | ||
| </details> | ||
|
|
||
| ## Схема сдачи | ||
| <details> | ||
| <summary>Оркестрация (.NET Aspire)</summary> | ||
| <br> | ||
|
|
||
| На каждую из лабораторных работ необходимо сделать отдельный [Pull Request (PR)](https://docs.github.com/en/pull-requests). | ||
| - Redis | ||
| - API сервис | ||
| - Клиент WASM | ||
|
|
||
| Общая схема: | ||
| 1. Сделать форк данного репозитория | ||
| 2. Выполнить задание | ||
| 3. Сделать PR в данный репозиторий | ||
| 4. Исправить замечания после code review | ||
| 5. Получить approve | ||
| <br> | ||
| </details> | ||
|
|
||
| ## Критерии оценивания | ||
| <details> | ||
| <summary>API</summary> | ||
| <br> | ||
|
|
||
| Конкурентный принцип. | ||
| Так как задания в первой лабораторной будут повторяться между студентами, то выделяются следующие показатели для оценки: | ||
| 1. Скорость разработки | ||
| 2. Качество разработки | ||
| 3. Полнота выполнения задания | ||
| - Единственный эндпоинт: `GET /api/vehicles?id={id}` | ||
|
|
||
| Быстрее делаете PR - у вас преимущество. | ||
| Быстрее получаете Approve - у вас преимущество. | ||
| Выполните нечто немного выходящее за рамки проекта - у вас преимущество. | ||
| Не укладываетесь в дедлайн - получаете минимально возможный балл. | ||
| <br> | ||
| </details> | ||
|
|
||
| ### Шкала оценивания | ||
| <details> | ||
| <summary>Тесты (xUnit)</summary> | ||
| <br> | ||
|
|
||
| - **3 балла** за качество кода, из них: | ||
| - 2 балла - базовая оценка | ||
| - 1 балл (но не более) можно получить за выполнение любого из следующих пунктов: | ||
| - Реализация факультативного функционала | ||
| - Выполнение работы раньше других: первые 5 человек из каждой группы, которые сделали PR и получили approve, получают дополнительный балл | ||
|
|
||
| ## Вопросы и обратная связь по курсу | ||
| - `Generate_SameId_ReturnsSameData` — детерминированность генерации | ||
| - `Generate_DifferentIds_ReturnsDifferentData` — уникальность по `id` | ||
| - `Generate_YearConstraint_IsValid` — год в диапазоне [1990, текущий] | ||
| - `Generate_MileageConstraint_IsValid` — пробег в диапазоне [0, 500 000] | ||
| - `Generate_LastServiceDateConstraint_IsValid` — дата ТО не раньше года выпуска и не в будущем | ||
|
|
||
| Чтобы задать вопрос по лабораторной, воспользуйтесь [соответствующим разделом дискуссий](https://github.com/itsecd/cloud-development/discussions/categories/questions) или заведите [ишью](https://github.com/itsecd/cloud-development/issues/new). | ||
| Если у вас появились идеи/пожелания/прочие полезные мысли по преподаваемой дисциплине, их можно оставить [здесь](https://github.com/itsecd/cloud-development/discussions/categories/ideas). | ||
| <br> | ||
| </details> | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.