Skip to content
/ simorgh Public

Simorgh is a simple server/client and key/value database using radix tree

License

Notifications You must be signed in to change notification settings

ahmdrz/simorgh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simorgh

It was my very very old golang-codes. So it maybe has a lot of bugs or bad written codes!

Under Construction :)

Simorgh (Phoenix in Persian) is a simple in-memory key/value database using radix tree. Protected by SRP authentication algorithm.

Image of Simorgh from Wikipedia

Simorgh image from wikipedia


In-Memory Key/Value database based on radix tree with Get Set Del Clr commands.

Download

git clone https://github.com/ahmdrz/simorgh
cd simorgh
make

And for install simrogh

sudo make install

Running server

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

Client

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

API

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())
}

TODO

  • 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.

Contribute

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.

About

Simorgh is a simple server/client and key/value database using radix tree

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published