Sockets explained

They act as endpoints in a two-way communication channel.
For communication of two machines or applications each app/machine creates a socket.
Each socket is associated with IP and port. 

OSI
Sockets operate at layer 4 - transport layer.
Application layer calls down the socket api, for example browser, backend server etc

https://www.geeksforgeeks.org/computer-networks/socket-in-computer-network/

Types of Sockets:
- TCP(Transmission Control Protocol)
Connection oriented and responsible for ensuring reliable, ordered, error checked, non duplicate data transmission.
Before data is sent a three way handshake is performed to establish the connection.(exchange of SYN and ACK packets)
        - Client sends a SYN(synchronize) packet to initiate a connection.
        - SYN-ACK server responds with a SYN-ACK packet, acknowledging the receipt of SYN and sending its own SYN request.
» Read More »

Labels:

Onion Architecture

I will try to explain what Onion Architecture is, pros and cons and implementation example.
 
So first of all software architecture's like a blueprint for both the system's behavior and the mechanisms used to achieve that behavior.
Architecture provides structured approach to managing complexity of software systems. It supports scalability, maintainability and flexibility by defining patterns and practices, making it easier to understand, promoting code reuse and adapting to changing requirements.
 
Origins of Onion Architecture
With commonly used traditional layered architecture, each subsequent layer depends on the layers beneath it. This creates thight coupling, makes it challenging to replace, upgrade or adapt changes without affecting all layers. (As Palermo says when explainin this arch.: "However, without coupling, our systems wouldn’t do anything useful, but this architecture creates unnecessary coupling.")
 
 With this architecture, dependency/coupling is towards the center. All code can depend on layers in the center but can not depend on layers further out.
 
Onion Architecture

Number of layers may vary depending of the application but domain model is always at the core. Domain model is not coupled to anything but itself. 

» Read More »

Labels: , ,