Rules to Write Reusable Code

Cohesion in Methods: Do just one thing or a few but closely related Short Methods: Keep the right size so it can be easily understood and modifiable Method Coherency: Similar to others, similar size, error conditions, etc Split high-level from low-level methods: high-level are those which control, check status and low-level those which get the […]

Requirements Engineering

These are the steps the Requirements Engineering is composed of: Gathering: Engineer asks stake holders to retrieve information. Not easy due to unnecessary information, misunderstood information and volatility Elaboration: First UML diagrams, some iterations to polish the model Negotiation: Discriminate between conflicting requirements and delimit user’s needs Specification: Documentation, may vary in details and contents […]

Reliable one-to-one Communication

Although this is stated in the post about distributed system models, I better write it down again. Validity: Any message sent to the outgoing buffer is eventually delivered in the incoming buffer Integrity: Received messages are identical to the ones sent and delivered just once

Product, Project, Task & Process for a Software Engineer

Some definitions taken from  “Introduction to PSP” by Watts S. Humphrey which may be worth having them handy Product: Something produced for a company or client Project: Used to produce a Product Task: Element of work Process: Way to do projects Phase: Steps proposed in a process (e.g. Planning, development, testing). Each phase is composed of tasks

Replication in Distributed Systems

System Model Assume synchronous system with crashing the only fail Replica Managers contain the replica in a computer and perform operations upon them Front-end issues request to one or more replica managers Coordination: Replica managers coordinate the requests FIFO, Casual, Total Replica manager pass back the first result for responsiveness or what majority has reply […]

Coordination and Agreement in Distributed Systems

For the rest of the post we assume the following: Processes connected by reliable channels Only possible file is a crash Systems Asynchronous Distributed Mutual Exclusion If server involved allowing access to one process at a time Algorithms evaluated following: Bandwidth consumed Client delay Throughput of the system Central Server Algorithm: A process sends a […]

Time and Global States in Distributed Systems

Simple Synchronization in Synchronous Systems A process sends its internal clock to a UTC Server t + Ttrans not valid because of network variations instead uses t + (max +min) / 2, being transmission max/min bounds Cristian’s Algorithm Method achieves synchronization if round-trip is sufficiently short compared with the accuracy P1 ask for time to P2 P1 receives […]