Donal McMullan | 5 Jul 18:03 2016
Picon

getSession, componentized but not async?

I'm curious about request.getSession

Per the docs:

It seems like it's tricky to use correctly. My code needs to:
 - define an Interface
 - define a class that implements my Interface
 - call registerAdapter, passing in my class, server.Session and my Interface
 - get a Session instance
 - brace myself
 - create an instance of my Interface class, passing in the Session instance
 - update that Interface instance.... it will persisted, but only in-memory

By default, that data doesn't go to database/memcached/whatever, so it's only accessible in-process

On first blush, that seems like a lot of legwork. I'm not clear on what utility's provided by all this versus say maintaining a dict as a class-attribute on Site or something. It's also (for me) counter-intuitive to be creating an instance of an _Interface_ and poking data into it.

Also I was a bit surprised that getSession doesn't return a deferred, since it seems like it'd be common to want to persist session data in an external store so that multiple twisted-web processes can access it in a clustered/load-balanced setup. How do other folks go about that?

I hacked something together a while ago to run session data into Redis, but what I ended up with required so much surgery on twisted web's classes that I figured I must be doing it wrong. I think Site, SessionFactory and Request were all customised.

I was thinking about this again in the context of Cory's "Implement server-side HTTP/2 server push" ticket:

In this context, I'd like to have access to my session data in multiple Resource objects without _necessarily_ having to round-trip to an external store each time to get/put the same data. In the case of http 1.1 requests, I guess there's no way around that round-trip, so it might be optimal if my Resource objects could be oblivious to the underlying protocol version and Session get/put mechanism.

So it'd be great if the default Session mechanism could take care of me there, and I could just have my cake and eat it.

Another wrinkle that surprised me when I was hacking on this was that there didn't seem to be a way to uniquely identify a request instance, so within the session code it was impossible to tell if two calls to getSession were coming from different points in the callback chain responding to a single Request, or if the second belonged to a different Request entirely.

So my confusion is probably apparent at this stage :)

I'm guessing others have been here before me. What approaches have you taken to storing your sessions? Are there good open source projects that I should look to for best practice?

Thanks!

DJM



_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
Tristan Seligmann | 16 Dec 18:21 2015
Picon
Gravatar

Nevow 0.12.0

Hi all,

I've just released Nevow 0.12.0[1]; this release will primarily be of interest to Athena users, as the Athena runtime system now handles Internet Explorer versions newer than IE7 (a long overdue fix).

I would greatly appreciate it if any Athena users could give this version a try, and either report any problems encountered, or report that your application is working successfully. The changes to the runtime system are fairly extensive, and it is possible that some application-level breakage may result. Originally this was going to be an rc1 version, but it turns out that a lot of the version handling code can't tolerate rc versions, so instead I'll just promise to follow up with a 0.12.1 very quickly if it proves to be necessary.

There are a few other fixes included, see the changelog[2] for more details.
_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
a'ゞ 子奈??枪蹦狗友 | 14 Oct 06:39 2015

Re: Twisted-web Digest, Vol 128, Issue 1

 9位QQ出售地址:http://yz.hzhack.com/?post=8
8位QQ出售地址:http://yz.hzhack.com/?post=7
看中的老板,请抖我。保证高安全卖号!要的给我联系:2500994985 


------------------ Original ------------------
From:  "twisted-web-request";<twisted-web-request <at> twistedmatrix.com>;
Date:  Wed, Oct 14, 2015 02:00 AM
To:  "twisted-web"<twisted-web <at> twistedmatrix.com>;
Subject:  Twisted-web Digest, Vol 128, Issue 1

Send Twisted-web mailing list submissions to
twisted-web <at> twistedmatrix.com

To subscribe or unsubscribe via the World Wide Web, visit
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
or, via email, send a message with subject or body 'help' to
twisted-web-request <at> twistedmatrix.com

You can reach the person managing the list at
twisted-web-owner <at> twistedmatrix.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Twisted-web digest..."


Today's Topics:

   1. Changes to Twisted's binary distribution (Amber "Hawkie" Brown)


----------------------------------------------------------------------

Message: 1
Date: Tue, 13 Oct 2015 09:33:42 +0800
From: "Amber \"Hawkie\" Brown" <hawkowl <at> atleastfornow.net>
To: twisted-web <at> twistedmatrix.com, Twisted-Python
<twisted-python <at> twistedmatrix.com>
Subject: [Twisted-web] Changes to Twisted's binary distribution
Message-ID: <4DF8DEC8-6EA9-4EE6-9808-D98C11088DE2 <at> atleastfornow.net>
Content-Type: text/plain; charset="us-ascii"

Hi everyone,

Just letting everyone know, the next release (Twisted 15.5) will not include MSI or EXE installers for Windows, only binary wheels, and installation through pip or from source dist will be the only supported method of installation. The exe/msi installers didn't work well (or at all?) for virtualenvs, and when we (eventually) start shipping binary wheels for OS X, it'll make everything more consistent.

