Skip to content

A Naive Persistent FIFO Buffer Queue on top of SQLite

Notifications You must be signed in to change notification settings

chespinoza/bufferlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License

Bufferlite

A Naive FIFO Buffer Queue with SQLite as persistence layer

Bufferlite implements a persistent FIFO buffer on top of sqlitex package.

Installation & Usage

If available in Hex, the package can be installed as:

  1. Add bufferlite to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:bufferlite, "~> 0.1.0"}]
end
```
  1. Ensure bufferlite is started before your application:
```elixir
def application do
  [applications: [:bufferlite]]
end
```
  1. Use it to buffer any Elixir/Erlang term.
>{:ok, pid} = Bufferlite.start_link("mybuff.db")
>Bufferlite.new_buffer(pid, "buff")
>Bufferlite.push(pid, "buff", {:ok, [1, 2, 3, 4], :some})
>Bufferlite.pop(pid, "buff")
{:ok, [1, 2, 3, 4], :some}
  1. TODO
  • Benchmarks

License

MIT

About

A Naive Persistent FIFO Buffer Queue on top of SQLite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages