Imagine the following (very concrete) model: We have a series of random variables $x_k$ with values in $\lbrace 0, 1\rbrace$. We assume $x_k \mid p_k \sim \operatorname{Alt}(p_k),$ where $p_0 \sim R(0,1)$ has uniform distribution on interval $[0,1]$ and $p_k$ for $k>0$ is defined as $p_k = \sigma(\operatorname{logit}(p_{k-1}) + \varepsilon_k),$ where $\varepsilon_k \sim \mathcal{N}(0,1)$ are normally distributed independent errors and $\sigma, \operatorname{logit}$ are the logistic resp. logit functions.

We observe only $x_0, \dots, x_n$ and the goal is to get the posterior distribution of $p_n$. Now it is quite straightforward to write down the prior and likelihood of this model, thus we have the unnormalized posterior from which we can sample using some MCMC algorithm.

Now the problem is that in my case (and I guess in many other general cases) I get the observations in real time / online and I would like to have this distribution for each incoming observation (and I would like to have it fast). Is there some method to that can do this efficiently for example by reusing some previously calculated samples?

Naive approach would be for example this: Imagine I want 1000 samples of the posterior in total, if I get a new observation, I could throw away 100 samples from the ones I calculated in the previous step and replace them with 100 calculated using the last observation.