Replies: 6 comments 25 replies
-
I think you can add them to
So that the original user data of Stream type (without these new fields) will be read and written normally. |
Beta Was this translation helpful? Give feedback.
-
I was thinking about the implementation some time ago. I'll write my opinion later. However, I think that the read/write patterns of the information about consumer groups should also be taken into account. |
Beta Was this translation helpful? Give feedback.
-
@Yangsx-1 vector/unordered_map/other_container is just a C++ representation. I'm not sure you will be operating with exactly those containers. I think the more important thing is the choice of how to store consumer groups, consumers and related data in RocksDB (since we will not keep all the data in memory like Redis; we will read/write a sufficient amount of data when executing commands). Since each consumer group (CG) has its metadata/state and even every consumer has its metadata/state and most commands that operate on CG are changing the state of CG, I tend to store the CG's state separately from the stream's metadata. The PEL (pending entry list) of each CG should be stored in a way that gives us the ability to quickly:
One question is whether we need to lock the stream when executing write operations on one of its CGs? |
Beta Was this translation helpful? Give feedback.
-
Here are my designs for storing consumer group, consumer and PEL. For consumer group: For PEL: Is this design ok? @git-hulk @PragmaTwice @torwig |
Beta Was this translation helpful? Give feedback.
-
We can do like that, but the subkey maybe a little long. If we store them together, the subkeys and values may be as follows:
May be 3 and 4 can be encoded together, like Is this ok? @git-hulk @PragmaTwice @torwig |
Beta Was this translation helpful? Give feedback.
-
Hi good engineers, @Yangsx-1 @git-hulk @torwig I tried to make sense of this discussion but following it and reading the encoding article here, can someone explain / point me to a resource which could elaborate on
Thank you |
Beta Was this translation helpful? Give feedback.
-
Discussion about issue #1586
I'm now working on adding consumer group in stream.
The relevant structures are listed below, referring to redis:
Here are some questions:
1.Is it proper to add
StreamCG
inStreamMetadata
?2.If it's ok to add it to
StreamMetadata
, how can i encode the metadata? Is there any compatibility issues in encoding complex data structure?3.If not proper, i can try to store consumer group separately. I'm not sure if there's an encoding issue here.
Beta Was this translation helpful? Give feedback.
All reactions