curious how people are feeling about caching the o...
# contributing-to-airbyte
c
curious how people are feeling about caching the output of getSpec. it feels like having to run a worker for most api actions now because it depends on getting the spec from the integration image slows stuff way down.
u
it feels early for us to be worried about caching.
u
but it’s also slow.
u
i’m on the fence.
u
It’s probably inevitable that we’ll want to add caching for this? If it’s slow with our internet it’s probably slower for many others
u
i don’t think it’s an internet thing, i think it’s just that the minimum latency on the worker to do anything is higher than your average API call.
u
I mean about the first time you pull an image to run the spec job
u
yeah. i just think we might be talking about two different things. 1. you’re talking about the cost of pulling down the image. 2. i’m talking about the latency of any api call that relies on the spec (because it has to wait for the worker to run)
u
it might also be something we do upon creation of the connector.
u
caching the spec that is
u
if we assume it is fixed
u
we just run the job once when we try to add any connector to the persistence (standard or custom) and store that
u
yeah… haven’t thought of a solution that sounds good yet. as soon as someone tries to change the spec and they receive a stale cached version we’re going to hate our solution.
u
oh. i like your last ide.a
u
then the spec can be stored alongside the connector def if we want
u
What happens if the image upgrades though?
u
I guess when do we know the cache needs to be cleared?
u
the main assumption we’d be making is that the spec is fixed for a given docker image/version. the “expected behavior” then would be to get and store the spec any time you receive a new image/version combo
u
so if we're developing on a
dev
image for example we'd need to either disable caching or clear it somehow?
u
yeah we’d need to somehow “reload” it for dev images that are changing. This being said i don’t think this is an immediate action item
u
The caching
u
It's generally problematic how high latency all of the docker image interactions are
u
It makes the app feel clunky and slow
u
not just the spec
u
it isn't close to that latency running directly on the command line
u
yeah, but that’s because you don’t have the worker polling step in there.
u
makes sense that cli is faster.
u
we should be able to speed that up somehow