It was my very very old golang-codes. So it maybe has a lot of bugs or bad written codes!
Simorgh (Phoenix in Persian) is a simple in-memory key/value database using radix tree. Protected by SRP authentication algorithm.
Simorgh image from wikipedia
In-Memory Key/Value database based on radix tree with Get
Set
Del
Clr
commands.
git clone https://github.com/ahmdrz/simorgh
cd simorgh
make
And for install simrogh
sudo make install
simrogh-server
Note that default port is 8080 and default protocol is tcp , you can pass -port
and -protocol
to simorgh-server
For more information :
simrogh-server --help
simorgh-client
For more information :
simrogh-client --help
Default Username is : simorgh
Default Password is : simorgh
Client program :
Username > simorgh
Password >
< set a=b
> OK OK
< get a
> OK b
< get b=c
> ERROR ! UNDEFINED
< get b
> ERROR ! UNDEFINED
< set b=c
> OK OK
< get b
> OK c
< del b
> OK OK
< clr
> OK MEMORY CLEARED (1)
< \q
bye
You can use simorgh
in your Golang program.
After installation you can do some code like :
package main
import (
"fmt"
"github.com/ahmdrz/simorgh/driver"
)
func main() {
si, err := simorgh.New("localhost:8080","simorgh","simorgh","tcp")
if err != nil {
panic(err)
}
defer si.Close()
fmt.Println(si.Set("a","b"))
fmt.Println(si.Get("a"))
fmt.Println(si.Clr())
}
- Password authentication.
- Save configuration file in encrypted text file.
- Improve Simorgh Cli.
- Build Simorgh Golang library.
- Test with heavy dataset.
- Improve Simorgh base architecture.
- Make some test files and pass it to Travis CI.
Radix Tree
is forked from armon.
I'm not good in data structures , So I will happy if anyone give me suggestions and improve my code.
Build with ❤️ in Iran.