Introduction to the task model
Creating a task application for Golem requires a bit of planning and understanding of how the system works. In this guide, we'll go over the basics of designing and implementing a task application for Golem.
Understanding the Problem Space
First, you'll need to think about your computational problem in terms of parallel execution. It's important to visualize your problem and determine how it can be divided into smaller, independent fragments that can be processed by multiple providers.
For example, let's say you have a large dataset that needs to be processed. Instead of having a single machine process the entire dataset, you can break it up into smaller chunks and have multiple providers work on each chunk simultaneously.
Dividing the Problem into Fragments
Once you have a clear understanding of how your problem can be divided, you'll need to find a way to divide the whole problem into fragments. Each fragment should be a distinct part of the whole and may be processed by a different provider, independently from other fragments.
It's worth noting that the number of fragments doesn't need to match the number of provider nodes commissioned to perform the tasks. The Task API will spawn activities on multiple providers as long as there are providers available and up to the number of fragments or the limit specified by the
Designing the Application
In order to proceed further, you'll need to design your application in such a way that it can:
- Translate the problem fragments into input and output files that can be processed independently on each of the provider nodes.
- Combine the individual outputs into the final solution of the problem at hand.
Creating a VM Application for Golem
When it comes to the implementation itself, any VM-based application for Golem is made up of two components:
- A Docker image that will run as a container on providers.
With these pieces in place, you should be able to create a functional task application for Golem.
Now you know what a Golem VM application is and how it works.