What is the difference between two ways of getting data from server?

Hello!

What is the difference between “ClientServerMoveData” filter and algorithm->GetOutputDataObject(0) ?

What is the difference between

  auto sourceProxy = pqActiveObjects::instance().activeSource()->getProxy();
  auto algorithm = sourceProxy ? vtkAlgorithm::SafeDownCast(sourceProxy->GetClientSideObject()) : nullptr;
  auto dataset = algorithm ? vtkDataSet::SafeDownCast(algorithm->GetOutputDataObject(0)) : nullptr;

and

using vtkSrcPrxyPtr = vtkSmartPointer<vtkSMSourceProxy>;
  vtkSrcPrxyPtr filter{};
  vtkSmartPointer<vtkDataSet> dataSet{};
  auto proxyManager = vtkSMProxyManager::GetProxyManager()->GetActiveSessionProxyManager();
   int sourcePortNumber = 0;

  if (source && (filter = vtkSrcPrxyPtr::Take(vtkSMSourceProxy::SafeDownCast(proxyManager->NewProxy("filters", "ClientServerMoveData")))))
  {
    if (auto inputProperty = vtkSMInputProperty::SafeDownCast(filter->GetProperty("Input")))
    {
      inputProperty->RemoveAllProxies();
      inputProperty->AddInputConnection(source, sourcePortNumber);
    }
    vtkSMPropertyHelper{ filter, "OutputDataType" }.Set(VTK_POLY_DATA);
    filter->UpdateVTKObjects();

    sourcePortNumber = 0;
  }

  if (filter)
  {
    filter->UpdatePipeline();
    dataSet = vtkDataSet::SafeDownCast(vtkAlgorithm::SafeDownCast(filter->GetClientSideObject())->GetOutputDataObject(sourcePortNumber));
  }

This first is server side code to recover the output data of a filter,
the second is client side code to reover the output data of a filter that is running server side.