paust-team / pirius

Stream Delivery Network
GNU General Public License v3.0
8 stars 3 forks source link

Change ordering process between broker and consumer #119

Closed code-to-gold closed 1 year ago

code-to-gold commented 3 years ago

For now, the broker is in charge of data ordering. The broker seeks published data and makes the correct order, and send it to consumers. But this design incurs lots of seeking. Furthermore, since UDP does not guarantee the packet order, it only suits TCP. The main actor of data ordering should be the consumer. To implement this, before pushing data to the consumer's subscribing channel, a small buffer to temporarily storing data is needed. If the offset of data is in order then data have to be pushed to subscribing channel.

elon0823 commented 1 year ago

We plan to change the overall structure with a P2P-based design.