- ETL requirements
- Streaming requirements
- Infrastructure requirements
Monday, 28 August 2017
Paper Summary - Data Ingestion for the Connected World
Sunday, 6 August 2017
Visualising Software Architecture Effectively in Service Description
Friday, 4 August 2017
Paper Summary - Prioritizing Attention in Fast Data: Principles and Promise
Peter Bailis, Edward Gan, Kexin Rong, Sahaana Suri
Stanford InfoLab
Users can engage at three interface levels with MacroBase:
- Basic: Web based graphical user interface. This one is an easy interface.
- Intermediate: Custom pipelines configuring using Java.
- Advanced: Custom dataflow operators using Java/C++.
Thursday, 3 August 2017
Monday, 17 July 2017
Saturday, 7 May 2016
Sunday, 17 April 2016
Raft Consensus Algorithm
- They never return an incorrect result under all non-Byzantine conditions including network delays, partition, packet loss, duplication, reordering
- They are fully functional as long as any majority of servers are operational and can communicate with each other and with the clients. For example, a cluster of five servers can tolerate the failure of any two servers
- They do not depend on the timing to ensure the consistency of the logs
- In the common case, a command can complete as soon as a majority of the servers has responded to a single round of remote procedure calls. A minority of slow servers do not have impact on the overall system performance.
- Follower: A follower is a passive node. It does not issue any request on its own but simply responds to the requests from the leader and the candidates
- Candidate: A candidate is an active node which is attempting to become a Leader. It initiates a request for votes from other nodes. A candidate that receives votes from a majority of the full cluster becomes the new leader
- Leader: Leader node is an active node which is currently leading the cluster. This node handles requests from clients. If a client contacts a follower, it redirects the client to the leader
- RequestVote: this message is used by the candidates during the election.
- AppendEntries: this message is initiated by the leader to replicate the log entries and to provide a form of heartbeat to the followers.
- InstallSnapshot: this message is used by the leader to send a snapshot of it’s log to the followers that are too far behind.
- Election Safety: at most one leader can be elected in a given term.
- Leader Append-Only: a leader never overwrites or deletes entries in its log; it only appends new entries.
- Log Matching: if two logs contain an entry with the same index and term, then the logs are identical in all entries up through the given index.
- Leader Completeness: if a log entry is committed in a given term, then that entry will be present in the logs of the leaders for all higher-numbered terms.
- State Machine Safety: if a server has applied a log entry at a given index to its state machine, no other server will ever apply a different log entry for the same index.
- Raft paper for detail explanation
- Raft Refloated: Do We Have Consensus? by Heidi Howard, Malte Schwarzkopf, Anil Madhavapeddy, and Jon Crowcroft
- ARC: Analysis of Raft Consensus by Heidi Howard
Wednesday, 20 May 2015
My talk on agile architecture in Agile Manchester 2015
Sunday, 1 March 2015
Modularity
- Increase quality and reduce complexity
- Parallel development and roll-outs
- Horizontal load balancing of functionality
- Reduced dependencies between different functional areas
- Functional areas can scale separately and on demand
- Asynchronous workflows that increase availability and evenly balance out peak loads
- Smaller modules most of the time brings smaller data sets. This helps to reduce database size, database server workloads and simplified ORM mappings.
Sunday, 15 February 2015
Eventual Consistency
- DNS
- Asynchronous master/slave replication on an RDBMS
- Caching in front of relational databases
- NoSQL databases
- Causal consistency If process A has communicated to process B that it has updated a data item, a subsequent access by process B will return the updated value, and a write is guaranteed to supersede the earlier write. Access by process C that has no causal relationship to process A is subject to the normal eventual consistency rules. Eventual Consistency does not say anything about the ordering of operations where as causal consistency ensures that operations appear in the order the user intuitively expects. It enforces a partial order over operations.
- Read-your-writes consistency This is an important model where process A, after it has updated a data item, always accesses the updated value and will never see an older value. This is a special case of the causal consistency model.
- Session consistency This is a practical version of the previous model, where a process accesses the storage system in the context of a session. As long as the session exists, the system guarantees read-your-writes consistency. If the session terminates because of a certain failure scenario, a new session needs to be created and the guarantees do not overlap the sessions.
- Monotonic read consistency If a process has seen a particular value for the object, any subsequent accesses will never return any previous values.
- Monotonic write consistency In this case the system guarantees to serialize the writes by the same process. Systems that do not guarantee this level of consistency are notoriously hard to program.
- http://en.wikipedia.org/wiki/Eventual_consistency
- http://www.allthingsdistributed.com/2008/12/eventually_consistent.html
- Don't Settle for Eventual Consistency- Wyatt Lloyd, Michael J. Freedman, Michael Kaminsky, David G. Andersen
- Eventual Consistency Today: Limitations, Extensions, and Beyond - Peter Bailis and Ali Ghodsi
Sunday, 7 September 2014
TierCompilation
Sunday, 11 May 2014
Sunday, 23 March 2014
Microservice architecture
- It is difficult to change.
- It takes time to add new feature.
- Difficult to test.
- Deployment is a pain.
- and many more
- Management of campaigns
- Management of offers
- Tracking of customers' activities
- Give reward
- Management of campaigns becomes Campaign Service
- Management of offers becomes Offer Service
- Tracking of customers' activities becomes Tracking Service
- Give reward becomes Reward service
Sunday, 9 March 2014
Major Java 8 Features
Friday, 31 January 2014
Architectural Views : Context view
- What does the system actually do from a functional point of view?
- Who and what other systems are using it?
- How is it related to auxiliary systems or services?
- System: the system that is going to be designed. Hide it's internal structure, treat it as a "black box"
- External Entities: these are the auxiliary systems, services, people and groups that the system interacts with
- Connections: theses are interfaces, protocols and connectors that link the external entities and the system being designed.
Tuesday, 26 November 2013
Characteristics of a productive development team
Sunday, 10 November 2013
Media Types
A media type is a combination of formats, processing model, and hypermedia controls.
Saturday, 19 October 2013
Characteristics of different levels in Richardson Maturity Model
- HTTP is used as a transport system to tunnel requests and responses.
- A single URI.
- Use a single HTTP method (typically POST), ignore the rest of the HTTP verbs.
- Examples: SOAP, XML-RPC and POX (Plain Old XML).
- Introduce Resource concept.
- Employ many URIs and each URI acts as an entry point to a specific resource.
- Still a single HTTP verb is used.
- At this level services host many URI-addressable resources and also support several of the HTTP verbs on each exposed resources.
- The use of GET for requesting resource is important. HTTP defines GET as safe and idempotent operation. This property of GET help us to optimize the services. When a consumer of a resource uses GET, we know he does not want to modify it. We can use caching to store responses closer to our consumer. Subsequent requests will be served from the caches and that helps in improving the overall quality of the service.
- Another important characteristic is the use of status codes. Services use different status codes to respond. When a resource is created, services respond with a 201 Created whereas 409 Conflict is used to tell that something has gone wrong.
- Support HATEOAS (Hypermedia As The Engine Of Application State)
- Now the representations contain URI links. These links may point to other resources (may be interesting to the consumers) or they may represent a transition to a possible future state of the current resource. One important thing to notice here - service tells the consumer what to do next through these links.
- Here the consumer submits an initial request to the entry point of the service. The service handles the request and responds with a resource representation populated with links. The consumer chooses one of these links to transition to the next step in the interaction. Over the course of several such interactions, the consumer progresses toward its goal. In this way the distributed application's state gets changed.
- Consumers in a hypermedia system cause state transitions by visiting and manipulating resource state.
- REST in Practice - Jim Webber, Savas Parastatidis, Ian Robinson
- Martin Fowler's article on Richardson Maturity Model
Saturday, 22 June 2013
Self Encapsulation
Martin Fowler mentioned this in his bliki :
"Self Encapsulation is designing your classes so that all access to data, even from within the same class, goes through accessor methods."
This is also called Self Delegation. Take this simple Email example:
public final class Email implements Serializable { private static final long serialVersionUID = 1L; private String emailAddress; public Email(String anEmailAddress) { super(); this.setEmailAddress(anEmailAddress); } public Email(Email anEmail) { this(anEmail.getEmailAddress()); } public String getEmailAddress() { return this.emailAddress; } private void setEmailAddress(String anEmailAddress) { if(anEmailAddress == null) { throw new IllegalArgumentException ("Email address must not be null."); } if(anEmailAddress.length() == 0) { throw new IllegalArgumentException ("Email address is required."); } if(!java.util.regex.Pattern.matches( "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*", anEmailAddress)){ throw new IllegalArgumentException ("Email address format is invalid."); this.emailAddress = anEmailAddress; } }
In above example, constructor is delegating instance variable, emailAddress assignment to its own internal property setter. Here the setter method is not only setting the email address, but also performing an important assertion. It is providing a guard against invalid data. The self-encapsulation enables the setter method to determine the appropriate contractual condition for setting the email address. This is the advantage of using Self Encapsulation.
References
1. http://martinfowler.com/bliki/SelfEncapsulation.html
2. Implementing Domain-Driven Design - Vaughn Vernon




















