I'm developing a *redis **like *server with Go. You can see the code repo 
here <https://github.com/kasvith/kache>.
I need to dump my *Mutex Protected map* to a *file*. Simply *snapshot data 
to a file*.

In redis, it take snapshots of data using a fork as described in here 
<http://oldblog.antirez.com/post/redis-persistence-demystified.html>.

// DB holds a thread safe struct for store data
type DB struct {
    file map[string]*DataNode
    mux sync.RWMutex
}

Here is my map. 

Is there a possibility in go to do this? I want to be my original DB to be 
lock free and non touched while the persistent carries on.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to