Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
NoSql | |
CAP Theorm (no dbms that follow 3 rules at the same time) | |
Consistency | |
Accesability | |
Partition tolerance | |
Vertical and Horizontal scaling in terms RDBMS: | |
You can partition data vertically (splitting tables into subsets of columns and implementing each subset as a separate table) and horizontally (splitting tables into subsets of rows, and implementing each subset as a separate table where each table contains the same columns). You can place different partitions on different servers to spread the load and improve scalability. | |
Sharding - horizontal scaling of data | |
Sharding migth decrease performance (for example when join 2 tables on differ shards => try to store at the same shard) |
Browser components: | |
1. UI | | |
↓ | | |
2. Browser Engine ========================|===========> data persistance | |
3. Rendering Engine ↓ (25) | |
4. Networking 5. JS Interpreter 6. UI Backend | |
Chrome uses several display modules | |
Proxy may return info from cache!! | |
Forward proxy (for client) | |
Reverse proxy (for server, service) | |
(можно на отдельный сервер вынести отправку статического контента, | |
как раз reverse proxy) | |
CDN - Content Delivery Network | |
Proxy may return info from cache |
Схема позиционирования | |
Существует три схемы позиционирования. | |
Стандартная: объект размещается согласно своему положению в дереве отображения и в дереве DOM | |
а также своему типу и размерам окна | |
Плавающая: сначала по стандартной схеме, затем смещается в крайнее правое или крайнее левое положение | |
Абсолютная: положение объекта в дереве отображения отличается от его положения в дереве DOM. |
https://www.learnentityframeworkcore.com/ | |
1. Adding | |
2. Modifying | |
a) | |
var author = context.Authors.First(a => a.AuthorId == 1); | |
author.FirstName = "Bill"; | |
context.SaveChanges(); |
1. async vs defer | |
<script src="1.js" defer></script> | |
<script src="2.js" defer></script> | |
defer - preserve the execution order. | |
Naming: | |
jquery obj ? $name : name |
1. Базовая структура блока plsql | |
Declare - необязательно | |
(const, vars, types, cursors, user exceptions) | |
Begin - обязательно | |
(PL/SQL, SQL commands) | |
Exception - необязательно | |
Действий при возникновении ошибки |
GUIDs hurt performance of inserts. | |
Relational databases use B+ tree structure to store data. | |
If data coming in is not ordered, then a lot of IO work is required to rearrange the leafs. | |
GUIDs are random, so they may lead to heavy performance drawbacks, especially with large tables. | |
Database generated integers may hurt performance of inserts as well but for another reason. | |
When a database generates a new auto-incremented value for a primary key, it takes a lock to avoid race conditions. | |
It causes a performance issue that shows up in scenarios with multithread or bulk inserts. | |
IF EXISTS (SELECT * FROM dbo.Ids WHERE EntityId = @EntityId) |