Closed Bug 1100903 Opened 11 years ago Closed 11 years ago

Batch redis commands wherever possible

Categories

(Hello (Loop) :: Server, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mikedeboer, Assigned: rhubscher)

References

Details

(Whiteboard: [loop-server 0.15.0])

Attachments

(1 file)

56 bytes, text/x-github-pull-request
alexis+bugs
: review+
mikedeboer
: feedback+
Details | Review
There are quite a couple of places in loop/storage/redis.js that can benefit from using the Redis MULTI command to batch calls: `deleteUserCallUrls`, `deleteUserCalls`, `getUserCalls`, `incrementConnectedCallDevices`, `decrementConnectedCallDevices`, `getCall`, `touchHawkSession`, `setUserRoomData`, `getUserRooms`, `touchRoomParticipant`, `deleteRoomParticipant`. I know that certain functions use async.map to call into other member functions that do some processing, but one way to migrate from that is to have these functions optionally return commands instead of executing them. These commands can then be concatenated and passed to _client.multi(). This will dramatically improve performance, I think, by lowering the overhead of socket traffic and more efficient redis task scheduling.
Good point, thanks.
Assignee: nobody → rhubscher
Attachment #8542160 - Flags: review?(alexis+bugs)
Attachment #8542160 - Flags: feedback?(mdeboer)
Apparently I still need to work on: - getUserCalls - getCall mikedeboer — getUserRooms seems clean to me, where could we use multi?
(In reply to Rémy Hubscher (:natim) from comment #3) > mikedeboer — getUserRooms seems clean to me, where could we use multi? `getUserRooms` also looks good to, please scratch it from the list ;)
Do you see anything we could benefit from?
Comment on attachment 8542160 [details] [review] Link to Github PR — #267. Awesome! I foresee much win having this in, thanks!
Attachment #8542160 - Flags: feedback?(mdeboer) → feedback+
Attachment #8542160 - Flags: review?(alexis+bugs) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [loop-server 0.15.0]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: