Skip to content

bdupras/guava-probably

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guava-Probably: Probabilistic Filters

The Guava-Probably project provides two probabilistic filters for Guava.

Build Status GitHub license Maven Central

What is it?

A probabilistic filter is a space-efficient data structure for representing a set in order to support membership queries. ref

How does it work?

Check out this sweet, interactive demo: Probabilistic Filters By Example

What's it good for?

Probabilistic filters are great for reducing unnecessary disk, database or network queries. Applications where the universe of possible members in a set is much larger than actual members may benefit from probabilistic filters, especially when most membership queries are expected to return false.

No really, what's it good for?

  • Google Chrome uses p-filters to make a preliminary decision whether a particular web site is malicious or safe. ref
  • Exim mail transfer agent uses p-filters in its rate-limiting logic. ref
  • Use a p-filter to reject malicious authentication attempts, protecting your cache and database from botnet queries.

Cool, how do I get it?

Requires JDK 8 or higher and Google Guava 19.0 or higher (as of 1.0).

To add a dependency on Guava-Probably using Maven, use the following:

<dependency>
  <groupId>com.duprasville.guava</groupId>
  <artifactId>guava-probably</artifactId>
  <version>1.0</version>
</dependency>

To add a dependency using Gradle:

dependencies {
  compile 'com.duprasville.guava:guava-probably:1.0'
}

How do I learn more?

Links