tarantool / tarantool/tarantool
PRBuf doesn't allow to write msgpack directly
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 3.7k
- Forks
- 419
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 88
Description
PRBuf (partition ring buffer) has now two stages API: prepare and commit; and you have to know exact size of record in prepare. That approach has a drawback when you need to build something complex, for example assemble msgpack stream from structured data. To build it we have either precalculate the size of result record (which is ugly) or build that stream in some other buffer and copy to PRBuf afterwards (which requires another buffer and additional copy).
It seems that we could create something like reserve-alloc API or add some streaming operations in PRBuf.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the PRBuf prepare and commit API, then trace how structured data is serialized into a msgpack stream. Compare a reserve-allocation approach with streaming operations, and define completion by allowing msgpack to be written directly without precalculating its size or using an extra buffer and copy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100