Regards,

Amber "Hawkie" Brown
Twisted Release manager
GPG: https://keybase.io/hawkowl
hawkowl <at> atleastfornow.net


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://twistedmatrix.com/pipermail/twisted-web/attachments/20151013/7c54c937/attachment-0001.pgp>

------------------------------

_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web


End of Twisted-web Digest, Vol 128, Issue 1
*******************************************
_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
wangliyu | 15 Sep 19:42 2015
Picon

Auto-Re: UNSUBSCRIBE!!!!!!!!!

您的邮件已收到,我会尽快处理,谢谢!

----

--------------------------
Best Regards,
王立宇
--------------------------
DHC Software Co.,Ltd.
东华软件股份公司
Add:11th floor,DHC Office Building,ZiJin Digital Park ,Zhongguancun,Haidian District, BeiJing ,China
北京市海淀区中关村紫金数码园3号楼东华合创大厦11层
邮编 100190   手机:18612695237

_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
wangliyu | 4 Sep 10:07 2015
Picon

Auto-Re: Twisted 15.4.0 Release Announcement

您的邮件已收到,我会尽快处理,谢谢!

----

--------------------------
Best Regards,
王立宇
--------------------------
DHC Software Co.,Ltd.
东华软件股份公司
Add:11th floor,DHC Office Building,ZiJin Digital Park ,Zhongguancun,Haidian District, BeiJing ,China
北京市海淀区中关村紫金数码园3号楼东华合创大厦11层
邮编 100190   手机:18612695237

_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
wangliyu | 27 Aug 23:25 2015
Picon

Auto-Re: unsubscribe

您的邮件已收到,我会尽快处理,谢谢!

----

--------------------------
Best Regards,
王立宇
--------------------------
DHC Software Co.,Ltd.
东华软件股份公司
Add:11th floor,DHC Office Building,ZiJin Digital Park ,Zhongguancun,Haidian District, BeiJing ,China
北京市海淀区中关村紫金数码园3号楼东华合创大厦11层
邮编 100190   手机:18612695237

_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
Judy Craig | 27 Aug 23:23 2015
Picon
Picon

Re: unsubscribe

This is an automatic reply. I am attending our District Blueprints day today, and am out of the office,  returning on Monday, August 31, 2015.  I will be happy to get back to you then.  

Judy Craig
Student Services

This email and any files transmitted with it may be confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate, distribute or copy this email.
_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
wangliyu | 27 Aug 14:31 2015
Picon

Auto-Re: Twisted 15.4.0pre1 Prerelease Announcement

您的邮件已收到,我会尽快处理,谢谢!

----

--------------------------
Best Regards,
王立宇
--------------------------
DHC Software Co.,Ltd.
东华软件股份公司
Add:11th floor,DHC Office Building,ZiJin Digital Park ,Zhongguancun,Haidian District, BeiJing ,China
北京市海淀区中关村紫金数码园3号楼东华合创大厦11层
邮编 100190   手机:18612695237

_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
Judy Craig | 9 Aug 11:41 2015
Picon
Picon

Re: Updates on the Twisted Buildbots

This is an automatic reply. I am away from the office for the summer, returning on Tuesday, August 25, 2015.  I will be happy to get back to you then.  

Enjoy your summer!

Judy Craig
Student Services

This email and any files transmitted with it may be confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate, distribute or copy this email.
_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
Judy Craig | 4 Aug 09:05 2015
Picon
Picon

Re: Twisted 15.3 Release Announcement

This is an automatic reply. I am away from the office for the summer, returning on Tuesday, August 25, 2015.  I will be happy to get back to you then.  

Enjoy your summer!

Judy Craig
Student Services

This email and any files transmitted with it may be confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. If you are not the named addressee you should not disseminate, distribute or copy this email.
_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
Amber "Hawkie" Brown | 23 Jul 10:09 2015
Picon
Gravatar

Twisted 15.3.0 Prerelease 1 Announcement

Hi everyone!

Another Twisted release cycle dawns, and I bring you the first prerelease of Twisted 15.3.

This release is characterised by cleanups and porting, with at least ten modules ported to Python 3, and the
removal of Lore, Twisted's use of Hotshot, and various other smaller deprecated classes and functions.
Twisted has also shed its usage of "subprojects" -- there is now only one Twisted (long may it reign).

The tarball and the newsfile summarising all the changes can be downloaded from <http://twistedmatrix.com/Releases/pre/15.3.0pre1/>.

Enjoy, and test! If no issues are found, 15.3 will be released sometime next week.

Twisted Regards,

Amber "Hawkie" Brown
GPG: https://keybase.io/hawkowl

_______________________________________________
Twisted-web mailing list
Twisted-web <at> twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Gmane