The right way to create such an resource depends on who should update the resource (cpu or gpu) and how often you want to do it.