[Catalyst] A Catalyst::Plugin::Session Alternative: Web::Starch
John Napiorkowski
jjn1056 at yahoo.com
Thu Jul 9 19:34:40 GMT 2015
FWIW I had to add a bit to the Catalyst session stuff to enable that store in cookie thing, here's the diff:
Search the CPAN - metacpan.org
| |
| | | | | |
| Search the CPAN - metacpan.orgChanges05 META.yml88 inc/Module/Install/Base.pm11 inc/Module/Install/Can.pm11 inc/Module/Install/Fetch.pm11 inc/Module/Install/Makefile.pm22 inc/Module/Install/Metadata.pm33 |
| |
| View on metacpan.org | Preview by Yahoo |
| |
| |
Might just need a simple change on the catalyst adaptor.
On Thursday, July 9, 2015 2:29 PM, John Napiorkowski <jjn1056 at yahoo.com> wrote:
I would think that this could be used by Plack middleware and Catalyst as core session functionality. So I don't think in the end its either or.
Aran, the main thing I can't figure is how to have a cookie storage... since that's gotta be aware of the request/response cycle. I'd adopt this in a moment for new code if we could figure that part out. Personally I just put a few tiny IDs in the session so cookie storage is more than enough, and nice for quick prototypes.
Any thoughts? You can hit me out on IRC #catalyst if that is either - jnap
On Thursday, July 9, 2015 10:35 AM, Aran Deltac <bluefeet at gmail.com> wrote:
Ya, I have Plack::Middleware::Session listed in the alternatives section of the manual. Thanks for the reply!
On Thu, Jul 9, 2015 at 7:14 AM Hartmaier Alexander <alexander.hartmaier at t-systems.at> wrote:
Hi Aran,
did you look at Plack::Session if you want something decoupled from Catalyst?
I haven't used it so far as I don't require sessions that are shared with non-Catalyst stuff but it might be a better base for a futureproof session module.
On 2015-07-09 02:17, Aran Deltac wrote:
Hey guys,
I've been working on a project which is a (mostly) drop in replacement for Catalyst::Plugin::Session. Here are the GitHub repos:
https://github.com/bluefeet/Web-Starchhttps://github.com/bluefeet/Web-Starch-Store-CHIhttps://github.com/bluefeet/Web-Starch-Store-AmazonDynamoDBhttps://github.com/bluefeet/Web-Starch-Plugin-Serealhttps://github.com/bluefeet/Catalyst-Plugin-Starch
The manual is a good place to start:
https://github.com/bluefeet/Web-Starch/blob/master/lib/Web/Starch/Manual.pod
I'm using this @work and will be deploying it to production, replacing Catalyst::Plugin::Session, sometime next week if all goes well this week.
I've not put these modules on CPAN yet as I'd love some feedback before I do so. I want to make sure the module names, the interfaces, and just the entire design are acceptable to people. I want this to be a real step forward.
@work we've made extensive use of Catalyst::Plugin::Sesssion for years now, and related modules such as Catalyst::Plugin::Authentication. So far everything has "just worked" when I replaced Catalyst::Plugin::Session with Catalyst::Plugin::Starch.
Why do this?
- Catalyst::Plugin::Session (C:P:S) is slower in NYTProf reports than I would expect it to be.
- C:P:S is tied into Catalyst. This is unnecessary. Catalyst should be used to glue things together, not as a platform to build whole technologies on. By decoupling sessions from Catalyst many wins can be had in reusability and unit testing (etc?).
- C:P:S can be difficult and messy to extend. This is partly due to how Catalyst plugins work, but also due to the design of C:P:S.
Aran
_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/catalyst/attachments/20150709/cba143f0/attachment.htm>
More information about the Catalyst
mailing list