On Fri, Jul 20, 2012 at 12:45 PM, Pedro Melo <m...@simplicidade.org> wrote:
Hi, >> Yes, here is an workaround using reverse proxy and run the apps at >> separate ports, but this is complicated. And you can't have an common >> Session middleware for all apps. > > Of course you can have a common middleware and a common session > between all apps. They don't need to share a process space to have > those, just the same configuration for the middlewares. Given that > most of them use a cookie to keep track of stuff, and all your apps > would share the same hostname, it would just work. You will run into "race-conditions", and you know this. You know too, that all what you wrote is only "workarounds" - not an "clean" solution. And if you don't agree, simply check how Session is written, and how it will works when two process want "simpultaneously" use the same storage. > Having said that, there are a couple of problems standing in the way > of multiple Poet app in the same process. Poet uses singletons in a > couple of places and uses the app class name as key for a lot of other > stuff. Its also not easy to create a Poet app, with possible several > components subclassed, and then subclass that app to fit separate > sites. See, I'm not an Poet "core" developer. I'm trying using Mason2 and porting my Mason1 apps. You can disagree, but frameworks are usually created for easing users life. I only want USE Poet and Mason2 at "components level" and at level of my own classes. Never will write any plugin into Mason2 or Poet - no because don't want, simply i'm not soo good for this task. But I'm enough "good" have many Mason1 apps. Simply, if Poet uses "singletons", it is Poet's design problem. Don't understand me bad - i'm really very happy that Jon write Mason2 and Poet. But that not mean than i can't point to basic design flaw - the possibility fully use it with PSGI with all BASIC PSGI features. I hope you agree than Plack is geniue implementation of PSGI and any framework should support the BASIC app-mounting. If Poet can't support it, because it design - thats mean Poet has design flaws. > I don't know if Jon will work on this. AFAIK he doesn't need this > particular functionality so I guess he will focus on stuff more > important to him. Of course. Again, I really THANX Jon for creating Mason2 and Poet. (and CHI and etc). And I understand, than Jon has more urgent things to do. But i'm not alone who need multiple Poet apps in one Plack. You need this functionality too - i'm saying this, based on YOUR older posts here. This is not an urgent bug, but it is an importatant enhancement. >> Components should be called with '&', so the old syntax <&| component >> &> was </&> nice and consistent. I have many-many (Mason1) components >> what i calling with content. Now when trying move the app to Mason2 >> need rewrite all calls to illogical filter calls. > > I never used neither components with content with Mason1, and I very > very rarely use filters. I don't particularly like the concept. IMO, components with content and filters are something what really make Mason unique and extremelly powerful. > But from afar it strikes me that both have the same idea: call > component X with associated content. > > So, and again please remember that I'm not a user of either, it seems > to me that they are in fact very similar, and therefore having the > same syntax will simplify things. > > Just my €.01, I'm probably missing something obvious. Maybe only the fact than here are already existing many components what are called with content. And rewriting them into filters is not as esy task as someone may think... >> IMO, Mason2 compiler should accept the <&| component &> content </&> >> and the compiler should translate it into $.CompCall.... > > Oh, are you asking just for the syntax sugar then? > > Have you looked into subclassing Compiler to add this yourself? Maybe > it is simple and then you could provide a patch... As i told above. I will never write anything into Mason/Poet "core", simply because i not enough skilled. I can write nice apps using components (as in Mason1) - but nothing into core. Here was i question about component distro-format - i would be happy sharing components what I wrote to help others - but simply i havent enough knowledge to understand Poet/Mason2 core - and honestly - as an user - don't need this. So maybe youre right - it is maybe easy task - "syntax sugar". I pointed only to fact than here are more users who has components called with content and the old Mason1 syntax is nice, clean and powerful. Simply don't understand why Jon eliminated them. So, at end - once again - i'm really appreciating Jon's work. Mason2 and Poet are the most advanced frameworks in the perl world. But has flaws - and i'm talking about them. That's all. Thank you for your answer. ak. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users