JaewookByun / epcis

Oliot EPCIS for GS1 EPCIS/CBV 2.0.0
http://dfpl.sejong.ac.kr/epcis/home/index.html
Apache License 2.0
46 stars 56 forks source link

[Feature request] Non-repeating events in subscription query #65

Closed mikk-leini-krakul closed 2 years ago

mikk-leini-krakul commented 2 years ago

When subscribing to EPCIS events with periodic schedule, same events are posted over and over again. This is unpractical because the receiver must filter out the already received events and the posted data grows bigger and bigger over time. Alternative option is to unsubscribe and re-subscribe after every query or once in a while. Both options are bad.

GS1 EPCIS standard 1.2 has a non-normative implementation suggestion in chapter 8.2.5.2 Automatic limitation based on event record time:

Explanation: one possible implementation of this requirement is that the EPCIS service maintains a minRecordTime value for each subscription that exists. The minRecordTime for a given subscription is initially set to initialRecordTime, and updated to the current time each time the query is executed for that subscription. Each time the query is executed, the only events considered are those whose recordTime is greater than or equal to minRecordTime for that subscription.

Suggestion to implement it with one addition - only update the minRecordTime when recipient confirms the reception of the query with HTTP response code 200 (OK). If request isn't confirmed, repeat the query with same events.

JaewookByun commented 2 years ago

Dear @mikk-leini-krakul ,

Thank you for your interest and suggestion on Oliot EPCIS. In Oliot EPCIS v1.2, the feature is implemented with initialRecordTime. If you 'provide' initialRecordTime and reportIfEmpty=false both. Inside system, the initialRecordTime is set to the latest notification time in each period. which means that you don't get same events twice.

Please note this github repo. is now on just maintenance phase because Auto-ID Labs, Korea/Sejong Univ. (https://sites.google.com/view/jack-dfpl/home) is now finalizing EPCIS v2.0 implementation and plan to open after the standard ratification and paper submission.

You can enjoy the client pages for educational and research purpose on (http://dfpl.sejong.ac.kr/epcis/home/index.html)

Thank you for your interest again!

mikk-leini-krakul commented 2 years ago

Hello @JaewookByun Thank you for the explanation. I got the initialRecordTime updating. But the additional suggestion - to only update time when receiver confirms the reception with HTTP OK ? Could this be added?

JaewookByun commented 2 years ago

Dear @mikk-leini-krakul , That is a quite practical suggestion. We would consider the idea by updating initialRecordTime or minRecordTime if getting HTTP OK in Oliot EPCIS X. Thank you so much