# Need to get a valid controller for client-server communication

**URL:** https://discourse.paraview.org/t/need-to-get-a-valid-controller-for-client-server-communication/879
**Category:** Development
**Created:** [November 10, 2018, 10:44am UTC](https://discourse.paraview.org/t/need-to-get-a-valid-controller-for-client-server-communication/879 "2018-11-10T10:44:30Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Patrick](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/b2d939/32.png) [@Patrick](https://discourse.paraview.org/u/Patrick)
#### Post date: [November 10, 2018, 10:44am UTC](https://discourse.paraview.org/t/need-to-get-a-valid-controller-for-client-server-communication/879/1 "2018-11-10T10:44:30Z")

</div>

Hello again,  
as I wrote yesterday, I am trying to communicate between a server side object and its client proxy.

I want to simplify my question: How do I get a valid controller on the client that is responsible for client-server communication?  
I tried the following:  
vtkMultiProcessController \*ctrl=vtkProcessModule::GetProcessModule()-\>GetGlobalController();  
But the result is always ctrl==NULL, be it a builtin session, a connection to a remote server, sequential or MPI run.

How do I get a valid controller? The controller is needed to react to RMI requests.  
Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 12, 2018, 9:32am UTC](https://discourse.paraview.org/t/need-to-get-a-valid-controller-for-client-server-communication/879/2 "2018-11-12T09:32:03Z")

</div>

(I’ve moved the topic to development)

Are you connected to a server ? in this case this should work :  
`vtkMultiProcessController* globalController = vtkMultiProcessController::GetGlobalController();`

---

<div class="post-metadata">

### Author: ![Patrick](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/b2d939/32.png) [@Patrick](https://discourse.paraview.org/u/Patrick)
#### Post date: [November 12, 2018, 6:16pm UTC](https://discourse.paraview.org/t/need-to-get-a-valid-controller-for-client-server-communication/879/3 "2018-11-12T18:16:06Z")

</div>

Thank you, Mathieu,  
both your solution  
`vtkMultiProcessController::GetGlobalController()`  
and what I tried before:  
`vtkProcessModule::GetProcessModule()->GetGlobalController()`  
seem to work. I have no idea, what was wrong with my setup before, when I got NULL pointers. Sorry for that.
