Skip to content
Michael Fulton edited this page Nov 4, 2015 · 5 revisions

Resources for using redis and go

How do we use redis?

We use redis' hashmap data structure to store information about a given network topology after computing the shortest path between all pairs of nodes, each path (and its length) is stored in the hashmap by the key "s#:d#" where s# means 's' followed by the number of the source node, and d# which means 'd' followed by the destination node number paths are stored as a string in the format "s 1 2 3 ... d | l" where s and d are source and destination node numbers and 1 2 3 ... indicates the path taken between the two, l is the length of this path (length being the sum of the weights of each edge) all storage and retrieval of information at this point is accomplished through simple .

Do calls with HSET and HGET

Clone this wiki locally