# Best way to implement server-side singleton?

**URL:** https://discourse.paraview.org/t/best-way-to-implement-server-side-singleton/3415
**Category:** Development
**Created:** [January 27, 2020, 1:18pm UTC](https://discourse.paraview.org/t/best-way-to-implement-server-side-singleton/3415 "2020-01-27T13:18:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jondo2010](https://discourse.paraview.org/user_avatar/discourse.paraview.org/jondo2010/32/2840_2.png) [@jondo2010](https://discourse.paraview.org/u/jondo2010)
#### Post date: [January 27, 2020, 1:18pm UTC](https://discourse.paraview.org/t/best-way-to-implement-server-side-singleton/3415/1 "2020-01-27T13:18:28Z")

</div>

Hi, I’m working on a set of custom data sources and would like to have something that behaves like a SMProxy, but results in only **one** server-side instance of the VTKObject at runtime. Where would be the best place to do this? In my vtkObject-derived class, or maybe a custom SMProxy?

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [January 27, 2020, 1:23pm UTC](https://discourse.paraview.org/t/best-way-to-implement-server-side-singleton/3415/2 "2020-01-27T13:23:00Z")

</div>

A vtkObject-derived class would be my vote. `vtkPVGeneralSettings` may be a good example to look at as an option.
