A method performed by at least one processor, the method comprising: obtaining , by a workflow manager, a network based media processing NBMP, workflow including a plurality of workflow tasks and a plurality of proximity parameters which are numbers indicating a plurality of desired distances between all of the plurality of workflow tasks and all of a media source, a media sink and other entities, the other entities including at least one cloud element or network element; assigning the plurality of workflow tasks to the media sink, the media source, and the at least one cloud element or network element, based on the plurality of desired distances; wherein the assigning is the one that optimizes splitting of the workflow, wherein the optimizing comprises calculating the average distance of all tasks of the workflow, selecting the workflow as the optimal one if the workflow has the minimum average distance, and assigning the plurality of workflow tasks of the workflow based on the minimum average distance; wherein a p-norm distance is used for calculating the average distance, the p-norm distance being pd = ∑ i = 0 n − 1 d i p 1 p , wherein di is the distance of task i to the sink and source that is allocated to, for all tasks in the workflow; managing the NBMP workflow according to the assigned plurality of workflow tasks; wherein the managing includes managing the assigned plurality of workflow tasks of the NBMP workflow by sending a message to one or more of the media processing entities, the message includes a message causing the workflow to be performed; wherein based on the desired distance being 0, the workflow task is intended to be executed by the at least one of the media source or the media sink; wherein based on the desired distance being infinite, the workflow task is unable to be executed by the at least one of the media source or the media sink. obtaining , by a workflow manager, a network based media processing NBMP, workflow including a plurality of workflow tasks and a plurality of proximity parameters which are numbers indicating a plurality of desired distances between all of the plurality of workflow tasks and all of a media source, a media sink and other entities, the other entities including at least one cloud element or network element; assigning the plurality of workflow tasks to the media sink, the media source, and the at least one cloud element or network element, based on the plurality of desired distances; wherein the assigning is the one that optimizes splitting of the workflow, wherein the optimizing comprises calculating the average distance of all tasks of the workflow, selecting the workflow as the optimal one if the workflow has the minimum average distance, and assigning the plurality of workflow tasks of the workflow based on the minimum average distance; wherein a p-norm distance is used for calculating the average distance, the p-norm distance being pd = ∑ i = 0 n − 1 d i p 1 p , wherein di is the distance of task i to the sink and source that is allocated to, for all tasks in the workflow; managing the NBMP workflow according to the assigned plurality of workflow tasks; wherein the managing includes managing the assigned plurality of workflow tasks of the NBMP workflow by sending a message to one or more of the media processing entities, the message includes a message causing the workflow to be performed; wherein based on the desired distance being 0, the workflow task is intended to be executed by the at least one of the media source or the media sink; wherein based on the desired distance being infinite, the workflow task is unable to be executed by the at least one of the media source or the media sink. <EOS>