skills:interview
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| skills:interview [2026/06/15 10:02] – phong2018 | skills:interview [2026/06/15 10:07] (current) – [Transactions] phong2018 | ||
|---|---|---|---|
| Line 260: | Line 260: | ||
| 18. What are deadlocks? | 18. What are deadlocks? | ||
| + | < | ||
| + | - Deadlock: A situation where two or more transactions hold locks and wait for each other indefinitely. | ||
| + | - How it occurs: Transactions access the same resources in different orders. Long-running transactions hold locks too long. Missing indexes cause unnecessary locking. | ||
| + | - How to detect it: The database detects deadlocks automatically. MySQL returns: ERROR 1213: Deadlock found when trying to get lock. Investigate with SHOW ENGINE INNODB STATUS. | ||
| + | - How to prevent it: Keep transactions short. Always access tables/rows in a consistent order. Add proper indexes. Avoid large batch operations in a single transaction. | ||
| + | - How to recover: The database rolls back one transaction automatically. Catch the error in the application and retry the transaction with backoff. | ||
| + | </ | ||
| ==== Large Scale Databases ==== | ==== Large Scale Databases ==== | ||
| Line 492: | Line 498: | ||
| 7. What backend technology trends are you currently following? | 7. What backend technology trends are you currently following? | ||
| - | ====== More detail versions ====== | ||
| - | ====== Senior PHP (Laravel/ | ||
| - | |||
| - | ===== PHP Fundamentals ===== | ||
| - | |||
| - | 1. What are PSR standards (PSR-1, PSR-12, PSR-4) and why do they matter for team consistency? | ||
| - | 2. What new features in PHP 8.x (attributes, | ||
| - | 3. How does Composer autoloading work, and what is the difference between PSR-4, PSR-0, classmap, and files autoloading? | ||
| - | 4. What is the difference between interface, abstract class, and trait — and when should you choose each? | ||
| - | 5. What are PHP attributes (# | ||
| - | 6. How does PHP-FPM work, and how does it manage worker processes to handle concurrent requests? | ||
| - | 7. How does OPCache improve performance, | ||
| - | 8. Explain the lifecycle of an HTTP request in PHP from the moment it hits the server to the response being sent back. | ||
| - | 9. How does memory management work in PHP — how is memory allocated per request and what causes memory leaks? | ||
| - | 10. Can PHP handle concurrency, | ||
| - | 11. How would you implement concurrent API calls in PHP (e.g. calling three external APIs in parallel)? | ||
| - | 12. What are Fibers in PHP 8.1 and how do they differ from goroutines or threads? | ||
| - | 13. What is Swoole or RoadRunner and how do they differ from the traditional PHP-FPM request model? | ||
| - | 14. What do the three numbers in Semantic Versioning (MAJOR.MINOR.PATCH) mean, and when should each be incremented? | ||
| - | | ||
| | | ||
| - | ====== System Design Interview Questions | + | ====== System Design Interview Questions ====== |
| ===== Interview Framework ===== | ===== Interview Framework ===== | ||
| Line 754: | Line 740: | ||
| + | |||
| + | ====== More detail versions ====== | ||
| + | ====== Senior PHP (Laravel/ | ||
| + | |||
| + | ===== PHP Fundamentals ===== | ||
| + | |||
| + | 1. What are PSR standards (PSR-1, PSR-12, PSR-4) and why do they matter for team consistency? | ||
| + | 2. What new features in PHP 8.x (attributes, | ||
| + | 3. How does Composer autoloading work, and what is the difference between PSR-4, PSR-0, classmap, and files autoloading? | ||
| + | 4. What is the difference between interface, abstract class, and trait — and when should you choose each? | ||
| + | 5. What are PHP attributes (# | ||
| + | 6. How does PHP-FPM work, and how does it manage worker processes to handle concurrent requests? | ||
| + | 7. How does OPCache improve performance, | ||
| + | 8. Explain the lifecycle of an HTTP request in PHP from the moment it hits the server to the response being sent back. | ||
| + | 9. How does memory management work in PHP — how is memory allocated per request and what causes memory leaks? | ||
| + | 10. Can PHP handle concurrency, | ||
| + | 11. How would you implement concurrent API calls in PHP (e.g. calling three external APIs in parallel)? | ||
| + | 12. What are Fibers in PHP 8.1 and how do they differ from goroutines or threads? | ||
| + | 13. What is Swoole or RoadRunner and how do they differ from the traditional PHP-FPM request model? | ||
| + | 14. What do the three numbers in Semantic Versioning (MAJOR.MINOR.PATCH) mean, and when should each be incremented? | ||
| + | | ||
| + | | ||
| ===== Laravel & Symfony ===== | ===== Laravel & Symfony ===== | ||
skills/interview.1781517732.txt.gz · Last modified: by phong2018
