
Using a built-in Kubeflow method, they provide the tools to convert a function into a container. The entire notebook is pushed to abstraction and run through containers. Instead of running an ML job all from one Python script, inside one Jupyter notebook, or on one container, each step in the file gets converted to a function of inputs and outputs. In Kubeflow, Google’s open source machine learning software, every step in the pipeline is a container.
Indirection virtualization code#
The code example above are two functions that could be written into two different containers: For back-end developers, containers are their way to make code more modular.įunctions as a service (FaaS), which are usually functions wrapped into a container, are functions that operate an abstraction level away from the main code. Using modular code in front end programs enables the code’s:Ĭontainers and, more so, the use of containers for specific purposes in the code uses abstraction layers.

You’ll use abstraction layers differently depending on your programming domain.įor front end programming, creating more modular code means creating more abstraction layers. Return number_of_lines, number_of_words, number_of_characters Abstraction layers in different domains Using the appropriate nomenclature, it has been abstracted away from the original function. To the original function, the step that processes the texts is the abstraction layer-it is one step removed from the original task. The processDoc function takes as input, the string output from the openDoc function, and runs some counting scripts and returns their values.The openDoc function will open the document and return the document as a string that the computer can use.One function is not responsible for both two functions take responsibility for the process: To create an abstraction layer from this function, the “counting” portion of the function can get abstracted away from the “opening” portion of the function. Return number_of_lines, number_of_words, number_of_characters This Python function opens a text document and counts the number of lines, the number of words, and the number of characters it has. “All problems in computer science can be solved by another level of indirection.”Ĭreating an abstraction is as simple as changing one function into two. In our case, abstraction can also be called indirection.

Because the developer is not responsible for getting the data and providing the Twitter service at their level of operability, the Twitter API is abstracted away from the developer’s operation. The developer just has to to get the data and use it for their purposes. The Twitter service is operated by Twitter, and all responsibility for collecting their data rests on their shoulders.


The developer is not responsible for creating a service that allows users to speak with one another via 140-character messages. While APIs serve many purposes, the way they are used is this: a developer is trying to create an application involving tweets, so they tap into Twitter’s new APIv2 to get tweet data.
