recoilme / sniper

A simple and efficient thread-safe key/value store for Go
MIT License
75 stars 12 forks source link

Building Sniper give error #18

Closed lonnietc closed 2 years ago

lonnietc commented 2 years ago

Hello,

I am trying to test Sniper on Windows Go v1.19 but when I tried to compile Sniper I am getting some errors:

C:\Cayley\tests\sniper>go build bench\main.go
go: downloading github.com/tidwall/lotsa v1.0.1
go: downloading github.com/recoilme/sortedset v0.0.0-20200825100557-fdc6fff0bc87
go: downloading github.com/tidwall/interval v0.0.0-20191207210631-da4d74c2f07b
# command-line-arguments
bench\main.go:70:25: not enough arguments in call to s.Set
        have ([]byte, []byte)
        want ([]byte, []byte, uint32)

any thoughts on fixing this?

recoilme commented 2 years ago

Looks like i forget modify bench (bench\main.go) (( Set now have 3 params, key/value/expire time, like this: set([]byte("key"),[]byte("val"), 0)

lonnietc commented 2 years ago

Hello,

Thanks, and it looks like I have good results with both native Windows Golang 1.19 and MSYS2 Mingw64 Golang 1.18.

How does sniper compare to your Pudge and b52 projects?

From what i read, Pudge will allow for just about any type and is faster than Bolt and Leveldb which is why I am interested in possibly using it to augment a database project but wanted to get your thoughts on this as well.

Appreciate your help.

recoilme commented 2 years ago

Pudge designed for small pet projects. Sniper - for big highload projects. B52 it's memcashed compatible server with sniper inside. We use b52 around 2 years at production with billions requests per month. On other hand sniper not support ordered sets, but pudge does

lonnietc commented 2 years ago

Thanks for the update and clarification on this.

I am building out a graph database which is actually a rework (rebirth) of Cayley Graph database in which it currently acts as a top layer to many different backend data stores. I want to reduce out almost all of them to have just one, or maybe 2 (i.e. a memstore and Pudge) so that it will be a fast as possible instead of the current selections.

In my basic test of the current native build of Cayley, of course, the memstore is the fastest with all others seeming to be extremely slow. My thoughts are to go to the fastest possible single data store that can mimic a memstore and it seemed that Pudge, Sniper, or B52 would be the best solution.

From that point, I want to build from there and enhance other features while slimming down the whole current build and design after which to add some new features as well.

Basically, getting rid of the many other data stores and using one of yours which I seem to like as they are very fast, persistent and Pudge allows for storing different data types and structures which is not just a KV store like some of the current Cayley stores.

Thanks again.

lonnietc commented 2 years ago

As a follow up, the project that I am working on is actually to build up a P2P type of clustering at the data store level using the Golang Noise P2P library along with a Kademlia DHT across the cluster nodes to offer replica sharding to minimize losses.

recoilme commented 2 years ago

it's sounds interesting, feel free to ask me. I close this issue for now then, but i'm open for questions