<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gil Vernik on Medium]]></title>
        <description><![CDATA[Stories by Gil Vernik on Medium]]></description>
        <link>https://medium.com/@gvernik?source=rss-f4d3c382706------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*m_WvCPEtzhuYQA8H</url>
            <title>Stories by Gil Vernik on Medium</title>
            <link>https://medium.com/@gvernik?source=rss-f4d3c382706------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:21:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gvernik/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Simplify the developer experience with OpenShift for Big Data processing by using Lithops framework]]></title>
            <link>https://medium.com/@gvernik/simplify-the-developer-experience-with-openshift-for-big-data-processing-by-using-lithops-framework-d62a795b5e1c?source=rss-f4d3c382706------2</link>
            <guid isPermaLink="false">https://medium.com/p/d62a795b5e1c</guid>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[lithops]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[openshift]]></category>
            <dc:creator><![CDATA[Gil Vernik]]></dc:creator>
            <pubDate>Fri, 17 Sep 2021 09:44:51 GMT</pubDate>
            <atom:updated>2021-09-24T19:10:50.082Z</atom:updated>
            <content:encoded><![CDATA[<p><em>To reduce developers’ efforts and allow them to focus on their business logic, we introduce the Lithops framework — designed to simplify integrating code with OpenShift while providing advanced capabilities.</em></p><p>Serverless computing is a widely popular topic attracting attention from both industry and academia. The unique user experience of being able to deploy applications without having to manually set up VMs or choose required resources is what makes serverless so attractive. Obviously, this does not mean there are no servers behind the scenes. It simply means users don’t need to worry about servers anymore. As serverless computing continues to grow, so application containers like <a href="https://www.docker.com/">Docker</a> are becoming a popular choice for packaging software, while <a href="https://kubernetes.io/">Kubernetes</a>-based platforms are being widely used to scale containers across distributed clusters.</p><p>This blog targets developers who need to containerize their applications to scale them over Kubernetes clusters. We discuss the efforts required to containerize an application and how to deploy it to the Kubernetes platform. To address the challenges, we introduce an open source Lithops framework that provides an easy “push the button” move to Kubernetes. Developers can focus on their code, while Lithops knows how to containerize the code and deliver it to the Kubernetes cluster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wrtJFuHRjjisbbsU90jsTA.jpeg" /></figure><h3>The road to OpenShift</h3><p><a href="https://www.redhat.com/en/technologies/cloud-computing/openshift">Red Hat OpenShift</a> is the leading enterprise-ready container engine. It is based on Kubernetes and is capable of massively scaling and executing Docker containers. It can be installed on premise, in the cloud, or used in hybrid solutions. While all this sounds promising, it’s still a non-trivial task for developers to containerize their software and deploy it to OpenShift. We now discuss some of the challenges developers may face when moving to OpenShift.</p><h3>The learning curve of APIs</h3><p>Developers who need to use OpenShift need to choose either <a href="https://knative.dev/docs/reference/api/serving-api/">Knative API</a>, <a href="https://openwhisk.apache.org/">OpenWhisk</a> API, or K8’s job descriptor API. In each case, they need to learn new API semantics, perhaps use different third-party SDKs, or even use a REST API. The learning curve, while not complicated, still consumes time and requires skills to tune the application for the optimal usage.</p><h3>To package the code or not to package?</h3><p>While Docker is a popular choice to contain applications and their dependencies, it is not trivial to find the right way to execute the proprietary code in the container image. If the code is packed in the Docker container, then using the public Docker hub could be problematic for proprietary code. Private container registries may resolve this, but this adds another layer of complexity to set up and maintain private registries, share containers, and so on.</p><h3>Decide on the right scale</h3><p>While OpenShift is designed to scale any number of containers, it can be difficult to decide how many invocations a certain workflow requires, when the input dataset is located in the persisted storage. This becomes even more challenging if each invocation needs to process a different subset of the input data and perhaps generate different output, which needs to be collected. For example, consider code that need to pre-process a large CSV file and generate a new processed dataset. In this scenario, each OpenShift invocation need to process a different chunk from the input CSV file and persist the results into persistent storage, like <a href="https://docs.ceph.com/en/pacific/">CEPH</a> or <a href="https://cloud.ibm.com/objectstorage/create">cloud object storage</a>. To support such a scenario, the developer will need to write the boiler plate code to partition the input dataset into chunks and then process them in parallel. The developer will also need to address how to enable each invocation to process a particular chunk, how to coordinate results from the invocations, where to persist the results, how to collect them, etc. While all the above are solvable, there is a lot of effort that goes into implementing everything and then perform testing.</p><h3>Authentication with external resources</h3><p>When OpenShift invocation needs to access an external service and perform authentication, this could add more complexity that needs to be handled. Consider thousands of invocations, where each needs to set up a connection to access an object storage. In this case, each invocation will perform authentication. But, if thousands of invocations do it simultaneously, it is more likely that the object storage provider will throttle the requests. To resolve this, code needs to authenticate once and share tokens among invocations. This adds another implementation complexity: how to share tokens, how to re-authenticate when a token expires, and so on.</p><h3>Make it simpler with Lithops</h3><p>Tackling the above challenges requires a lot of effort by developers — and this is on top of creating the actual business logic of their applications. This situation could eventually force developers to implement a sort of middle-framework, if only to assist them in deploying their applications to the OpenShift cluster. To reduce these efforts and enable developers to focus on their business logic, we introduce the <a href="https://github.com/lithops-cloud/lithops">Lithops</a> framework. It’s designed to greatly reduce developers’ efforts and provide them with advanced capabilities for integrating their code with OpenShift. The following example demonstrates how <a href="https://github.com/lithops-cloud/lithops">Lithops</a> simplifies deployment to OpenShift.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQCf2t3L953_wE84R1ZSuw.png" /></figure><p>Using <a href="https://github.com/lithops-cloud/lithops">Lithops</a> eliminates the need to learn Knative API, learn how to invoke executions where each execution receives a single parameter from input dataset, how to collect results, etc. <a href="https://github.com/lithops-cloud/lithops">Lithops</a> exposes Python’s feature API and the Python multiprocessing API. It also supports various backends. For example, if there is no Knative and a developer wishes to use the standard Kubernetes API, the only required change would be to change the backend</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4PAY-0WF1xaX0eB8ADwPrw.png" /></figure><p><a href="https://github.com/lithops-cloud/lithops">Lithops</a> also contains an advanced data partitioner that supports various data types as well as the chunking of CSV files. For example, if the data is located in IBM Cloud Object Storage and each invocation needs to process a single file, the code would look as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*85fT9ypVgeBBEC6Bqo4BjA.png" /></figure><p>The <a href="https://github.com/lithops-cloud/lithops">Lithops</a> partition discovery will automatically assign each invocation a single object from the given URI, hiding all object storage semantics from the developer. Internally, <a href="https://github.com/lithops-cloud/lithops">Lithops</a> performs authentication and token re-share, and hides all the complexity associated with accessing object storage.</p><h3>Summary and next steps</h3><p>While OpenShift is a great platform on which to massively scale Docker containers, we learned that it may require a substantial effort to adapt the application or code before using OpenShift efficiently for big data processing. We saw how <a href="https://github.com/lithops-cloud/lithops">Lithops</a> can greatly reduce the amount of work required by developers to integrate and benefit from OpenShift. You can easily try it out to see all the benefits by yourself. Setup <a href="https://github.com/lithops-cloud/lithops">Lithops</a>, <a href="https://github.com/lithops-cloud/lithops/blob/master/config/README.md#compute-and-storage-backends">configure</a> Knative or K8s Jobs API and checkout how <a href="https://github.com/lithops-cloud/lithops">Lithops</a> simplifies your developer experience. You are welcome to start with <a href="https://github.com/lithops-cloud/applications">applications</a> and <a href="https://github.com/lithops-cloud/lithops/tree/master/examples">examples</a>. In the next blogs, we will further demonstrate the value Lithops provides for developers to use OpenShift or even hybrid clouds for their workloads.</p><p>Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d62a795b5e1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Accelerating object storage processing for Ray framework]]></title>
            <link>https://medium.com/codeflare/accelerating-object-storage-processing-for-ray-framework-f581863c7662?source=rss-f4d3c382706------2</link>
            <guid isPermaLink="false">https://medium.com/p/f581863c7662</guid>
            <dc:creator><![CDATA[Gil Vernik]]></dc:creator>
            <pubDate>Thu, 15 Jul 2021 13:52:13 GMT</pubDate>
            <atom:updated>2021-07-15T13:52:13.868Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://ray.io/">Ray</a> is a distributed execution framework that makes it easy to scale computing applications. Originally created at UC Berkley, Ray was designed to address deep learning and machine learning workloads, while providing a “serverless” user experience. Ray clusters can be started locally, over virtual machines, Kubernetes, or on cloud platforms. For example, you can have Ray over the <a href="https://www.ibm.com/cloud/blog/ray-on-ibm-cloud-code-engine">IBM Cloud Code Engine</a>.</p><p>A growing ecosystem of libraries on top of Ray allows users and developers to use SQL or data frames over data that is stored in object storage (e.g., IBM Cloud Object Storage, Amazon S3, etc.) For example, Modin, Dask, and even Apache Spark now support integration with Ray and their data pre-processing capabilities can be exploited before the core Ray computations. However, <a href="https://www.ibm.com/cloud/blog/decoding-dark-molecular-matter-in-spatial-metabolomics-with-ibm-cloud-functions">in certain cases</a>, users may have proprietary code, packages, or software that doesn’t naturally fit into Dask, Modin or Apache Spark execution model. As more workloads start to leverage and benefit from Ray, those requirements need to be addressed as well. In this blog, we discuss the challenges in applying Ray computation on object storage data and demonstrate how the <a href="http://lithops.cloud/">Lithops</a> framework can used within a Ray application to simplify data handling. All the code used in this blog and additional documentation can be found under the <a href="https://github.com/project-codeflare/data-integration">CodeFlare</a> project.</p><h3>Ray and object storage­</h3><p>Let’s start with an example of images stored in the IBM Cloud Object Storage and assume we want to extract the colors of each image, along with its dominant color range. Having the colors will enable us to run various deep learning algorithms, like the one described in the “<a href="https://www.youtube.com/watch?v=8GTd8Y_JGTQ&amp;list=PLzTswPQNepXlr2L75tZt7l8tyVZkO-RVt">Movie recommendation system</a>” keynote talk at the Ray Summit 2020.</p><p>We initially write ­­­a helper function that reads a single image from the object storage and extracts its colors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*xRtVsZxiGqXgTrJP_C3-kw.png" /></figure><p>Next, we write a Ray task that, once invoked, will invoke extract colors function, identify the dominant color range, and return the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*hwGsS53SQm7UUK4stR5qAQ.png" /></figure><p>Now let’s implement the main method that lists the images in the bucket and submit our Ray task for a single image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*WgFZTls5DYZwWNDQVGCwRg.png" /></figure><h3>Deep dive into the example</h3><p>While the code above is simple enough, it demonstrates some challenges for the developer. First of all, the developer needs to be familiar with object storage semantics. For example, we need to use paginator to list objects in a bucket, since a single response is usually limited to 1000 entries. Moreover, each Ray task will initiate an object storage connection and perform authentication. Thus, if there are 100K images, there will be 100K tasks: each will set up a new object storage connection and perform the authentication. In such a scenario, a cloud vendor is more likely to throttle (ignore) requests due to a large number of concurrent authentication requests.</p><p>To address the authentication issue, developers can potentially implement a Ray actor and share a token between tasks. But, this involves much more effort when it comes to writing boiler plate code. The “boiler plate” code will have to list and read objects, and will grow even larger if data is stored in other storage locations, like Amazon S3, Azure, Google, CEPH, etc. This essentially forces users to be aware of the different storage backend implementations and APIs, and write more code.</p><p>Clearly, an efficient method for object storage access requires significant effort by the developer. This is exactly where the <a href="http://lithops.cloud/">Lithops</a> framework can be leveraged within Ray to significantly simplify data access and handling for Ray applications.</p><h3>Data adapters for Ray</h3><p>Lithops framework is designed to address two main challenges: deploy and execute user code on a massive scale against any serverless backend, and enable user applications to process large volumes of data, especially when data is persisted in the object storage. As part of CodeFlare effort, we focus on enabling and leveraging Lithops&#39; data loading and processing features to simplify data handling within a Ray context. Lithops has been recently extended to provide native support for Ray, where Lithops uses a Ray cluster as its compute backend. It currently supports IBM Cloud Object Storage, Amazon S3, Google Cloud Storage, Azure Blob Storage, Ceph, and others.</p><figure><img alt="Namibia" src="https://cdn-images-1.medium.com/max/1024/1*QwD0zzz3f2NHXGlKmofPtw.png" /></figure><h3>Leveraging Lithops within Ray</h3><p>Now let’s see how <a href="http://lithops.cloud/">Lithops</a> can help in our example. We need to modify the extract_color function by removing all the object storage semantics. Instead of using boto3 directly, we let Lithops inject a reference to the data object, hiding all boto3 object storage semantics from the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*I4aDEiSRxaJpW1CihorO3g.png" /></figure><p>At runtime, Lithops will fill in the value of the `obj` with a reference to the actual data. This reference has two properties: ‘obj.key’ is the data object name and ‘obj.data_stream’ is a data stream to the actual data in the object storage bucket. More information on the ‘obj’ can be found <a href="https://github.com/lithops-cloud/lithops/blob/master/docs/data_processing.md#processing-data-from-a-cloud-object-storage-service">here</a>.</p><p>We make a small modification to the Ray task. Instead of a direct call to extract_color, Lithops is being used behind the scenes (through the data object) to call it only at the right moment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*_3pU4EClePwagPE6oUNMEw.png" /></figure><p>Let’s tie it all together with a main method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*pLRexhRfusIuy46aTb7gIA.png" /></figure><p>By enabling Lithops within Ray, we are able to remove all the boiler plate code required to list data from the object storage. It also inspects the data source by using the internal Lithops data partitioner and creates a lazy execution plan, where each entry maps an “extract_color” function to a single image. Moreover, Lithops creates a single authentication token that is used by all the tasks, instead of letting each task perform authentication. The parallelism is controlled by Ray and once Ray task is executed, it will call Lithops to execute the extract_color function directly in the context of the calling task. Thus, by using Lithops, we can allow code to access object storage data, without requiring additional coding effort from the user.</p><h3>Summary</h3><p>By enabling Lithops within Ray, we just saw how we can hide all storage semantics and enable Ray users to focus on the business logic, rather than on the boiler plate code required to access underlying storage. Since Lithops supports various storage backends, a simple URI scheme change will allow it to access other storage vendors, such as Amazon S3, which uses “s3://”, and so on. <a href="https://github.com/lithops-cloud/lithops/blob/master/config/README.md#compute-and-storage-backends">Here</a> you can see the supported storage backends and how to configure them. Lithops also supports the chunking of data that resides in big CSV files without breaking lines in the middle. This enables Ray tasks to process chunks of data, instead of loading an entire CSV file into a single task or actor.</p><h3>Next steps</h3><p>We plan to publish more blogs and tutorials showing how Lithops can use Ray as its backend compute engine. We will also explain how to use Ray actors, how to reduce the number of Ray tasks, and even demonstrate how Lithops can be leveraged to reduce overload on the entire Ray cluster, while helping to enable a hybrid cloud experience for Ray use cases.</p><p>Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f581863c7662" width="1" height="1" alt=""><hr><p><a href="https://medium.com/codeflare/accelerating-object-storage-processing-for-ray-framework-f581863c7662">Accelerating object storage processing for Ray framework</a> was originally published in <a href="https://medium.com/codeflare">CodeFlare</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>