As i’m progressing in the Machine Learning course by Andrew Ng, I felt lost with the math of the Regression. Not after too long on google i decided to watch the Regression videos on Khan Academy. It took me less than two hours to put me back on track :-).
Thank to the guy “I couldn’t find your name one the website” who made the regression videos, i owe you a lot :-),
Thanks Mr. Khan, Mr. Ng and thanks to everyone contributing to the free MOOC movement.
It is impossible for a distributed computer system to provide strict guarantees on all three of 1.Consistency, 2.Availability, and 3.Partition Tolerance at the same time. A distributed system can only satisfy any two of these guarantees.
When most people talk about CQRS they are really speaking about applying the CQRS pattern to the object that represents the service boundary of the application. Consider the following pseudo-code service definition.
CustomerServicevoid MakeCustomerPreferred(CustomerId) Customer GetCustomer(CustomerId) CustomerSet GetCustomersWithName(Name) CustomerSet GetPreferredCustomers() void ChangeCustomerLocale(CustomerId, NewLocale) void CreateCustomer(Customer) void EditCustomerDetails(CustomerDetails)
Applying CQRS on this would result in two services
CustomerWriteServicevoid MakeCustomerPreferred(CustomerId) void ChangeCustomerLocale(CustomerId, NewLocale) void CreateCustomer(Customer) void EditCustomerDetails(CustomerDetails)
CustomerReadServiceCustomer GetCustomer(CustomerId) CustomerSet GetCustomersWithName(Name) CustomerSet GetPreferredCustomers()
That is it. That is the entirety of the CQRS pattern. There is nothing more to it than that… Doesn’t seem nearly as interesting when we explain it this way does it? This separation however enables us to do many interesting things architecturally, the largest is that it forces a break of the mental retardation that because the two use the same data they should also use the same data model.