1

My app maintains the state of a bunch of objects with variables.

I'm using Twisted to accept socket requests and return the properties of an object.

I want to make sure the app can scale for a lot of requests so I'm wondering if I should deliver the object properties directly from the objects, or if I should store those properties in memcached or something similar, and have the requests read from that store.

I just wasn't sure if lots of requests reading the same object values would affect the performance of the part of the app that is managing those objects.

Am I over thinking it?

ypercubeᵀᴹ
  • 113,259
  • 19
  • 174
  • 235
Coder1
  • 13,139
  • 15
  • 59
  • 89

2 Answers2

0

I don't think you have any performance penalty because of having many reading operations from the same object (only one thread is executed at a time after all).

jcollado
  • 39,419
  • 8
  • 102
  • 133
0

I think either you create an selfCreatedObject or using a memcached once, it will be an instance of python objects, like list or dict or anything else so the two ways are to same destination. I prefer to use object so you can make a check the change of the object value or validate it if needed.

wtayyeb
  • 1,879
  • 2
  • 18
  • 38