Skip to main content

Posts

Event Sourcing with CQRS.

  The way event sourcing works with CQRS is to have  part of the application that models updates as writes to an event log or Kafka topic . This is paired with an event handler that subscribes to the Kafka topic, transforms the event (as required) and writes the materialized view to a read store.
Recent posts

GraphQL microservices (GQLMS)

I'm curios of GraphQL !     -  GraphQL is an open-source data query and manipulation language for APIs, and a runtime for fulfilling queries with existing data. GraphQL was developed internally by Facebook in 2012 before being publicly released in 2015. It should be solving a problem in querying data !     -GraphQL lets you ask for what you want in a single query, saving bandwidth and reducing waterfall requests. It also enables clients to request their own unique data specifications. A case study ?!    -https://netflixtechblog.com/beyond-rest-1b76f7c20ef6 So, This is just another database technoloy ?  -  No. GraphQL is often confused with being a database technology. This is a misconception, GraphQL is a   query language   for APIs - not databases. In that sense it’s database agnostic and can be used with any kind of database or even no database at all. Source:   howtographql.com    

Virahanka Numbers : An Application of recursion

Brief History Of Computer. The computer as we know it today had its beginning with a 19th century English mathematics professor name Charles Babbage. He designed the Analytical Engine and it was this design that the basic framework of the computers of today are based on. But recursion seems to be existing much before we thought of a machine for calculation. Here's the Virahanka's problem in brief : Find number of of poetic meters with 8 beats, made of: • Short syllables, each 1 beat duration • Long syllables, each  2 beat duration  And the solution was V(D) = V(D-1)+V(D-2) for D> 2 . Given V(1)=1 and V(2)=2. Credits :  https://www.cse.iitb.ac.in/~cs101/2012.2/resources/VirahankaNumbers.pdf

Extract Translate Load

So, What it's like Extract Translate Load ?   - ETL was a solution to get analytics at scale. Once we have huge data at scale of hundreds of tera bytes or even at peta scale, we may need a HPC to ask questions on such data. Using commodity compute horizontally would be cost effective in most of the businesss cases. Initially Hadoop had its helping hand in the process, however when Spark could do it efficiently the world said "Why not?". For us to get analytics on huge data largely unstructred and from hetrogenous sources, like every other engineering problem we divided the problem so we can conquer it with ease. We made a layer to Extract, this layer would just abstract us different data sources and get us the data. Traslate layer would structure the data for us so that our logical questions would fit into the arena.Load come in where we need to distribute the compute task at hand to large commodity clusters. Here's where big data framework would be a friend at hel

What happens if gradient is set at 1 in "Gradient descent algorithm"

So, What is gradient descent algorithm ?  - Given a feed forward netword we apply gradient descent as a fundamental function of Operation : 1. Randomly initialize : b, W1, W2, ... , Wm 2. Repeat untill convergence 3. Predict y(i) for each data point in training 4. Calculate loss J(b,w) 5. Calculate gradient of J(b,w)      b(new)   =  b(old)   -a.gradient     w1(new) =  w1(old)-a.gradient.w1     w2(new) =  w2(old)-a.gradient.w2     wm(new) =  wm(old) - a.gradient.wm 6. Update b,w1,w2,......,wm .. Simulateneously.. - When "Louis Augustin Cauchy" needed a function to find local minima he used idea of slope to iteratively move in direction guided by slope to reach local minima. - Using the same idea in feed forward networks leads to convergence of minimum error. Why gradient anyway ? So if gradient is set to 1 or in other words if we dont use gradient descent we reach to a point directly on x - axis which will not be the required local minima.

Whirlwind Questions : Kubernetes

What is Kubernetes ? Goole Tells :  Kubernetes is an open-source container-orchestration system for automating application deployment, scaling, and management. It was originally designed by Google, and is now maintained by the Cloud Native Computing Foundation.  What is container-orchestration ?  Goole Tells :  Container orchestration is the automatic process of managing or scheduling the work of individual containers for applications based on microservices within multiple clusters. Who are Cloud Native Computing Foundation ?  Google Tells : The Cloud Native Computing Foundation (CNCF) hosts critical components of the global technology infrastructure. CNCF brings together the world's top developers, end users, and vendors and runs the largest open source developer conferences. Why did goole let CNCF let develop Kubernetes ? - Actually its still with Google. Google partners with Linux Foundation to form CNCF. History here :  https://blog.risingstack.com/the-history-of-kub

3 Dimensions of a Programming Language

- I believe there are 3 broad areas for mastering any programming language : 1. Language Internals 2. Programming Constructs offerred 3. Standard library written already in that particular language. And these 3 categories are in order of priority to hone mastery in a given programming language. Priorities are always decided based on goals. So, here the premise for setting this priority is having said to have mastered such programming languge we should be able to read a large code corpus with ease and understand what the programmer who originally wrote this code intended to do with it. Why Language Internals take a first priority ? - Because we as a software enginners write a tool chain and compilers only to solve existing issues faced in some other programming language. When assembly was just making computer do its job it was difficult for a programmer to express his algorithms in faster way hence came languages like B,C, Fortran and BASIC. After some time into building this t