Uber's Michelangelo vs. Netflix's Metaflow

  Uber's Michelangelo vs. Netflix's Metaflow Michelangelo Pain point Without michelangelo, each team at uber that uses ML (that’s all of them - every interaction with the ride or eats app involves ML) would need to build their own data pipelines, feature stores, training clusters, model storage, etc.  It would take each team copious amounts of time to maintain and improve their systems, and common patterns/best practices would be hard to learn.  In addition, the highest priority use cases (business critical, e.g. rider/driver matching) would themselves need to ensure they have enough compute/storage/engineering resources to operate (outages, scale peaks, etc.), which would results in organizational complexity and constant prioritization battles between managers/directors/etc. Solution Michelangelo provides a single platform that makes the most common and most business critical ML use cases simple and intuitive for builders to use, while still allowing self-serve extensibi...

Factory Design Pattern

The factory pattern is used when you want to separate the creation of objects from where they'll be used.

For example, say you have one object that must get a Triangle object and draw it on screen. It doesn't care about what the triangle's state is, just that it has a void Draw() method. Suppose further that you have many types of triangles, and they can all be 'drawn' onscreen. In order to separate the creation of triangle objects from the caller, we would use the Factory Design Pattern:

1.) Create an interface called ITriangle, with one method : void Draw()
2.) Have all types of Triangle implement ITriangle.
3.) Create an interface called ITriangleFactory with 1 method: ITriangle GetTriangle()
4.) Create a concrete 'factory' class for each type of Triangle, each of which implements ITriangleFactory, and returns a new instance of their respective triangle in their implementations of GetTriangle()...since each Triangle type implements ITriangle, each factory can return whatever type of triangle it wants.

Now you can easily add triangle types in the future and change the type that is drawn by the caller, without changing every line of code that references the triangle:

public void callerMethod(ITriangleFactory factory){
    ITriangle myNewTriangle = factory.GetTriangle();
    myNewTriangle.Draw();
}

In the above code, if you want to change the type of triangle drawn, simply change the type of factory passed into callerMethod(). The rest is already taken care of.

Cheers.

Comments

Popular posts from this blog

ChatGPT - How Long Till They Realize I’m a Robot?

Architectural Characteristics - Transcending Requirements

Laws of Software Architecture