frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

We Developed a Rule Database

1•rockeetterark•1h ago
database are often used to store data and search data by 'conditions', ex: `select * from ... where <conditions>`.

on the other side, in many cases we need to store MANY 'conditions' and search the stored conditions by 'data'. such as:

* online AD, the Advertisers define many conditions for user profiles, contexts ... * content filtering(forbidden words with very complex boolean expression) * risk control, alert ... conditions * data cleaning, curation... * auto labeling...

Such businesses often use Elastic Search percolator(or its underlying lucene monitor), more recent tantivy percolator(lucene's rust alternative).

Now, we have developed RuleDB for such use case, our enterprise users showing RuleDB is more than 1000x faster than ES(excluding RPC network overhead).

RuleDB has two parts: 1. the compiler and 2. the runtime.

1. The Compiler compiles rule code written by RuleDB DSL into binaries

  * AC automata binaries: for normal 'words'

  * **Multi** Regex engine: our **extended regex** with regular language algebras(not/and/or/concat/non-greedy-op...), many different extended regex in many rules are compiled into one DFA(the supported regex num  is 100x of hyperscan)

  * cost based recall optimization: for example in `A and B and C`, the least frequent of A,B,C is selected as the recall term, this is in recursive approach.

  * The rule verification VM: AC automata and regex just scan text for atoms, such atoms are combined with boolean expressions, ex: a near/3 quick near/4 "brown fox" and not(lazy near/+2 dog or diligent near/2 wolf).
     * The VM code are highly optimized by the compiler
2. The applications use RuleDB API calling the runtime lib

  * load the compiled binaries(just mmap)
  * scan + verify
Advanct features:

  * numbers:  integeral range `{i{3000,5000}}`, real number range `{r{2.71828,3.14159265}}`, -- save and matched as text, no width limit

  * composite index: `gender[1] and age[23] and income{i{3000,5000}}` will be compiled into an composite index 'i-gender-age-income'.

  * multi dimentions: the typical case geofencing: `longitude{r{116.2418,116.2441}} and latitude {r{39.5424,39.5450}}` -- RuleDB natively support any dimention search

  * such numeric expression and text expressions can be mixed: `(america or china) and gender[1] and age[23] and income{i{3000,5000}}`
A complex rule:

``` gender{{1}} and age{i{20,28}} and income{i{18000,23000}} and longitude{r{116.2418,116.2441}} and latitude {r{39.5424,39.5450}} and interesting{{movie|food|sport}} and books{{The Red and the Black|The Great Gatsby}} and a near/3 quick near/4 "brown fox" and not(lazy near/+2 dog or diligent near/2 wolf) ```

There are real world single rule with more than 50KB in our enterprise users, a rule source code file with 2MB is fully compiled in 150 milliseconds, a query using a 10KB document to search 70000 rules with 20 matched rules takes just 300us(micro seconds, not milli seconds)!

---

RuleDB doc(in chinese): https://github.com/topling/ruledb-doc/

I'm also the author of TerarkDB(acquired by bytedance in 2019) and ToplingDB(https://github.com/topling/toplingdb), post for ToplingDB: https://news.ycombinator.com/item?id=44432322

Show HN: Toktrack – Track your Claude Code token spending in under a second

https://github.com/mag123c/toktrack
1•mag123c•30s ago•0 comments

UK Government Launches Fuel Forecourt Price API

https://www.developer.fuel-finder.service.gov.uk/access-latest-fuelprices
1•Technolithic•31s ago•0 comments

Show HN: AI-Ready Enterprise Flutter Starter – Clean Architecture, DDD

https://github.com/deveminsahin/starter_app
1•deveminsahin•1m ago•0 comments

Building a Hybrid Esports Pick'em App with Astro and Firebase

https://lautarolobo.xyz/blog/fan-pickems/
1•lautarolobo•2m ago•0 comments

MaliciousCorgi: AI Extensions send your code to China

https://www.koi.ai/blog/maliciouscorgi-the-cute-looking-ai-extensions-leaking-code-from-1-5-milli...
1•tatersolid•2m ago•0 comments

Microsoft's Sinofsky saw Surface fail coming – asked Epstein for advice on exit

https://www.theregister.com/2026/02/02/microsoft_sinofsky_epstein/
1•beardyw•2m ago•0 comments

Msgvault: fast private email archive and search system

https://wesmckinney.com/blog/announcing-msgvault/
1•j4mie•3m ago•0 comments

Doing Less, for Her

https://carlosbecker.com/posts/less/
1•Lunar5227•7m ago•0 comments

In my Google Calendar, every event is an AI task

https://kimmoihanus.com/posts/011-google-calendar-llm-orchestrator
1•ihmissuti•7m ago•1 comments

Demystifying Secure NFS

https://blogsystem5.substack.com/p/demystifying-secure-nfs
1•dgroshev•7m ago•0 comments

Launching Free Clay Alternative

https://bitscale.ai/
1•sanketgoyal11•8m ago•1 comments

Convolutions and Semirings

https://doisinkidney.com/posts/2017-10-13-convolutions-and-semirings.html
1•romes•8m ago•0 comments

How Apple Replaces Frameworks [video]

https://www.youtube.com/watch?v=SuQGQ1vh9k0
1•jeudesprits•9m ago•0 comments

Nano-vLLM: How a vLLM-style inference engine works

https://neutree.ai/blog/nano-vllm-part-1
1•yz-yu•10m ago•0 comments

Compromise of Polish codes and ciphers WWII

http://chris-intel-corner.blogspot.com/2026/02/the-compromise-of-polish-diplomatic.html
1•Christrian164•11m ago•0 comments

What "Production Grade" Means

https://askcodi.substack.com/p/what-production-grade-actually-means
1•himalayansailor•15m ago•1 comments

Startup Nutshell: All startup news, one feed

https://startupnutshell.com
1•ushno•16m ago•0 comments

Show HN: GeoRankers – See how AI models like ChatGPT describe your SaaS

https://dashboard.georankers.co/register
1•YJ2023•16m ago•0 comments

Onboarding Claude Code (and Yourself)

https://etsd.tech/posts/onboarding-claude-code/
1•elieteyssedou•16m ago•1 comments

GDBS: Make replacement, fast multi-threaded C++ builds for big projects

1•darkyboys•17m ago•0 comments

Show HN: Screen Recorder – Local

https://chromewebstore.google.com/detail/screen-recorder-local/flimojajilcjnadhaelikgjfkgchjlkk
1•Codegres•18m ago•0 comments

Show HN: Pi-Tmux

https://github.com/offline-ant/pi-tmux
1•athrowaway3z•19m ago•0 comments

Upcoming Tech Books to Read in 2026

https://notnotp.com/notes/upcoming-tech-books-to-read-in-2026/
1•enz•19m ago•0 comments

Use Deterministic Guardrails for Your LLM Agents

https://www.balajeerc.info/Use-Deterministic-Guardrails-for-your-LLM-Agents/
1•hannofcart•20m ago•0 comments

Did A.I. Take Your Job? Or Was Your Employer 'A.I.-Washing'?

https://www.nytimes.com/2026/02/01/business/layoffs-ai-washing.html
3•cainxinth•21m ago•0 comments

Resurrecting Crimsonland – Decompiling and preserving a cult 2003 classic game

https://banteg.xyz/posts/crimsonland/
1•Tiberium•22m ago•0 comments

Don't Get Scammed by Fake Power Tools [video]

https://www.youtube.com/watch?v=C_3bIv33f4o
1•burnt-resistor•23m ago•0 comments

Gyms, Zoos, and Museums: Your documentation should be in-game

https://rystorm.com/blog/gyms-zoos-museums-your-documentation-should-be-in-game
1•gyomu•24m ago•0 comments

How id Software made Catacomb 3D

https://www.youtube.com/watch?v=ZcUqwMf01pI
1•nailer•24m ago•0 comments

I made a WebRTC powered fidget spinner that syncs up between clients

https://a.rno.tt
1•acorn221•25m ago•1 comments