e6-experiments

202406251015
Status: #idea
Tags: e6data

e6-experiments

Questions?

  1. PRESENTATION
  2. VarHandleStringCopy not working. Need help in fixing. Passing command-ling args to javac like stackoverflow suggested did not work
  3. Packages/classes of interest
    1. MethodHandle
    2. VarHandle
      1. VarHandleByteArray as Longs, etc. This might be better a more Java idiomatic way
      2. VarHandle uses Unsafe internally.
      3. VarHandleMemorySegment as Longs.
        1. This seems to have a lot of scope.
        2. For my work, perhaps in the case of a buffer manager. Could be used to implement pages, and other page-backed data structures
    3. MemorySegment
      1. https://www.baeldung.com/java-foreign-memory-access#1-memorysegment
      2. https://www.baeldung.com/java-foreign-memory-access#using-native-memory

Foreign Memory Access in Java

MemorySegment

Info

A memory segment is attached to a particular thread
Other threads can gain access to it using the acquire() method

Memory locations

MemorySegment memorySegment = MemorySegment.allocateNative(200); // Native memory segment
MemorySegment memorySegment = MemorySegment.ofArray(new long[100]); // Array memory segment
MemorySegment memorySegment = MemorySegment.ofByteBuffer(ByteBuffer.allocateDirect(200)); // Buffer memory segment (backed by existing ByteBuffer)
MemorySegment memorySegment = MemorySegment.mapFromPath(
  Path.of("/tmp/memory.txt"), 200, FileChannel.MapMode.READ_WRITE); // Memory mapped file

String Serialisation

ASCII Strings

Primitive Serialisation

Engine code benchmarks

MinIO

Java

Idea scratchpad

Next Steps

Spill2Disk Papers

Umbra

External Aggregation in DuckDB

Robust External Hash Aggregation in the Solid State Age

Parallel Grouped Aggregation in DuckDB

Papers for Spill to Disk


References