Saving sessions in MongoDB

241 views
Skip to first unread message

Pete Chown

unread,
Oct 25, 2012, 5:05:33 PM10/25/12
to goril...@googlegroups.com
Hello,

I've written some code that allows Gorilla sessions to be saved in a MongoDB database.  This is obviously convenient if you are using Mongo for storing other data connected with your web application.  Also, Mongo provides an excellent environment for session data.  Mongo data is durable, the database is easy to split into shards if it gets overloaded, and Mongo 2.2 can expire old data automatically.

Is there interest in including this module with Gorilla?  If so, I'll add some documentation and make it available in a Github repository.

(My view is that this code should be a separate module, not part of the existing sessions module.  The reason is that bundling lots of different session management modules in the same place will create dependency hell.  My code would force all sessions users to download the Mongo driver, but then if someone wrote a session module for MySQL, people would be forced to download that driver too, and so on.)

Pete

Bing Chen

unread,
Nov 5, 2012, 10:11:28 PM11/5/12
to goril...@googlegroups.com
that very good,i am interest in it.

在 2012年10月26日星期五UTC+8上午5时05分33秒,Pete Chown写道:
Message has been deleted

Nguyên Nguyễn Văn Cao

unread,
Dec 5, 2012, 11:19:36 AM12/5/12
to goril...@googlegroups.com
Could you please to share the link to your module?

Vào 04:05:33 UTC+7 Thứ sáu, ngày 26 tháng mười năm 2012, Pete Chown đã viết:
Reply all
Reply to author
Forward
0 new messages