Open dmtrjsg opened 1 year ago
@bedeho
PS: Running some sort of Orion block level processor def. is not a good idea from past exprience with Hydra
can you please specify what was the main approach in that case
can you please specify what was the main approach in that case
This was my initial remark above, what do you think of it? ping me if you don't hear back.
This could be done in many ways, but one simple way is for Orion to have a (private, i.e. not queryable by front-ends) entiy for Auction ending notifications. The blockchain processor is responsible for adding new notifications when an auction is created, and also cleaning up if an auction is prematurely halted or stopped (I don't even remember if this is possible), or the video/channel is deleted or osmething. On the flip-side, you have the mailing service which queries this table at relatively low intervals, say every x minutes or whatever, and removes events that have expired but where not removed before that time. It then consturcts the relevnt email and in-app notifications (these are distinct) representations. This second process should obviously be asynchronous to the first, and also not block the processor in any way in terms of database access. I am sort of hand waving a bit here, because I don't know how the general email notification archtecture is supposed to work. There are solid best practices on how to do that, so perhaps that is the best place to start even before pinning down how to power event-free notifications.
@dmtrjsg commented on Fri Feb 24 2023
Objective
Inform users about timed auction ended so it can be settled.
Runtime constraints | It's not possible to do it on the runtime side, it will require at each block to:
If you would like to know the ending block for an english auction, it can be fetched from the english auction info, as it contains start block + duration
@dmtrjsg commented on Mon Jun 12 2023
@ignazio-bovo could you remind us if that is still out of question for implementation? Since we are attempting the notifications implementation we'd love to have this.. with the new Orion architecture maybe that could be included to our scope?
cc @bedeho @Lezek123
@bedeho commented on Mon Jun 12 2023
Yes, it is correct that its not possible to emit a runtime event, but that does not mean that Orion cannot detect such a milestone, because it already knows all the scheduling information. This could be done in many ways, but one simple way is for Orion to have a (private, i.e. not queryable by front-ends) entiy for Auction ending notifications. The blockchain processor is responsible for adding new notifications when an auction is created, and also cleaning up if an auction is prematurely halted or stopped (I don't even remember if this is possible), or the video/channel is deleted or osmething. On the flip-side, you have the mailing service which queries this table at relatively low intervals, say every x minutes or whatever, and removes events that have expired but where not removed before that time. It then consturcts the relevnt email and in-app notifications (these are distinct) representations. This second process should obviously be asynchronous to the first, and also not block the processor in any way in terms of database access. I am sort of hand waving a bit here, because I don't know how the general email notification archtecture is supposed to work. There are solid best practices on how to do that, so perhaps that is the best place to start even before pinning down how to power event-free notifications.
@bedeho commented on Mon Jun 12 2023
PS: Running some sort of Orion block level processor def. is not a good idea from past exprience with Hydra.
@dmtrjsg commented on Mon Jun 19 2023
Assigning to @ignazio-bovo to investiage as part of the notifications.. Moving this to Orion repo.