Skip to content

feat: add daemon mode, ETS sharding, and fast search paths (#1)#1

Closed
karthik-bharadwaj-h wants to merge 5 commits into
GrowlyX:mainfrom
karthik-bharadwaj-h:main
Closed

feat: add daemon mode, ETS sharding, and fast search paths (#1)#1
karthik-bharadwaj-h wants to merge 5 commits into
GrowlyX:mainfrom
karthik-bharadwaj-h:main

Conversation

@karthik-bharadwaj-h
Copy link
Copy Markdown
Contributor

  • feat: add daemon mode, ETS sharding, and fast search paths

    • Shard ETS trigram index across 16 tables, eliminating lock contention (6× faster builds)
    • Store per-shard compressed index files with parallel load/save (5× faster cold load)
    • Add Unix socket daemon with in-memory content cache for zero cold-start searches
    • Add Python thin client ig to bypass BEAM VM startup overhead (~3s saved per query)
    • Fix bloom-filter false negatives caused by using first_byte instead of last_byte in next_mask

* feat: add daemon mode, ETS sharding, and fast search paths

    - Shard ETS trigram index across 16 tables, eliminating lock contention (6× faster builds)
    - Store per-shard compressed index files with parallel load/save (5× faster cold load)
    - Add Unix socket daemon with in-memory content cache for zero cold-start searches
    - Add Python thin client `ig` to bypass BEAM VM startup overhead (~3s saved per query)
    - Fix bloom-filter false negatives caused by using first_byte instead of last_byte in next_mask

* feat: add daemon mode, ETS sharding, and fast search paths

    - Shard ETS trigram index across 16 tables, eliminating lock contention (6× faster builds)
    - Store per-shard compressed index files with parallel load/save (5× faster cold load)
    - Add Unix socket daemon with in-memory content cache for zero cold-start searches
    - Add Python thin client `ig` to bypass BEAM VM startup overhead (~3s saved per query)
    - Fix bloom-filter false negatives caused by using first_byte instead of last_byte in next_mask
Comment thread ig.py
SOCK_NAME = "daemon.sock"


def socket_path(base_dir: str) -> str:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't assume that people have python installed, is there a better way to do this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added PCRE2-JIT NIF for fast content scanning to replace Erlang's :re.run as native C implementation.

In the same folder I have placed ig_client code in source too as C implementation which does same as this ig.py python script

Is this better alternative?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up building a daemon system and a shell script to call the daemon. I'll merge your other updates systematically! thx for the contribution!

GrowlyX added a commit that referenced this pull request Mar 26, 2026
ETS sharding, bloom-filter mask pre-filtering, PCRE2-JIT NIF,
integer trigram keys, parallel scanner, incremental index updates,
thin C/Python clients, index format v5.

Preserves existing daemon architecture.

Co-authored-by: karthik-bharadwaj-h <20438441+karthik-bharadwaj-h@users.noreply.github.com>
GrowlyX added a commit that referenced this pull request Mar 26, 2026
ETS sharding, bloom-filter mask pre-filtering, PCRE2-JIT NIF,
integer trigram keys, parallel scanner, incremental index updates,
thin C/Python clients, index format v5.

Preserves existing daemon architecture.

Co-authored-by: karthik-bharadwaj-h <20438441+karthik-bharadwaj-h@users.noreply.github.com>
@GrowlyX
Copy link
Copy Markdown
Owner

GrowlyX commented Mar 26, 2026

hey! i co-authored a commit to add everything you added here to main! thanks again!

@GrowlyX GrowlyX closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants