Dijkstra's Algorithm Explained

Dijkstra’s Algorithm Dijkstra’s algorithm is an algorithm for finding the shortest path from a single source vertex to all other vertices in a weighted graph. It is similar to breadth-first search (BFS) in that it explores the graph by keeping track of the shortest known distance to each vertex. Steps Initialize an array to store the distance from the source vertex to each vertex. Mark the source vertex as visited. ...

June 17, 2024 · 3 min · 477 words · In-Jun Hwang

What is CI/CD?

CI (Continuous Integration) CI (Continuous Integration) means continuous integration. It is a process of automatically building and testing code whenever it is written and changed. Simply put, it is a process of automatically integrating code written by multiple developers. How CI Works A developer modifies code The code is pushed to a repository (e.g., GitHub) A CI tool automatically fetches the code and builds it It runs tests It notifies the developer with the results Benefits of CI Code issues can be found quickly The time for manually building and testing can be reduced High-quality code can be maintained CD (Continuous Deployment) CD (Continuous Deployment) means continuous deployment. It is a process of automatically reflecting the code that has passed through the CI process into a service. In other words, it is a process of making developed content available to users right away. ...

June 10, 2024 · 2 min · 277 words · In-Jun Hwang

What is a Socket?

Sockets A socket is software that provides an interface for network communication. Sockets help facilitate communication between clients and servers, allowing them to send and receive data. Sockets offer an Application Programming Interface (API) for network communication. They work with both TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), each providing a means to transfer data reliably. Socket Communication Methods Sockets provide the following methods to facilitate communication between clients and servers: ...

June 8, 2024 · 2 min · 270 words · In-Jun Hwang

Understanding First-Level and Second-Level Caches

First-Level Cache First-level cache (L1 cache) is a cache that exists within the persistence context. When an entity is retrieved, the persistence context stores the entity in the cache. If the same entity is retrieved later on, the persistence context finds the entity in the cache and returns it. Hence, it is only valid within a transaction, and when the transaction ends, the first-level cache is also terminated. Dirty Checking Dirty checking is a way of tracking changes to entities using the first-level cache. When an entity is retrieved, the persistence context stores the initial state of the entity. If the state of the entity changes later on, the persistence context tracks the changes and reflects them in the database. ...

June 8, 2024 · 3 min · 453 words · In-Jun Hwang

Understanding the Persistence Context

What is a Persistence Context The Persistence Context in Java Persistence API (JPA) refers to an environment that manages entities. It keeps track of entities and their state changes in relation to the database. The Persistence Context is handled by an Entity Manager. Key Functions of a Persistence Context Entity Management: An EntityManager manages entities. The Persistence Context stores the initial state of an entity. Transaction Association: The Persistence Context’s lifecycle is tied to a transaction. When a transaction is committed, changes made to entities managed by the Persistence Context are reflected in the database. Dirty Checking: ...

June 8, 2024 · 2 min · 286 words · In-Jun Hwang