Arrow IPC Streaming Cache Implementation#35
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
Pontoon has an internal abstraction called a cache. The cache is a data-store-agnostic record store for data that is being read from a source connector and will be written somewhere by a destination connector. We've used Arrow in Pontoon from day 1 as an intermediate, language-independent in-memory format, but we haven't been leveraging it's serialization capabilities: instead, we've used different cache implementations to translate between Arrow and various on-disk formats. The default for a while now has been a SQLite-backed cache, which has performed surprisingly well, but has significant limitations for really large, and really wide, data.
SqliteCachewithArrowIpcCacheleveraging columnar Arrow IPC Streaming serialization.arrows) to store record streams in transit between source and destination connectorsWhy make the caching layer faster?
SqliteCacheBenchmark summary
Write Performance vs
SqliteCache:Optimized Streaming Mode: up to 5.2x faster in best cases
Read Performance vs
SqliteCache:Overall: 3-57x faster depending on schema
Wide schemas: Up to 57x faster
Mixed schemas: Consistently 3-4x faster