On Wed, Oct 3, 2018 at 4:14 AM Tim Ward <tim.w...@paremus.com> wrote:
> Hi Alain, > > Using EventAdmin disconnects the consumers from the producer in a way > which prevents any back-pressure from being applied, although in this case > it seems as though absolute back pressure may not be very helpful, as you > can’t make the commits come in more slowly. > That's what I felt. I agree with commit back-pressure management which is probably not feasible in any/most cases. Was still interested in integration patterns between EventAdmin and PushStreams. > > One thing that you could do is to use PushStreams inside your event > handlers to do some buffering and parallel processing. For example, when an > Event comes in you could push it into a SimplePushEventSource with a > buffer. Your push stream pipeline can then process up to N requests in > parallel, using the buffer to “hold” events if too many come in in one go. > Thanks for the tip here. > > Did you have any thoughts about anything else that you might want to do? > So many things to do :), not sure I fully grasp the question, in which regard? > > > > On 1 Oct 2018, at 11:30, Alain Picard via osgi-dev < > osgi-dev@mail.osgi.org> wrote: > > > > We are using a number of Event Handlers to handle post-commit updates to > notifications, metrics, search, etc. > > > > A number of those process can be somewhat lengthy, such as email or SMS > notifications. For search, we have build our ElasticSearch to use the async > mode with Promises. > > > > As is documented in 113.8.2, we should not stall our handlers, so I am > looking for guidance on how best to integrate push streams with Event > Handlers (if that is the right approach) and how can any type of back > pressure can be applied given the disconnected nature of Events. > > > > Thanks > > Alain > > > > _______________________________________________ > > OSGi Developer Mail List > > osgi-dev@mail.osgi.org > > https://mail.osgi.org/mailman/listinfo/osgi-dev > >
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev