RE: NumberAsString UDF question
At 09:22 AM 16/06/2005, Ben Forta wrote: >Should be an easy change. In DollarAsString() you'll see a line that reads: > >if(cents) > >That checks to see if cents is not 0, so just remove (or comment out) that >line and it should do what you want. Thanks Ben. T ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209658 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: NumberAsString UDF question
Should be an easy change. In DollarAsString() you'll see a line that reads: if(cents) That checks to see if cents is not 0, so just remove (or comment out) that line and it should do what you want. --- Ben -Original Message- From: Thane Sherrington [mailto:[EMAIL PROTECTED] Sent: Thursday, June 16, 2005 7:50 AM To: CF-Talk Subject: NumberAsString UDF question I'm using Ben Forta's NumberAsString and DollarAsString, and I'd like it to convert 1.00 to "One dollar and zero cents", but it converts to "One dollar." Is there a version that does the conversion I'm looking for? T ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209657 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: NumberAsString UDF question
Thane Sherrington wrote: > dollar." Is there a version that does the conversion I'm looking for? probably overkill but might have a look at icu4j's RuleBasedNumberFormat. we use it for spellout functionality, etc. in i18n apps but it can be made to format pretty much anything. simplified cf example (btw the french & spanish locales are broken): http://www.sustainablegis.com/projects/icu4j/spellOut.cfm docs: http://icu.sourceforge.net/apiref/icu4j/com/ibm/icu/text/RuleBasedNumberFormat.html ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209656 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
NumberAsString UDF question
I'm using Ben Forta's NumberAsString and DollarAsString, and I'd like it to convert 1.00 to "One dollar and zero cents", but it converts to "One dollar." Is there a version that does the conversion I'm looking for? T ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209653 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: ListFix UDF Question
1) If the udf was in a file called strlib, you could cfinclude the file. Or you can cut and paste the code into your file below, or into your Application.cfm file. To call the UDF, you call it like any other BIF (built-in function). 2) It _should_ handle them as well - if not, let me know. ;) === Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc Email: [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Rafael Alan Bleiweiss [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 30, 2003 8:13 AM > To: CF-Talk > Subject: ListFix UDF Question > > > At 04:56 PM 1/29/03 -0600, you wrote: > >- basically it ignores them. Try ListFix, > >http://www.cflib.org/udf.cfm?ID=507, to change the null entries to > > Raymond, > > I looked at this udf - looks great for mid-string changes, > however I've got > two questions - > > 1. How do I include this udf into the loop below > 2. does it work for empty spots in the string on the end of > a row or just > in the middle between two commas? > > file="c:\inetpub\wwwroot\briona\secure\modernstorage\shop\cont > rol\QuantumUpTry.csv" > variable="read_file"> > delimiters="#chr(10)##chr(13)#"> > > > UPDATE Products > SET > JPG = '#listgetAt('#line#',2, ',')#', > PDF = '#listgetAt('#line#',3, ',')#' > where (MFGPartNumber = '#listgetAt('#line#',1, ',')#') > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
ListFix UDF Question
At 04:56 PM 1/29/03 -0600, you wrote: >- basically it ignores them. Try ListFix, >http://www.cflib.org/udf.cfm?ID=507, to change the null entries to Raymond, I looked at this udf - looks great for mid-string changes, however I've got two questions - 1. How do I include this udf into the loop below 2. does it work for empty spots in the string on the end of a row or just in the middle between two commas? UPDATE Products SET JPG = '#listgetAt('#line#',2, ',')#', PDF = '#listgetAt('#line#',3, ',')#' where (MFGPartNumber = '#listgetAt('#line#',1, ',')#') ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: UDF question -- make num a string
outNum = finalResult & '%' & is the concatenation operator in CF (yeah, i know...it can be annoying) :) charlie - Original Message - From: "Owens, Howard" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 5:29 PM Subject: UDF question -- make num a string > I'm trying to do a little UDF to convert something like .77809 to 78% > > If I do something like: > > outNum=finalResult + '%'; > > I get an error that says "cannot convert % to a number" ... > > well, I don't want it to be a num. I want it to be a string. I can't find a > way to get a string output in the return. > > H. > > ~~ > Howard Owens > Internet Operations Coordinator > InsideVC.com/Ventura County Star > [EMAIL PROTECTED] > AIM: GoCatGo1956 > ~~ > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: UDF question -- make num a string
try : outNum=finalResult & '%'; Marius Milosav www.scorpiosoft.com It's not about technology, it's about people. Virtual Company (VICO) Application Demo www.scorpiosoft.com/vicodemo/login.cfm - Original Message - From: "Owens, Howard" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 7:29 PM Subject: UDF question -- make num a string > I'm trying to do a little UDF to convert something like .77809 to 78% > > If I do something like: > > outNum=finalResult + '%'; > > I get an error that says "cannot convert % to a number" ... > > well, I don't want it to be a num. I want it to be a string. I can't find a > way to get a string output in the return. > > H. > > ~~ > Howard Owens > Internet Operations Coordinator > InsideVC.com/Ventura County Star > [EMAIL PROTECTED] > AIM: GoCatGo1956 > ~~ > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: UDF question -- make num a string
When you use the +, tried to add it, replace the + with & and you will be ok: outNum=finalResult & '%'; Used to get me all the time, still once in a while, lol Robert Bailey [EMAIL PROTECTED] "Famous for nothing!" http://www.tinetics.com -Original Message- From: Owens, Howard [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 4:29 PM To: CF-Talk Subject: UDF question -- make num a string I'm trying to do a little UDF to convert something like .77809 to 78% If I do something like: outNum=finalResult + '%'; I get an error that says "cannot convert % to a number" ... well, I don't want it to be a num. I want it to be a string. I can't find a way to get a string output in the return. H. ~~ Howard Owens Internet Operations Coordinator InsideVC.com/Ventura County Star [EMAIL PROTECTED] AIM: GoCatGo1956 ~~ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: UDF question -- make num a string
outNum = finalResult & '%'; Robert Bailey [EMAIL PROTECTED] "Famous for nothing!" http://www.tinetics.com -Original Message- From: Owens, Howard [mailto:[EMAIL PROTECTED]] Sent: Friday, January 17, 2003 4:29 PM To: CF-Talk Subject: UDF question -- make num a string I'm trying to do a little UDF to convert something like .77809 to 78% If I do something like: outNum=finalResult + '%'; I get an error that says "cannot convert % to a number" ... well, I don't want it to be a num. I want it to be a string. I can't find a way to get a string output in the return. H. ~~ Howard Owens Internet Operations Coordinator InsideVC.com/Ventura County Star [EMAIL PROTECTED] AIM: GoCatGo1956 ~~ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
UDF question -- make num a string
I'm trying to do a little UDF to convert something like .77809 to 78% If I do something like: outNum=finalResult + '%'; I get an error that says "cannot convert % to a number" ... well, I don't want it to be a num. I want it to be a string. I can't find a way to get a string output in the return. H. ~~ Howard Owens Internet Operations Coordinator InsideVC.com/Ventura County Star [EMAIL PROTECTED] AIM: GoCatGo1956 ~~ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: locking (was: UDF question)
it's been an odd day, hence the slightly bent (or completely broken) humor. true. i'm not really criticizing CF's practices. personally, i believe that it should provide the default behavior of being shared scope safe, while allowing the programmer granular control over said behavior. of course, i always want my cake and eat it too. it's not too onerous to have to handle locking myself. just commenting on compiler/interpreter construction. christopher olive cto, vp of web development, vp it security atnet solutions, inc. 410.931.4092 http://www.atnetsolutions.com -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 11:26 AM To: CF-Talk Subject: RE: locking (was: UDF question) > despite the fact that you're not raymond, i'll respond > to him via your response for him (how's it feel to be a > surrogate ray? :)) I refuse to answer that question because, well, it's kind of weird. > "I don't think that's what Ray meant. If I understand > correctly, his distinction was that the programmer can > place multiple variable accesses in a single scope within > a single CFLOCK - and can structure his code accordingly > - while the stupid computer can't do that: > > . begin automatic lock ... > > . end automatic lock ... > . begin automatic lock ... > > . end automatic lock ... > > vs > > > > > " > > of course, that's the point of a well written > compiler/interpreter. it can figure out that it's SUPPOSED > to do the second. that's what makes it well written. Of course, though, there are limitations to what a well-written compiler or interpreter can do. While my specific example, chosen primarily for its simplicity, may be easy to work into the CF Server's interpretational abilities, the fact is that anything more complex than that could be difficult. For example, I can look at an individual script and make the determination that, for this script, I can copy some set of variables from persistent to local scope, including some that may not even be used based on the evaluation of a condition within the page, within a single CFLOCK, while if those variables are currently scattered throughout the page, the interpreter may not be able to make that decision. Even in environments which do take care of things like this automatically, by default, those environments provide a way to manually override the default. For example, within the database, you can use isolation levels and locking hints to override the default locking. Within Java and other languages which perform automatic garbage collection, the programmer can write code to affect the behavior of that garbage collection. So, you may be able to criticize CF for not providing that default behavior, but you can't follow the assumption that if it did, you wouldn't have to worry about the issue any more. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: locking (was: UDF question)
> despite the fact that you're not raymond, i'll respond > to him via your response for him (how's it feel to be a > surrogate ray? :)) I refuse to answer that question because, well, it's kind of weird. > "I don't think that's what Ray meant. If I understand > correctly, his distinction was that the programmer can > place multiple variable accesses in a single scope within > a single CFLOCK - and can structure his code accordingly > - while the stupid computer can't do that: > > . begin automatic lock ... > > . end automatic lock ... > . begin automatic lock ... > > . end automatic lock ... > > vs > > > > > " > > of course, that's the point of a well written > compiler/interpreter. it can figure out that it's SUPPOSED > to do the second. that's what makes it well written. Of course, though, there are limitations to what a well-written compiler or interpreter can do. While my specific example, chosen primarily for its simplicity, may be easy to work into the CF Server's interpretational abilities, the fact is that anything more complex than that could be difficult. For example, I can look at an individual script and make the determination that, for this script, I can copy some set of variables from persistent to local scope, including some that may not even be used based on the evaluation of a condition within the page, within a single CFLOCK, while if those variables are currently scattered throughout the page, the interpreter may not be able to make that decision. Even in environments which do take care of things like this automatically, by default, those environments provide a way to manually override the default. For example, within the database, you can use isolation levels and locking hints to override the default locking. Within Java and other languages which perform automatic garbage collection, the programmer can write code to affect the behavior of that garbage collection. So, you may be able to criticize CF for not providing that default behavior, but you can't follow the assumption that if it did, you wouldn't have to worry about the issue any more. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: locking (was: UDF question)
despite the fact that you're not raymond, i'll respond to him via your response for him (how's it feel to be a surrogate ray? :)) "I don't think that's what Ray meant. If I understand correctly, his distinction was that the programmer can place multiple variable accesses in a single scope within a single CFLOCK - and can structure his code accordingly - while the stupid computer can't do that: . begin automatic lock ... . end automatic lock ... . begin automatic lock ... . end automatic lock ... vs " of course, that's the point of a well written compiler/interpreter. it can figure out that it's SUPPOSED to do the second. that's what makes it well written. christopher olive cto, vp of web development, vp it security atnet solutions, inc. 410.931.4092 http://www.atnetsolutions.com -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 12:58 PM To: CF-Talk Subject: RE: locking (was: UDF question) > > The question is - do you want CF to automatically handle > > everything for you at the sacrifice of speed? > > Raymond, I'm not Raymond, but I'll attempt a response anyway. > My first question to you is is there ever a reason not to > lock access to Session or Application scoped variables? > Personally I can't think of one, much less one in which > the "sacrifice of speed" would come into play. I don't think that's what Ray meant. If I understand correctly, his distinction was that the programmer can place multiple variable accesses in a single scope within a single CFLOCK - and can structure his code accordingly - while the stupid computer can't do that: . begin automatic lock ... . end automatic lock ... . begin automatic lock ... . end automatic lock ... vs > My second question is isn't it true that, assuming all > other things being equal, any algorithm or function coded > in binary, compiled language is going to perform better > than one written in a markup language and executed in > JIT or even an interpreted language executed in a virtual > machine? Perhaps so, but "ceteris paribus" doesn't apply here - all other things aren't equal, as previously noted. > > It would be very difficult to make a system smart enough to know > > "Hey, I could use one lock around this particular block of code." > > Therefore, we would be stuck with the slower alternative. > > What you neglect to mention is that when you lock access to a session > variable, you lock access to all session variables, causing other, > potential more common and severe performance problems, especially in > regards to the "Application" scope. There's a potential problem here, though - the Session and Application scopes are themselves variables. Perhaps this requires that they be locked in their entirety. I don't know enough about the internals of the CF server to be sure, but it sounds possible. > In the DBMS realm, these are called hotspots, and though you generally > don't see a performance difference on most systems, a database that > implements such a locking scheme usually fails under a heavy load. It's my understanding that typically when you're talking about hotspots from a RDBMS perspective, you're referring to a specific issue of locking in conjunction with physical storage - for example, if you place a clustered index on an identity column, concurrent writes to that table will take place within the same physical storage unit (leaf, page, etc) which may be locked. If your database supports locking of individual rows, that should address the issue of hotspots. The potential cost of row-level locking, though, is that the database has to manage more individual locks, which imposes some performance overhead. Now, if we carry that analogy to CF, CF apparently doesn't have "row-level locking" - the ability to isolate a single variable within a memory scope, and lock only that variable. Instead, we have to lock the entire scope. > Did anyone say it was hard? It isn't hard to write your > own Java servlets or roll your own HTTP server in C++. > However, the entire reason for ColdFusion existence, its > point of being and single greatest justification for the > cost is that it saves development time. > > Coding three lines of code to every one reference to a > shared scope, inventing workarounds (i.e. synchronizing > all the data to the Request scope or storing serialized > session data in client variables) is not my idea of RAD. > In fact, I would say it is the exact opposite. There are always going to be limitations in how easy you can make something. If you made programming easy enough, you would
Re: UDF question
ROTFL! At 03:34 PM 3/19/2002 -0800, you wrote: >Jeff, > >I have been meaning to talk to you about this. Yunno, the holidays (take >your pick) are upon us and business has been a bit slow on the Sabbath >(again, take your pick). Heaven is starting to look a little frayed around >the edges. Think you might be able to throw a little something on the >plate? If not, could you at least come up and mow the lawn... > >At 03:54 PM 3/19/2002 -0500, you wrote: > > In my world, I view those consultants as gods > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Dave, I can see trouble shooting all of these in a hurry EXCEPT the poor database schema. Doesn't that problem normally require a complete overhaul? I'm trying to envision fixing a bad schema in a hurry - it's not happening . -mk -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 5:12 PM To: CF-Talk Subject: RE: UDF question > > Dave - 250$ an hour? send them to us, we'll work for > > half that . > > Maybe it's $250 an hour because they can do so same work (or > better) in less than half the time? Just a thought. Close, perhaps, but more like "because we fix the work after your original consultant screwed up, and you don't have time to wait to get it fixed." But, as much as it's nice to be able to charge rates like that, I'd prefer to charge our normal rates - about half that - to develop something right the first time. It's no fun slaving over someone else's bad code in a rush, trying to figure out the application logic and fix it as quickly as possible. You'd think Fusebox would help here, but in my experience, badly-written Fusebox code isn't any easier to figure out than badly-written non-Fusebox code, and if it were well-written in the first place, I wouldn't be there. And lately, the common problems seem to be: 1) locking issues, edging out the historic #1 contender, 2) bad SQL usage, followed by 3) bad data schema design, and trailing that, 4) poor use of runtime processing (doing things at runtime that could be cached, or done at off-peak times) Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Jeff, I have been meaning to talk to you about this. Yunno, the holidays (take your pick) are upon us and business has been a bit slow on the Sabbath (again, take your pick). Heaven is starting to look a little frayed around the edges. Think you might be able to throw a little something on the plate? If not, could you at least come up and mow the lawn... At 03:54 PM 3/19/2002 -0500, you wrote: > In my world, I view those consultants as gods __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> > Dave - 250$ an hour? send them to us, we'll work for > > half that . > > Maybe it's $250 an hour because they can do so same work (or > better) in less than half the time? Just a thought. Close, perhaps, but more like "because we fix the work after your original consultant screwed up, and you don't have time to wait to get it fixed." But, as much as it's nice to be able to charge rates like that, I'd prefer to charge our normal rates - about half that - to develop something right the first time. It's no fun slaving over someone else's bad code in a rush, trying to figure out the application logic and fix it as quickly as possible. You'd think Fusebox would help here, but in my experience, badly-written Fusebox code isn't any easier to figure out than badly-written non-Fusebox code, and if it were well-written in the first place, I wouldn't be there. And lately, the common problems seem to be: 1) locking issues, edging out the historic #1 contender, 2) bad SQL usage, followed by 3) bad data schema design, and trailing that, 4) poor use of runtime processing (doing things at runtime that could be cached, or done at off-peak times) Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Maybe it's $250 an hour because they can do so same work (or better) in less than half the time? Just a thought. -Original Message- From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 2:16 PM To: CF-Talk Subject: RE: UDF question Dave - 250$ an hour? send them to us, we'll work for half that . -mk P.S. - you guys lawyers or something? -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 12:17 PM To: CF-Talk Subject: RE: UDF question > You're talking about developers who don't use CFLOCK > because they are ignorant of CF locking issues. I'm > sure we all agree that this is a bad thing, but it's > not exactly relevent to the original discussion. > > You can write perfectly "solid" applications that do > not lock session variable access. Simply enable the > Single Threaded Sessions option in the CF Administrator. Again, we may disagree about "solidity" here. It's been my experience that applications using this setting may have to be rewritten to handle significant load. If you asked the people who purchased the applications written this way, who then find out that they need to have changes made on nearly every page - expensive at $250/hr - they'd probably object to using the word "solid", unless they also worked in the words "steaming" and "pile" as well. > That's been my point from the beginning. It's not helpful > to compare this with "sloppy" or incompetent coding. One attribute of sloppy/incompetent coding is to avoid problem resolutions within the code itself. That's why we have exception handlers, for example. You could argue that, in CF, we have the site-wide error handler so we don't need exception handlers, but I'd argue that the programmer who appropriately uses exception handlers writes better (more competent, less sloppy) code than the one who doesn't. A non-sloppy, competent programmer will attempt to ensure that his program will perform optimally in whatever situation it is run - it'll fail gracefully if some other guy doesn't configure it correctly, or call it with the correct attributes, or whatever. This falls within the same category. If you write an application which relies on my configuring a server-wide performance setting, which may very well negatively affect how all the other apps on that server will run, and you write it this way in order to avoid adding a few lines of code here and there, in my book that's definitely sloppy, and not necessarily competent. Now, if you write code which you know will always be under your direct control, and you know that you can configure the server any way you like, and you know that the code won't have to support significant number of users, then there's nothing wrong with omitting your locks and using that setting. Most developers don't have those luxuries, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Dave - 250$ an hour? send them to us, we'll work for half that . -mk P.S. - you guys lawyers or something? -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 12:17 PM To: CF-Talk Subject: RE: UDF question > You're talking about developers who don't use CFLOCK > because they are ignorant of CF locking issues. I'm > sure we all agree that this is a bad thing, but it's > not exactly relevent to the original discussion. > > You can write perfectly "solid" applications that do > not lock session variable access. Simply enable the > Single Threaded Sessions option in the CF Administrator. Again, we may disagree about "solidity" here. It's been my experience that applications using this setting may have to be rewritten to handle significant load. If you asked the people who purchased the applications written this way, who then find out that they need to have changes made on nearly every page - expensive at $250/hr - they'd probably object to using the word "solid", unless they also worked in the words "steaming" and "pile" as well. > That's been my point from the beginning. It's not helpful > to compare this with "sloppy" or incompetent coding. One attribute of sloppy/incompetent coding is to avoid problem resolutions within the code itself. That's why we have exception handlers, for example. You could argue that, in CF, we have the site-wide error handler so we don't need exception handlers, but I'd argue that the programmer who appropriately uses exception handlers writes better (more competent, less sloppy) code than the one who doesn't. A non-sloppy, competent programmer will attempt to ensure that his program will perform optimally in whatever situation it is run - it'll fail gracefully if some other guy doesn't configure it correctly, or call it with the correct attributes, or whatever. This falls within the same category. If you write an application which relies on my configuring a server-wide performance setting, which may very well negatively affect how all the other apps on that server will run, and you write it this way in order to avoid adding a few lines of code here and there, in my book that's definitely sloppy, and not necessarily competent. Now, if you write code which you know will always be under your direct control, and you know that you can configure the server any way you like, and you know that the code won't have to support significant number of users, then there's nothing wrong with omitting your locks and using that setting. Most developers don't have those luxuries, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
: laughing: In emergency work, I have gotten close. It is *EXTREMELY* rare, though. But, when someone calls up and says "can into our office now." or "drop everything and fix this now" it is industry standard to provide a 100% rush charge, isn't it? ( maybe we are moving into CF-JOBS-TALK realm ) At 02:30 PM 3/19/2002 -0600, you wrote: >I would be in awe of people who charge such rates if it weren't for that fact >that I've worked with a few. > >- Original Message - >From: "Tim Claremont" <[EMAIL PROTECTED]> >To: "CF-Talk" <[EMAIL PROTECTED]> >Sent: Tuesday, March 19, 2002 2:23 PM >Subject: RE: UDF question > > > > > A consultant asking $250/hour and claiming a need to do > > > a full server-under-load analysis would be viewed as an > > > overpriced blowhard. > > > > I am actually considering a career as an overpriced blowhard at those > > rates... > > > > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
In my world, I view those consultants as gods Seriously, in my experience compensation all depends on the clients. At 02:14 PM 3/19/2002 -0600, you wrote: >That last sentence should read, "In my world, a consultant asking $250/hour >and claiming a need to do a full server-under-load analysis would be viewed as >an overpriced blowhard." > >- Original Message - >From: "Keith" <[EMAIL PROTECTED]> >To: "CF-Talk" <[EMAIL PROTECTED]> >Sent: Tuesday, March 19, 2002 2:07 PM >Subject: Re: UDF question > > > > I realize you weren't insulting me and I apologize. > > > > Please understand that I don't work on projects that cost 100's of > thousands > > of dollars. My customers and I have modest goals. I want to efficiently > > produce clean, maintainable applications that meet specific needs. A > > consultant asking $250/hour and claiming a need to do a full >server-under-load > > analysis would be viewed as an overpriced blowhard. > > > > [EMAIL PROTECTED] > > > > - Original Message - > > From: "Dave Watts" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Tuesday, March 19, 2002 1:23 PM > > Subject: RE: UDF question > > > > > > > I'm sorry that you read my response as a personal insult. However, I > stand > > > > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
> > A consultant asking $250/hour and claiming a need to do > > a full server-under-load analysis would be viewed as an > > overpriced blowhard. > > I am actually considering a career as an overpriced blowhard at those > rates... I've got the blowhard thing down. How exactly does one become overpriced? Sharon DiOrio __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
I would be in awe of people who charge such rates if it weren't for that fact that I've worked with a few. - Original Message - From: "Tim Claremont" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 2:23 PM Subject: RE: UDF question > > A consultant asking $250/hour and claiming a need to do > > a full server-under-load analysis would be viewed as an > > overpriced blowhard. > > I am actually considering a career as an overpriced blowhard at those > rates... > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
And around we go again... (smile) - Original Message - From: "Ken Wilson" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 2:24 PM Subject: RE: UDF question > > Please understand that I don't work on projects that cost 100's of > thousands > > of dollars. My customers and I have modest goals. I want to efficiently > > produce clean, maintainable applications that meet specific needs. > > > > Sounds like the perfect reason to use CFLOCK from the outset. :) > > Ken > > > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
> Ouch! But I wasn't insulting you. (smile) In case someone should get the wrong impression from my messages, let me state for the record... a) I use ColdFusion because it's a darn good product and I like it. b) One of the reasons that I am able to provide cost-effective solutions to my customers is that I take advantage of resources like this list and the wonderful contributions of people like Dave Watts. [EMAIL PROTECTED] - Original Message - From: "Dave Watts" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 2:23 PM Subject: RE: UDF question > > I realize you weren't insulting me and I apologize. > > No need for that. We're all rational adults here. > > > Please understand that I don't work on projects that cost > > 100's of thousands of dollars. My customers and I have > > modest goals. I want to efficiently produce clean, > > maintainable applications that meet specific needs. > > There's nothing wrong with that. In the past, though, that approach has > burned me personally, when I failed to take into account how something might > grow over time. For some projects, though, you know they won't grow that > significantly, and can act accordingly. > > > A consultant asking $250/hour and claiming a need to do > > a full server-under-load analysis would be viewed as an > > overpriced blowhard. > > Ouch! > > Heh, heh. Just kidding. I may be a blowhard, but I'm not overpriced. That > rate is for emergency work (the "my site is down, and I'll lose my job if > you can't fix it" kind of emergency). > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > voice: (202) 797-5496 > fax: (202) 797-5444 > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> Please understand that I don't work on projects that cost 100's of thousands > of dollars. My customers and I have modest goals. I want to efficiently > produce clean, maintainable applications that meet specific needs. Sounds like the perfect reason to use CFLOCK from the outset. :) Ken __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> A consultant asking $250/hour and claiming a need to do > a full server-under-load analysis would be viewed as an > overpriced blowhard. I am actually considering a career as an overpriced blowhard at those rates... __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Well at least I was able to find openSTA through this entertaining conversation! Neil -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 3:23 PM To: CF-Talk Subject: RE: UDF question > I realize you weren't insulting me and I apologize. No need for that. We're all rational adults here. > Please understand that I don't work on projects that cost > 100's of thousands of dollars. My customers and I have > modest goals. I want to efficiently produce clean, > maintainable applications that meet specific needs. There's nothing wrong with that. In the past, though, that approach has burned me personally, when I failed to take into account how something might grow over time. For some projects, though, you know they won't grow that significantly, and can act accordingly. > A consultant asking $250/hour and claiming a need to do > a full server-under-load analysis would be viewed as an > overpriced blowhard. Ouch! Heh, heh. Just kidding. I may be a blowhard, but I'm not overpriced. That rate is for emergency work (the "my site is down, and I'll lose my job if you can't fix it" kind of emergency). Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> I realize you weren't insulting me and I apologize. No need for that. We're all rational adults here. > Please understand that I don't work on projects that cost > 100's of thousands of dollars. My customers and I have > modest goals. I want to efficiently produce clean, > maintainable applications that meet specific needs. There's nothing wrong with that. In the past, though, that approach has burned me personally, when I failed to take into account how something might grow over time. For some projects, though, you know they won't grow that significantly, and can act accordingly. > A consultant asking $250/hour and claiming a need to do > a full server-under-load analysis would be viewed as an > overpriced blowhard. Ouch! Heh, heh. Just kidding. I may be a blowhard, but I'm not overpriced. That rate is for emergency work (the "my site is down, and I'll lose my job if you can't fix it" kind of emergency). Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
That last sentence should read, "In my world, a consultant asking $250/hour and claiming a need to do a full server-under-load analysis would be viewed as an overpriced blowhard." - Original Message - From: "Keith" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 2:07 PM Subject: Re: UDF question > I realize you weren't insulting me and I apologize. > > Please understand that I don't work on projects that cost 100's of thousands > of dollars. My customers and I have modest goals. I want to efficiently > produce clean, maintainable applications that meet specific needs. A > consultant asking $250/hour and claiming a need to do a full server-under-load > analysis would be viewed as an overpriced blowhard. > > [EMAIL PROTECTED] > > - Original Message - > From: "Dave Watts" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Tuesday, March 19, 2002 1:23 PM > Subject: RE: UDF question > > > > I'm sorry that you read my response as a personal insult. However, I stand > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
I realize you weren't insulting me and I apologize. Please understand that I don't work on projects that cost 100's of thousands of dollars. My customers and I have modest goals. I want to efficiently produce clean, maintainable applications that meet specific needs. A consultant asking $250/hour and claiming a need to do a full server-under-load analysis would be viewed as an overpriced blowhard. [EMAIL PROTECTED] - Original Message - From: "Dave Watts" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 1:23 PM Subject: RE: UDF question > I'm sorry that you read my response as a personal insult. However, I stand __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> I've never seen you issue such an insulting reply. You > yourself have stated that you have no "real" information > to back up your claims. > > Sorry that I disagree with you, but I don't care to have > my professionalism questioned. I'm sorry that you read my response as a personal insult. However, I stand by my statements. If you find that they apply to you in a negative way, so be it. I think that my underlying point is valid, and important enough to pursue, and state repeatedly if necessary. If you find yourself to be in that last category: "Now, if you write code which you know will always be under your direct control, and you know that you can configure the server any way you like, and you know that the code won't have to support significant number of users, then there's nothing wrong with omitting your locks and using that setting." then you have nothing to worry about, right? However, if I say "everyone not in that category should do otherwise", how does that affect (or insult) you? I've also stated that there's very little "real" information - algorithms, or recipes that you can feed inputs into and get outputs - to demonstrate any performance tuning best practices - and yet, these best practices do exist. Where do they come from? The experience of developers, who try a thing; if it fails consistently, then they take that into account. As an example, for a very long time, there's been a setting in the CF Administrator labeled "Number of simultaneous requests". For nearly as long, many developers (both Allaire/MM and external ones) had various algorithms for determining the optimal result, such as "multiply the number of processors in your server by five". Well, guess what - there IS no algorithm for finding the optimal result! You have to perform load tests, with your server configuration and with your applications, to find out the optimal value - and it can make a significant difference in performance. Now, I don't have any "real" information as to what that setting should be - but I can make a valid determination, given a server environment, a set of apps, and a copy of OpenSTA or Segue SilkPerformer. That's how you find out answers to questions like these. It's not like everything's listed in some "Big Book of Server Performance Answers" - there are often simply too many variables in the mix. Now, given that, if I say that, in my experience, the single-threaded session setting causes performance problems, how do you think I came to that conclusion? But, the beauty of this is that you don't have to believe me. Find out for yourself. Download OpenSTA (http://www.opensta.org/), learn how to use it, set up a testing area which models your real environment, set up your apps in that environment, and run two sets of tests: one against your current app, without CFLOCKS and with that setting enabled, and another against a modified copy of your app with CFLOCKS and without the setting enabled. > Shame on you. Again, I'm sorry that you're taking this as a personal insult, but I'll not feel shame for expressing my opinion, based on my experience, that this approach is, all other things being equal, bad. Bad, bad, bad. Not good. Suboptimal. Best avoided. Not recommended. Have a nice day! Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Mr. Watts, I've never seen you issue such an insulting reply. You yourself have stated that you have no "real" information to back up your claims. Sorry that I disagree with you, but I don't care to have my professionalism questioned. Shame on you. [EMAIL PROTECTED] - Original Message - From: "Dave Watts" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 12:17 PM Subject: RE: UDF question > > You're talking about developers who don't use CFLOCK > > because they are ignorant of CF locking issues. I'm > > sure we all agree that this is a bad thing, but it's > > not exactly relevent to the original discussion. > > > > You can write perfectly "solid" applications that do > > not lock session variable access. Simply enable the > > Single Threaded Sessions option in the CF Administrator. > > Again, we may disagree about "solidity" here. It's been my experience that > applications using this setting may have to be rewritten to handle > significant load. If you asked the people who purchased the applications > written this way, who then find out that they need to have changes made on > nearly every page - expensive at $250/hr - they'd probably object to using > the word "solid", unless they also worked in the words "steaming" and "pile" > as well. > > > That's been my point from the beginning. It's not helpful > > to compare this with "sloppy" or incompetent coding. > > One attribute of sloppy/incompetent coding is to avoid problem resolutions > within the code itself. That's why we have exception handlers, for example. > You could argue that, in CF, we have the site-wide error handler so we don't > need exception handlers, but I'd argue that the programmer who appropriately > uses exception handlers writes better (more competent, less sloppy) code > than the one who doesn't. A non-sloppy, competent programmer will attempt to > ensure that his program will perform optimally in whatever situation it is > run - it'll fail gracefully if some other guy doesn't configure it > correctly, or call it with the correct attributes, or whatever. > > This falls within the same category. If you write an application which > relies on my configuring a server-wide performance setting, which may very > well negatively affect how all the other apps on that server will run, and > you write it this way in order to avoid adding a few lines of code here and > there, in my book that's definitely sloppy, and not necessarily competent. > > Now, if you write code which you know will always be under your direct > control, and you know that you can configure the server any way you like, > and you know that the code won't have to support significant number of > users, then there's nothing wrong with omitting your locks and using that > setting. Most developers don't have those luxuries, though. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > voice: (202) 797-5496 > fax: (202) 797-5444 > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> You're talking about developers who don't use CFLOCK > because they are ignorant of CF locking issues. I'm > sure we all agree that this is a bad thing, but it's > not exactly relevent to the original discussion. > > You can write perfectly "solid" applications that do > not lock session variable access. Simply enable the > Single Threaded Sessions option in the CF Administrator. Again, we may disagree about "solidity" here. It's been my experience that applications using this setting may have to be rewritten to handle significant load. If you asked the people who purchased the applications written this way, who then find out that they need to have changes made on nearly every page - expensive at $250/hr - they'd probably object to using the word "solid", unless they also worked in the words "steaming" and "pile" as well. > That's been my point from the beginning. It's not helpful > to compare this with "sloppy" or incompetent coding. One attribute of sloppy/incompetent coding is to avoid problem resolutions within the code itself. That's why we have exception handlers, for example. You could argue that, in CF, we have the site-wide error handler so we don't need exception handlers, but I'd argue that the programmer who appropriately uses exception handlers writes better (more competent, less sloppy) code than the one who doesn't. A non-sloppy, competent programmer will attempt to ensure that his program will perform optimally in whatever situation it is run - it'll fail gracefully if some other guy doesn't configure it correctly, or call it with the correct attributes, or whatever. This falls within the same category. If you write an application which relies on my configuring a server-wide performance setting, which may very well negatively affect how all the other apps on that server will run, and you write it this way in order to avoid adding a few lines of code here and there, in my book that's definitely sloppy, and not necessarily competent. Now, if you write code which you know will always be under your direct control, and you know that you can configure the server any way you like, and you know that the code won't have to support significant number of users, then there's nothing wrong with omitting your locks and using that setting. Most developers don't have those luxuries, though. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: locking (was: UDF question)
> > The question is - do you want CF to automatically handle > > everything for you at the sacrifice of speed? > > Raymond, I'm not Raymond, but I'll attempt a response anyway. > My first question to you is is there ever a reason not to > lock access to Session or Application scoped variables? > Personally I can't think of one, much less one in which > the "sacrifice of speed" would come into play. I don't think that's what Ray meant. If I understand correctly, his distinction was that the programmer can place multiple variable accesses in a single scope within a single CFLOCK - and can structure his code accordingly - while the stupid computer can't do that: .. begin automatic lock ... .. end automatic lock ... .. begin automatic lock ... .. end automatic lock ... vs > My second question is isn't it true that, assuming all > other things being equal, any algorithm or function coded > in binary, compiled language is going to perform better > than one written in a markup language and executed in > JIT or even an interpreted language executed in a virtual > machine? Perhaps so, but "ceteris paribus" doesn't apply here - all other things aren't equal, as previously noted. > > It would be very difficult to make a system smart enough to know > > "Hey, I could use one lock around this particular block of code." > > Therefore, we would be stuck with the slower alternative. > > What you neglect to mention is that when you lock access to a session > variable, you lock access to all session variables, causing other, > potential more common and severe performance problems, especially in > regards to the "Application" scope. There's a potential problem here, though - the Session and Application scopes are themselves variables. Perhaps this requires that they be locked in their entirety. I don't know enough about the internals of the CF server to be sure, but it sounds possible. > In the DBMS realm, these are called hotspots, and though you generally > don't see a performance difference on most systems, a database that > implements such a locking scheme usually fails under a heavy load. It's my understanding that typically when you're talking about hotspots from a RDBMS perspective, you're referring to a specific issue of locking in conjunction with physical storage - for example, if you place a clustered index on an identity column, concurrent writes to that table will take place within the same physical storage unit (leaf, page, etc) which may be locked. If your database supports locking of individual rows, that should address the issue of hotspots. The potential cost of row-level locking, though, is that the database has to manage more individual locks, which imposes some performance overhead. Now, if we carry that analogy to CF, CF apparently doesn't have "row-level locking" - the ability to isolate a single variable within a memory scope, and lock only that variable. Instead, we have to lock the entire scope. > Did anyone say it was hard? It isn't hard to write your > own Java servlets or roll your own HTTP server in C++. > However, the entire reason for ColdFusion existence, its > point of being and single greatest justification for the > cost is that it saves development time. > > Coding three lines of code to every one reference to a > shared scope, inventing workarounds (i.e. synchronizing > all the data to the Request scope or storing serialized > session data in client variables) is not my idea of RAD. > In fact, I would say it is the exact opposite. There are always going to be limitations in how easy you can make something. If you made programming easy enough, you wouldn't need programmers, right? (That's the theory behind COBOL, if I recall correctly.) As limitations go, this one seems pretty minor, and is easier than writing Java servlets, or your own HTTP server, or even writing ASP.NET, I think. To put this in a larger context, here's a quote from Drew Falkman on the JRun-talk list, about handling concurrency with session objects in the J2EE server platform: "Well, I couldn't help myself. This is a pretty big issue and I had to know the answer - it is not in the Servlet 2.3 specification. An excerpt from the Session section: 'J2EE.7.7.1 Threading Issues Multiple servlets executing request threads may have active access to a single session object at the same time. The Developer has the responsibility for synchronizing access to session resources as appropriate.' .. Servlet 2.2 is the same: '7.7.1 Threading Issues Multiple servlets executing request threads may have active access to a single session object at the same time. The Developer has the responsibility to synchronize access to resources stored in the session as appropriate.' So there you are - it is up to us... Macromedia is obliged NOT to provide thread safety in order to be compatible with the J2EE spec." Now, it's my understanding that the latest version of JRun does actuall
Re: UDF question
You're talking about developers who don't use CFLOCK because they are ignorant of CF locking issues. I'm sure we all agree that this is a bad thing, but it's not exactly relevent to the original discussion. You can write perfectly "solid" applications that do not lock session variable access. Simply enable the Single Threaded Sessions option in the CF Administrator. That's been my point from the beginning. It's not helpful to compare this with "sloppy" or incompetent coding. [EMAIL PROTECTED] (formerly posting from junkmail) - Original Message - From: "Sharon Diorio" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 9:45 AM Subject: Re: UDF question > > The server, admittedly, does not host any > > extremely-high activity sites. > > There's the kicker. Locking variables is something you can *usually* get away with on low traffic sites. But put any load on these sites and you start getting odd errors that are seemingly sporadic (if you're not familiar with locking issues.) Since none of us truly knows what kind of load a site might ultimately have to support, getting into the habit of writing solid code from the start is a good idea. > > Sharon DiOrio > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: locking (was: UDF question)
- Original Message - From: "Dave Watts" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, March 19, 2002 11:05 AM Subject: RE: locking (was: UDF question) > I know that this is only a typo, but you meant "Not locking variables ...", > right? Yep. Missed my morning coffee...thanks! Sharon DiOrio __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: locking (was: UDF question)
> > The server, admittedly, does not host any > > extremely-high activity sites. > > There's the kicker. Locking variables is something you can > *usually* get away with on low traffic sites. But put any > load on these sites and you start getting odd errors that are > seemingly sporadic (if you're not familiar with locking > issues.) Since none of us truly knows what kind of load a > site might ultimately have to support, getting into the habit > of writing solid code from the start is a good idea. I know that this is only a typo, but you meant "Not locking variables ...", right? And in support of Sharon's statement, just yesterday I did some troubleshooting work for a client whose public site was failing under load - and not even that much load, really. The problem? Unlocked memory variables. Whoever built the application in the first place didn't bother to lock them consistently. The result? Approximately one week of downtime, during which this client couldn't do their primary, line-of-business task. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
- Original Message - From: "Jim Curran" <[EMAIL PROTECTED]> > Just a thought off the top of my head, > 1) copy the session structure to a temporary local structure in > Application.cfm: > > > > Actually, this is one of the more common workarounds for locking issues. Although I usually use REQUEST scope for this so that the variable is available to all templates, including custom tags. Depending on how much data you've got stuffed into shared scopes, you can do a wholesale copy of both scopes. REQUEST.application = structNew(); for (i IN APPLICATION) { REQUEST.application[i] = duplicate(APPLICATION[i]); } Then do the same thing for Session. It does add overhead to the application. But if the main concern is cleaner code, this can be a viable workaround. (structCopy() has been deprecated in favor of the duplicate() function.) Sharon DiOrio __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: RE: UDF question
> > The only concurrency issues that seem to come up in CF are > > when we needto single thread any piece of code - that's what > > the locks do. But I haven't seen any code at all that allows > > us to start new threads in the same page. > > Everytime a new user goes onto your web site, a new thread is > used for that user. So although at the page level, you can't > start new threads, threading certainly exists in CF at the > application level. This isn't exactly how CF works, at least not on Windows. The number of threads available for processing CF requests is fixed, and those threads are created when the server starts up. If more requests exist than threads to process them, those requests will be queued until a thread is free. To set the number of worker threads, you change the "Number of simultaneous requests" setting in the CF Administrator. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
> The server, admittedly, does not host any > extremely-high activity sites. There's the kicker. Locking variables is something you can *usually* get away with on low traffic sites. But put any load on these sites and you start getting odd errors that are seemingly sporadic (if you're not familiar with locking issues.) Since none of us truly knows what kind of load a site might ultimately have to support, getting into the habit of writing solid code from the start is a good idea. Sharon DiOrio __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Thanks Ray & Jochem - j -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 10:18 AM To: CF-Talk Subject: RE: UDF question Just a reminder - whenever you copy _any_ structure, if you are not 100% sure the data is flat (no deep structs), you should use Duplicate() instead. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Matthew R. Small [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 19, 2002 10:21 AM > To: CF-Talk > Subject: RE: UDF question > > > I think it's already pretty common practice to copy the session > structure to the request scope, which also does not need to be locked. > I don't do it, but then I also don't use many session variables. > > - Matt Small > > -Original Message- > From: Jim Curran [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 19, 2002 10:11 AM > To: CF-Talk > Subject: RE: UDF question > > Hey all, > > Just a thought off the top of my head, > > Premise: Local Vars do not need to be cflocked > > Why not __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> Just a thought off the top of my head, > > Premise: Local Vars do not need to be cflocked > > Why not > > 1) copy the session structure to a temporary local > structure in Application.cfm: > > > > > > 2) Reference the temp structure in all templates: > > ... > > 3) Set the session struct equal to the temp struct in > OnRequestEnd.cfm > > > > > > I know this probably wouldn't work in the application scope > due to the execution time for each template: data might be > overwritten by multiple users; but in the session scope, it > seems to make sense. Many others have had this thought, to the degree that there's an example of this in the official Macromedia courseware ("Advanced ColdFusion Development"). However, it's been my experience that, in most cases, this doesn't work very well in the real world. Copying the entire scope into a local variable is very expensive, and causes problems under load. We actually tried implementing this in an application, but had to revert to the practice of simply locking variables as appropriate within a page. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> > 3) Set the session struct equal to the temp struct in > OnRequestEnd.cfm > > > > > > > > > > Use Duplicate() instead of StructCopy() because StructCopy() doesn't > copy as many levels as it should. > No - it _does_ go as deep as possible, but it creates pointers on the lower levels, not true copies. Just being anal. ;) === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Just a reminder - whenever you copy _any_ structure, if you are not 100% sure the data is flat (no deep structs), you should use Duplicate() instead. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Matthew R. Small [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 19, 2002 10:21 AM > To: CF-Talk > Subject: RE: UDF question > > > I think it's already pretty common practice to copy the session > structure to the request scope, which also does not need to be locked. > I don't do it, but then I also don't use many session variables. > > - Matt Small > > -Original Message- > From: Jim Curran [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 19, 2002 10:11 AM > To: CF-Talk > Subject: RE: UDF question > > Hey all, > > Just a thought off the top of my head, > > Premise: Local Vars do not need to be cflocked > > Why not __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Jim Curran wrote: > > 1) copy the session structure to a temporary local structure in > Application.cfm: > > > > > > 2) Reference the temp structure in all templates: > > ... > > 3) Set the session struct equal to the temp struct in OnRequestEnd.cfm > > > > Use Duplicate() instead of StructCopy() because StructCopy() doesn't copy as many levels as it should. Jochem __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
I think it's already pretty common practice to copy the session structure to the request scope, which also does not need to be locked. I don't do it, but then I also don't use many session variables. - Matt Small -Original Message- From: Jim Curran [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 10:11 AM To: CF-Talk Subject: RE: UDF question Hey all, Just a thought off the top of my head, Premise: Local Vars do not need to be cflocked Why not 1) copy the session structure to a temporary local structure in Application.cfm: 2) Reference the temp structure in all templates: ... 3) Set the session struct equal to the temp struct in OnRequestEnd.cfm I know this probably wouldn't work in the application scope due to the execution time for each template: data might be overwritten by multiple users; but in the session scope, it seems to make sense. Anyone agree? - j __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Hey all, Just a thought off the top of my head, Premise: Local Vars do not need to be cflocked Why not 1) copy the session structure to a temporary local structure in Application.cfm: 2) Reference the temp structure in all templates: ... 3) Set the session struct equal to the temp struct in OnRequestEnd.cfm I know this probably wouldn't work in the application scope due to the execution time for each template: data might be overwritten by multiple users; but in the session scope, it seems to make sense. Anyone agree? - j __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
[deletia] > My second question is isn't it true that, assuming all other things > being equal, any algorithm or function coded in binary, compiled > language is going to perform better than one written in a markup > language and executed in JIT or even an interpreted language > executed in > a virtual machine? Agreed, but once again I come back to the concept that the compiler, no matter how fast, may not lock as effeciently as the developer does. [deletia] > > It would be very difficult to make a system smart enough to know > > "Hey, I could use one lock around this particular block of code." > > Therefore, we would be stuck with the slower alternative. > > What you neglect to mention is that when you lock access to a session > variable, you lock access to all session variables, causing other, > potential more common and severe performance problems, especially in > regards to the "Application" scope. Like what? Also, there are different kinds of locks. You only block access to the scope during an exclusive lock. Most situations will have code that is written rarely and read often. [deletia] > Coding three lines of code to every one reference to a shared scope, > inventing workarounds (i.e. synchronizing all the data to the Request > scope or storing serialized session data in client variables) > is not my > idea of RAD. In fact, I would say it is the exact opposite. I disagree, but, I'm getting the idea this is like religion and we won't convince each other. ;) I _truly_ think people here are underestimating the complexity of auto locking inside the server. -rc __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: RE: UDF question
> I don't think it's a multi-threaded language because it is > not possible (to my knowledge) to start a new thread and > have it run while the main thread continues execution, then > notify the main thread when it's done executing. The fact > that we need to be concerned about multi-threading comes > into play because the server itself is multi-threaded and > those other threads can affect the performance of a single > thread. > > As I sit here I'm starting to think that CFML is neither > mulit-threaded nor single threaded. It's somewhere in between > because it has characteristics of both. Fractal threaded > maybe? :-) I think you're making this more complicated than it has to be. There are many programming environments and APIs in which you have to be concerned with concurrency issues, even if you're not spawning threads within your code. You have to write "thread-safe" code. COM and CFX are two examples. CFML (or any web development environment, for that matter) is just one more. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Nice post. I hadn't given much thought to the implications of a scoped lock preventing access to the entire scope--a very good argument in favor of implementing automatic internal locking, which would only need to lock the specific item being accessed. Gosh folks, this should be simple stuff for the Macromedia engineers to implement. Accessing a variable in an interpreted language is typically a two step procedure. You look up the name and you get the value. For the duration of the name lookup, you want lock out other processes trying to add or delete variable names. For the duration of the value access, you want to lock out other processes trying to alter the variable value or reorganize the variable heap. There are easy ways to do this which add negligible processing load. Surfacing all of this stuff to the ColdFusion application level is totally unnecessary. In a properly implemented system, using CFLOCK for variable access would be totally unnecessary and provide no benefit. [EMAIL PROTECTED] - Original Message - From: "Benjamin S. Rogers" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 4:31 PM Subject: RE: UDF question > > The question is - do you want CF to automatically handle everything > > for you at the sacrifice of speed? > > Raymond, > > My first question to you is is there ever a reason not to lock access to > Session or Application scoped variables? Personally I can't think of > one, much less one in which the "sacrifice of speed" would come into > play. > > My second question is isn't it true that, assuming all other things > being equal, any algorithm or function coded in binary, compiled > language is going to perform better than one written in a markup > language and executed in JIT or even an interpreted language executed in > a virtual machine? > > Now, assuming the answer to both of these questions is yes, I can only > believe that, in addition to being more stable in environments where > developers don't lock religiously, ColdFusion would actually perform > faster in any environment where developers properly lock all access to > shared scope variables. > > > It would be very difficult to make a system smart enough to know > > "Hey, I could use one lock around this particular block of code." > > Therefore, we would be stuck with the slower alternative. > > What you neglect to mention is that when you lock access to a session > variable, you lock access to all session variables, causing other, > potential more common and severe performance problems, especially in > regards to the "Application" scope. > > In the DBMS realm, these are called hotspots, and though you generally > don't see a performance difference on most systems, a database that > implements such a locking scheme usually fails under a heavy load. > > > Personally, I'd rather just do the work. It can't be that hard to > > cflock, or duplicate to the request scope. > > Did anyone say it was hard? It isn't hard to write your own Java > servlets or roll your own HTTP server in C++. However, the entire reason > for ColdFusion existence, its point of being and single greatest > justification for the cost is that it saves development time. > > Coding three lines of code to every one reference to a shared scope, > inventing workarounds (i.e. synchronizing all the data to the Request > scope or storing serialized session data in client variables) is not my > idea of RAD. In fact, I would say it is the exact opposite. > > God, what would writing SQL be like if I had to manually lock access to > each record before issuing a query? Better yet, people snubbed their > nose at MySQL because it didn't have row level locking but that is, in > essence, how ColdFusion behaves: lock the whole scope instead of the > variable being modified. MySQL has seen the light. Hopefully Macromedia > will one of these days. > > Benjamin S. Rogers > http://www.c4.net/ > v.508.240.0051 > f.508.240.0057 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Well said. - Matt Small -Original Message- From: Benjamin S. Rogers [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 5:32 PM To: CF-Talk Subject: RE: UDF question > The question is - do you want CF to automatically handle everything > for you at the sacrifice of speed? Raymond, My first question to you is is there ever a reason not to lock access to Session or Application scoped variables? Personally I can't think of one, much less one in which the "sacrifice of speed" would come into play. My second question is isn't it true that, assuming all other things being equal, any algorithm or function coded in binary, compiled language is going to perform better than one written in a markup language and executed in JIT or even an interpreted language executed in a virtual machine? Now, assuming the answer to both of these questions is yes, I can only believe that, in addition to being more stable in environments where developers don't lock religiously, ColdFusion would actually perform faster in any environment where developers properly lock all access to shared scope variables. > It would be very difficult to make a system smart enough to know > "Hey, I could use one lock around this particular block of code." > Therefore, we would be stuck with the slower alternative. What you neglect to mention is that when you lock access to a session variable, you lock access to all session variables, causing other, potential more common and severe performance problems, especially in regards to the "Application" scope. In the DBMS realm, these are called hotspots, and though you generally don't see a performance difference on most systems, a database that implements such a locking scheme usually fails under a heavy load. > Personally, I'd rather just do the work. It can't be that hard to > cflock, or duplicate to the request scope. Did anyone say it was hard? It isn't hard to write your own Java servlets or roll your own HTTP server in C++. However, the entire reason for ColdFusion existence, its point of being and single greatest justification for the cost is that it saves development time. Coding three lines of code to every one reference to a shared scope, inventing workarounds (i.e. synchronizing all the data to the Request scope or storing serialized session data in client variables) is not my idea of RAD. In fact, I would say it is the exact opposite. God, what would writing SQL be like if I had to manually lock access to each record before issuing a query? Better yet, people snubbed their nose at MySQL because it didn't have row level locking but that is, in essence, how ColdFusion behaves: lock the whole scope instead of the variable being modified. MySQL has seen the light. Hopefully Macromedia will one of these days. Benjamin S. Rogers http://www.c4.net/ v.508.240.0051 f.508.240.0057 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> The question is - do you want CF to automatically handle everything > for you at the sacrifice of speed? Raymond, My first question to you is is there ever a reason not to lock access to Session or Application scoped variables? Personally I can't think of one, much less one in which the "sacrifice of speed" would come into play. My second question is isn't it true that, assuming all other things being equal, any algorithm or function coded in binary, compiled language is going to perform better than one written in a markup language and executed in JIT or even an interpreted language executed in a virtual machine? Now, assuming the answer to both of these questions is yes, I can only believe that, in addition to being more stable in environments where developers don't lock religiously, ColdFusion would actually perform faster in any environment where developers properly lock all access to shared scope variables. > It would be very difficult to make a system smart enough to know > "Hey, I could use one lock around this particular block of code." > Therefore, we would be stuck with the slower alternative. What you neglect to mention is that when you lock access to a session variable, you lock access to all session variables, causing other, potential more common and severe performance problems, especially in regards to the "Application" scope. In the DBMS realm, these are called hotspots, and though you generally don't see a performance difference on most systems, a database that implements such a locking scheme usually fails under a heavy load. > Personally, I'd rather just do the work. It can't be that hard to > cflock, or duplicate to the request scope. Did anyone say it was hard? It isn't hard to write your own Java servlets or roll your own HTTP server in C++. However, the entire reason for ColdFusion existence, its point of being and single greatest justification for the cost is that it saves development time. Coding three lines of code to every one reference to a shared scope, inventing workarounds (i.e. synchronizing all the data to the Request scope or storing serialized session data in client variables) is not my idea of RAD. In fact, I would say it is the exact opposite. God, what would writing SQL be like if I had to manually lock access to each record before issuing a query? Better yet, people snubbed their nose at MySQL because it didn't have row level locking but that is, in essence, how ColdFusion behaves: lock the whole scope instead of the variable being modified. MySQL has seen the light. Hopefully Macromedia will one of these days. Benjamin S. Rogers http://www.c4.net/ v.508.240.0051 f.508.240.0057 __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: RE: UDF question
But that's not CFML, that's HTML. And you can't thread a separate process to run concurrently inside the page. -Original Message- From: Shawn Grover [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 5:12 PM To: CF-Talk Subject: RE: RE: UDF question You can begin mulitple threads simply by declaring a frameset. In that case, you'll have two or more pages being loaded into their respective frames with (near) simultaneous calls. Which means the server can be responding to either of those calls at any given time. The problem now comes when these two (or more pages) make reference to a common session or applicaiton variable. Who get's precedence? What if they are both writing at the same instance. This is the reason for locking. The argument here though is that the server should be able to handle this locking on the fly, on it's own. I think this is going come down to a developer style issue - more than one way to do it, and all of them right because they acheive the same results. I've yet to see strong arguments why CF Server should not handle the locking, but then again, I've yet to see strong arguments why the developers shouldn't handle it. Hence, I think a compromise is in order, and would offer the best solution for everyone involved (see my earlier post on this thread). My observations, not yours. Shawn Grover -Original Message- From: Matthew R. Small [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:01 PM To: CF-Talk Subject: RE: RE: UDF question I don't think it's a multi-threaded language because it is not possible (to my knowledge) to start a new thread and have it run while the main thread continues execution, then notify the main thread when it's done executing. The fact that we need to be concerned about multi-threading comes into play because the server itself is multi-threaded and those other threads can affect the performance of a single thread. As I sit here I'm starting to think that CFML is neither mulit-threaded nor single threaded. It's somewhere in between because it has characteristics of both. Fractal threaded maybe? :-) My humble opinion. Matt Small -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 4:38 PM To: CF-Talk Subject: Re: RE: UDF question See below: - Original Message - From: "Matthew R. Small" <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 2:33 pm Subject: RE: UDF question > The only concurrency issues that seem to come up in CF are when we > needto single thread any piece of code - that's what the locks do. > But I > haven't seen any code at all that allows us to start new threads > in the > same page. Everytime a new user goes onto your web site, a new thread is used for that user. So although at the page level, you can't start new threads, threading certainly exists in CF at the application level. > As I understand it, C++ is a multi-threaded language. CFAS is a > multi-threaded application written in C++. CFML is a single-threaded > language that needs to take into account multiple threads on > occasion. If CF needs to take into account multiple threads, then it's multi- threaded capable. :) > > Please correct me if I'm wrong. > > - Matt Small > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 4:10 PM > To: CF-Talk > Subject: Re: UDF question > > CF is merely an abstraction of a crap load of C++ code. > > I agree with you on the process that happens when you define a > variable > in CF. I don't see how that absolves the programmer of coming up > with > the best way of handling concurrency issues. > > Regardless, CF does provide you with many mechanisms of locking > control. What really matters is picking the one that suits you, > and to > write code that is in line with the decision you've made. > > > - Original Message - > From: junkMail <[EMAIL PROTECTED]> > Date: Monday, March 18, 2002 1:18 pm > Subject: Re: UDF question > > > With respect to this issue, comparing CFML to C++ is apples to > > oranges. > > I can't expect a low-level language to automatically manage > > concurrent access > > to shared memory resources, because I have defined the resources > > and I have > > decided how they are to be accessed and shared. I can't expect > a > > such system > > to be prescient. > > > > The situation is different in ColdFusion. Although I declare > and > > use the > > variables, ColdFusion creates the resources in memory and > > essentially decides > > how they are to be accessed and shared. ColdFusion can AND > SHO
RE: RE: UDF question
You can begin mulitple threads simply by declaring a frameset. In that case, you'll have two or more pages being loaded into their respective frames with (near) simultaneous calls. Which means the server can be responding to either of those calls at any given time. The problem now comes when these two (or more pages) make reference to a common session or applicaiton variable. Who get's precedence? What if they are both writing at the same instance. This is the reason for locking. The argument here though is that the server should be able to handle this locking on the fly, on it's own. I think this is going come down to a developer style issue - more than one way to do it, and all of them right because they acheive the same results. I've yet to see strong arguments why CF Server should not handle the locking, but then again, I've yet to see strong arguments why the developers shouldn't handle it. Hence, I think a compromise is in order, and would offer the best solution for everyone involved (see my earlier post on this thread). My observations, not yours. Shawn Grover -Original Message- From: Matthew R. Small [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:01 PM To: CF-Talk Subject: RE: RE: UDF question I don't think it's a multi-threaded language because it is not possible (to my knowledge) to start a new thread and have it run while the main thread continues execution, then notify the main thread when it's done executing. The fact that we need to be concerned about multi-threading comes into play because the server itself is multi-threaded and those other threads can affect the performance of a single thread. As I sit here I'm starting to think that CFML is neither mulit-threaded nor single threaded. It's somewhere in between because it has characteristics of both. Fractal threaded maybe? :-) My humble opinion. Matt Small -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 4:38 PM To: CF-Talk Subject: Re: RE: UDF question See below: - Original Message - From: "Matthew R. Small" <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 2:33 pm Subject: RE: UDF question > The only concurrency issues that seem to come up in CF are when we > needto single thread any piece of code - that's what the locks do. > But I > haven't seen any code at all that allows us to start new threads > in the > same page. Everytime a new user goes onto your web site, a new thread is used for that user. So although at the page level, you can't start new threads, threading certainly exists in CF at the application level. > As I understand it, C++ is a multi-threaded language. CFAS is a > multi-threaded application written in C++. CFML is a single-threaded > language that needs to take into account multiple threads on > occasion. If CF needs to take into account multiple threads, then it's multi- threaded capable. :) > > Please correct me if I'm wrong. > > - Matt Small > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 4:10 PM > To: CF-Talk > Subject: Re: UDF question > > CF is merely an abstraction of a crap load of C++ code. > > I agree with you on the process that happens when you define a > variable > in CF. I don't see how that absolves the programmer of coming up > with > the best way of handling concurrency issues. > > Regardless, CF does provide you with many mechanisms of locking > control. What really matters is picking the one that suits you, > and to > write code that is in line with the decision you've made. > > > - Original Message - > From: junkMail <[EMAIL PROTECTED]> > Date: Monday, March 18, 2002 1:18 pm > Subject: Re: UDF question > > > With respect to this issue, comparing CFML to C++ is apples to > > oranges. > > I can't expect a low-level language to automatically manage > > concurrent access > > to shared memory resources, because I have defined the resources > > and I have > > decided how they are to be accessed and shared. I can't expect > a > > such system > > to be prescient. > > > > The situation is different in ColdFusion. Although I declare > and > > use the > > variables, ColdFusion creates the resources in memory and > > essentially decides > > how they are to be accessed and shared. ColdFusion can AND > SHOULD > > manage the > > concurrency issues. > > > > C++ is not a multi-threaded language. It's a language capable > of > > producingmulti-threaded applications, such as ColdFusion. > > > > [EMAIL PROTECTED] > > > > > &
RE: RE: UDF question
I don't think it's a multi-threaded language because it is not possible (to my knowledge) to start a new thread and have it run while the main thread continues execution, then notify the main thread when it's done executing. The fact that we need to be concerned about multi-threading comes into play because the server itself is multi-threaded and those other threads can affect the performance of a single thread. As I sit here I'm starting to think that CFML is neither mulit-threaded nor single threaded. It's somewhere in between because it has characteristics of both. Fractal threaded maybe? :-) My humble opinion. Matt Small -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 4:38 PM To: CF-Talk Subject: Re: RE: UDF question See below: - Original Message - From: "Matthew R. Small" <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 2:33 pm Subject: RE: UDF question > The only concurrency issues that seem to come up in CF are when we > needto single thread any piece of code - that's what the locks do. > But I > haven't seen any code at all that allows us to start new threads > in the > same page. Everytime a new user goes onto your web site, a new thread is used for that user. So although at the page level, you can't start new threads, threading certainly exists in CF at the application level. > As I understand it, C++ is a multi-threaded language. CFAS is a > multi-threaded application written in C++. CFML is a single-threaded > language that needs to take into account multiple threads on > occasion. If CF needs to take into account multiple threads, then it's multi- threaded capable. :) > > Please correct me if I'm wrong. > > - Matt Small > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 4:10 PM > To: CF-Talk > Subject: Re: UDF question > > CF is merely an abstraction of a crap load of C++ code. > > I agree with you on the process that happens when you define a > variable > in CF. I don't see how that absolves the programmer of coming up > with > the best way of handling concurrency issues. > > Regardless, CF does provide you with many mechanisms of locking > control. What really matters is picking the one that suits you, > and to > write code that is in line with the decision you've made. > > > - Original Message - > From: junkMail <[EMAIL PROTECTED]> > Date: Monday, March 18, 2002 1:18 pm > Subject: Re: UDF question > > > With respect to this issue, comparing CFML to C++ is apples to > > oranges. > > I can't expect a low-level language to automatically manage > > concurrent access > > to shared memory resources, because I have defined the resources > > and I have > > decided how they are to be accessed and shared. I can't expect > a > > such system > > to be prescient. > > > > The situation is different in ColdFusion. Although I declare > and > > use the > > variables, ColdFusion creates the resources in memory and > > essentially decides > > how they are to be accessed and shared. ColdFusion can AND > SHOULD > > manage the > > concurrency issues. > > > > C++ is not a multi-threaded language. It's a language capable > of > > producingmulti-threaded applications, such as ColdFusion. > > > > [EMAIL PROTECTED] > > > > > > - Original Message - > > From: <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Monday, March 18, 2002 1:58 PM > > Subject: Re: UDF question > > > > > > > Interesting. > > > > > > Any language that implements locking (read: any that are worth > > > programming in) uses some sort of "sloppy" locking mechanism. > > Some are > > > downright evil (read: C++). Certainly, I can't think of any > > multi- > > > threaded languages that handle concurrency automatically. > > > > > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Why not add it to the "Real men like to take the pain and do things the hard way" thread? (smile) I did six years of development work on a product in roughly the same category as ColdFusion (albeit pre-Internet). The core was written in Assembler, extensions in C. It was heavy duty stuff and great fun. Now I'm developing end-user applications and trying to do it efficiently. I don't want to think about ColdFusion internals (at least while I'm doing my work). It's been my experience that a lot of programmer-types have an aversion to simplicity. [EMAIL PROTECTED] - Original Message - From: "Sharon Diorio" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 3:13 PM Subject: Re: UDF question > I'm with Raymond. It was a royal PITA to get used to locking all variable access, but now that I'm in the habit, it isnt' that bad. Like most things, I'll choose the extra level of control at the expense of convenience. > > Should this thread be appended to "the difference between a developer and a coder" thread? ;-) > > Sharon __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: RE: RE: UDF question
If a CFML application was compiled, then I would say that CF could do a really good damn job of putting locks in the right places. But even languages like Java don't do this. Which tells me that compilers have a lonnn way to go before they write code better than a programmer. Which is born out by: Assembly is faster than everything. - Original Message - From: "Matthew R. Small" <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 2:39 pm Subject: RE: RE: UDF question > You're right... it seems that the real question is whether or not the > server can determine whether to exclusive lock or read-only lock > betterthan the programmer. I (and Junkmail it appears) happen to > think that > it can, based on the rules that the CFML coders at MM give it. I > base my > thinking on having written my own compiler at one time. You and > Raymondappear to be in the other camp, which is that coders need > control over > the locks. I think you guys win in the end, because that's the way it > is. :-) > > - Matt Small > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 4:19 PM > To: CF-Talk > Subject: Re: RE: UDF question > > It comes down to a game: > > Can the server decide the best way to lock in less time than the > "best > manually coded" lock? > > Which then boils down to: > > Can the CF interpreter decide the best way to lock in less time > than > the time it would take a programmer to code the "best manually > coded" > lock? > > Which gives you the answer: > > No. > > But then, you come up with: > > Ok, fine, the interpreter can't decide the optimal way. But then, > at > what speed computer do we need so that the interpreter's "best not > optimal solution" runs at the same speed as the programmers "best > manually coded" lock? > > So there you go. Once we have 1 terahertz machines, it's really > going > to be irrelevant. Just like how using a GUI API these days is > irrelevant in coding. Sure, you could right your own GUI code, > but why > bother when even a marginal solution does the job really really > quickly > on today's computers? > > - Original Message - > From: Raymond Camden <[EMAIL PROTECTED]> > Date: Monday, March 18, 2002 1:40 pm > Subject: RE: UDF question > > > > But shouldn't this whole issue be written into the server code? > > > Wouldn't it would run much faster that way than both the > > > individual sets > > > of cflocks that you've portrayed and the reality which is > > > sets of locks > > > around blocks of session accesses? As far as readonly or > > > exclusive goes, > > > then shouldn't the complier be able to distinguish the two? > > > > Again, speaking as a guy who has never used C++ or any other 'deep' > > language (well, Java, but Java is easy ;), I don't think you are > > right,and I HIGHLY encourage anyone out there to correct me if > I'm > > wrong. I'm > > not saying the server CANT do the lock, I'm just saying that it > could> not be as fast as lettering the user make specific locks. > > > > > And as long as we're here, show me a single time when you > > > don't want to > > > use locks around a session scope. > > > > > > > Um I can't, because I _always_ think you should use locks. > Did you > > mean that question for me? ;) > > > > > === > > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia > > > > Email: [EMAIL PROTECTED] > > Yahoo IM : morpheus > > > > "My ally is the Force, and a powerful ally it is." - Yoda > > > > > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: RE: UDF question
See below: - Original Message - From: "Matthew R. Small" <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 2:33 pm Subject: RE: UDF question > The only concurrency issues that seem to come up in CF are when we > needto single thread any piece of code - that's what the locks do. > But I > haven't seen any code at all that allows us to start new threads > in the > same page. Everytime a new user goes onto your web site, a new thread is used for that user. So although at the page level, you can't start new threads, threading certainly exists in CF at the application level. > As I understand it, C++ is a multi-threaded language. CFAS is a > multi-threaded application written in C++. CFML is a single-threaded > language that needs to take into account multiple threads on > occasion. If CF needs to take into account multiple threads, then it's multi- threaded capable. :) > > Please correct me if I'm wrong. > > - Matt Small > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 4:10 PM > To: CF-Talk > Subject: Re: UDF question > > CF is merely an abstraction of a crap load of C++ code. > > I agree with you on the process that happens when you define a > variable > in CF. I don't see how that absolves the programmer of coming up > with > the best way of handling concurrency issues. > > Regardless, CF does provide you with many mechanisms of locking > control. What really matters is picking the one that suits you, > and to > write code that is in line with the decision you've made. > > > - Original Message - > From: junkMail <[EMAIL PROTECTED]> > Date: Monday, March 18, 2002 1:18 pm > Subject: Re: UDF question > > > With respect to this issue, comparing CFML to C++ is apples to > > oranges. > > I can't expect a low-level language to automatically manage > > concurrent access > > to shared memory resources, because I have defined the resources > > and I have > > decided how they are to be accessed and shared. I can't expect > a > > such system > > to be prescient. > > > > The situation is different in ColdFusion. Although I declare > and > > use the > > variables, ColdFusion creates the resources in memory and > > essentially decides > > how they are to be accessed and shared. ColdFusion can AND > SHOULD > > manage the > > concurrency issues. > > > > C++ is not a multi-threaded language. It's a language capable > of > > producingmulti-threaded applications, such as ColdFusion. > > > > [EMAIL PROTECTED] > > > > > > - Original Message - > > From: <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Monday, March 18, 2002 1:58 PM > > Subject: Re: UDF question > > > > > > > Interesting. > > > > > > Any language that implements locking (read: any that are worth > > > programming in) uses some sort of "sloppy" locking mechanism. > > Some are > > > downright evil (read: C++). Certainly, I can't think of any > > multi- > > > threaded languages that handle concurrency automatically. > > > > > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: RE: UDF question
You're right... it seems that the real question is whether or not the server can determine whether to exclusive lock or read-only lock better than the programmer. I (and Junkmail it appears) happen to think that it can, based on the rules that the CFML coders at MM give it. I base my thinking on having written my own compiler at one time. You and Raymond appear to be in the other camp, which is that coders need control over the locks. I think you guys win in the end, because that's the way it is. :-) - Matt Small -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 4:19 PM To: CF-Talk Subject: Re: RE: UDF question It comes down to a game: Can the server decide the best way to lock in less time than the "best manually coded" lock? Which then boils down to: Can the CF interpreter decide the best way to lock in less time than the time it would take a programmer to code the "best manually coded" lock? Which gives you the answer: No. But then, you come up with: Ok, fine, the interpreter can't decide the optimal way. But then, at what speed computer do we need so that the interpreter's "best not optimal solution" runs at the same speed as the programmers "best manually coded" lock? So there you go. Once we have 1 terahertz machines, it's really going to be irrelevant. Just like how using a GUI API these days is irrelevant in coding. Sure, you could right your own GUI code, but why bother when even a marginal solution does the job really really quickly on today's computers? - Original Message - From: Raymond Camden <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 1:40 pm Subject: RE: UDF question > > But shouldn't this whole issue be written into the server code? > > Wouldn't it would run much faster that way than both the > > individual sets > > of cflocks that you've portrayed and the reality which is > > sets of locks > > around blocks of session accesses? As far as readonly or > > exclusive goes, > > then shouldn't the complier be able to distinguish the two? > > Again, speaking as a guy who has never used C++ or any other 'deep' > language (well, Java, but Java is easy ;), I don't think you are > right,and I HIGHLY encourage anyone out there to correct me if I'm > wrong. I'm > not saying the server CANT do the lock, I'm just saying that it could > not be as fast as lettering the user make specific locks. > > > And as long as we're here, show me a single time when you > > don't want to > > use locks around a session scope. > > > > Um I can't, because I _always_ think you should use locks. Did you > mean that question for me? ;) > > === > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia > > Email: [EMAIL PROTECTED] > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
The only concurrency issues that seem to come up in CF are when we need to single thread any piece of code - that's what the locks do. But I haven't seen any code at all that allows us to start new threads in the same page. As I understand it, C++ is a multi-threaded language. CFAS is a multi-threaded application written in C++. CFML is a single-threaded language that needs to take into account multiple threads on occasion. Please correct me if I'm wrong. - Matt Small -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 4:10 PM To: CF-Talk Subject: Re: UDF question CF is merely an abstraction of a crap load of C++ code. I agree with you on the process that happens when you define a variable in CF. I don't see how that absolves the programmer of coming up with the best way of handling concurrency issues. Regardless, CF does provide you with many mechanisms of locking control. What really matters is picking the one that suits you, and to write code that is in line with the decision you've made. - Original Message - From: junkMail <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 1:18 pm Subject: Re: UDF question > With respect to this issue, comparing CFML to C++ is apples to > oranges. > I can't expect a low-level language to automatically manage > concurrent access > to shared memory resources, because I have defined the resources > and I have > decided how they are to be accessed and shared. I can't expect a > such system > to be prescient. > > The situation is different in ColdFusion. Although I declare and > use the > variables, ColdFusion creates the resources in memory and > essentially decides > how they are to be accessed and shared. ColdFusion can AND SHOULD > manage the > concurrency issues. > > C++ is not a multi-threaded language. It's a language capable of > producingmulti-threaded applications, such as ColdFusion. > > [EMAIL PROTECTED] > > > - Original Message ----- > From: <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 1:58 PM > Subject: Re: UDF question > > > > Interesting. > > > > Any language that implements locking (read: any that are worth > > programming in) uses some sort of "sloppy" locking mechanism. > Some are > > downright evil (read: C++). Certainly, I can't think of any > multi- > > threaded languages that handle concurrency automatically. > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
I'm with Raymond. It was a royal PITA to get used to locking all variable access, but now that I'm in the habit, it isnt' that bad. Like most things, I'll choose the extra level of control at the expense of convenience. Should this thread be appended to "the difference between a developer and a coder" thread? ;-) Sharon - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 3:25 PM Subject: RE: UDF question > (Taking off Macromedia cap and speaking as just one of yall...) > The question is - do you want CF to automatically handle everything for > you at the sacrifice of speed? __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> Actually, it was a question for you because if there locks should be > used in every situation then why even make it an option for the I already answered this though - the idea is that the programmer is better and deciding how the locks should be implemented. > programmer? And I do disagree with you. Locking at the CFML layer > should definitely be slower than locking at the CFAS layer because of > the issue of interpretation and execution rather than pure > execution of > native code. I don't agree here - but, as you say below, we are both unaware of the code beneath. > I will state that I can't back any of this up because I don't know the > inner workings of the server. > -rc __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: RE: UDF question
It comes down to a game: Can the server decide the best way to lock in less time than the "best manually coded" lock? Which then boils down to: Can the CF interpreter decide the best way to lock in less time than the time it would take a programmer to code the "best manually coded" lock? Which gives you the answer: No. But then, you come up with: Ok, fine, the interpreter can't decide the optimal way. But then, at what speed computer do we need so that the interpreter's "best not optimal solution" runs at the same speed as the programmers "best manually coded" lock? So there you go. Once we have 1 terahertz machines, it's really going to be irrelevant. Just like how using a GUI API these days is irrelevant in coding. Sure, you could right your own GUI code, but why bother when even a marginal solution does the job really really quickly on today's computers? - Original Message - From: Raymond Camden <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 1:40 pm Subject: RE: UDF question > > But shouldn't this whole issue be written into the server code? > > Wouldn't it would run much faster that way than both the > > individual sets > > of cflocks that you've portrayed and the reality which is > > sets of locks > > around blocks of session accesses? As far as readonly or > > exclusive goes, > > then shouldn't the complier be able to distinguish the two? > > Again, speaking as a guy who has never used C++ or any other 'deep' > language (well, Java, but Java is easy ;), I don't think you are > right,and I HIGHLY encourage anyone out there to correct me if I'm > wrong. I'm > not saying the server CANT do the lock, I'm just saying that it could > not be as fast as lettering the user make specific locks. > > > And as long as we're here, show me a single time when you > > don't want to > > use locks around a session scope. > > > > Um I can't, because I _always_ think you should use locks. Did you > mean that question for me? ;) > > === > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia > > Email: [EMAIL PROTECTED] > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Oh, so CFLOCK is a *feature*. Maybe you've taken off your Macromedia cap, but I can see a faint MM on your forehead. (smile-hope you don't mind the teasing, Mr. DeathClock sir. ;^) Seriously, providing the necessary internal concurrency control for getting and setting variables should be trivial and lightning fast. It should be at least an order of magnitude faster than, say, parsing and executing and . I'm not saying that there is no legitimate use for CFLOCK, although I don't think you've provided a very compelling one. CFLOCKing around calls to questionable CFX tags is certainly a good thing. Pointing out legitimate uses for CFLOCK is not really relevent to the issue. We shouldn't HAVE to manage ColdFusion's internal operations. I use tools like ColdFusion so that I can concentrate on solving my clients' problems. [EMAIL PROTECTED] - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 2:25 PM Subject: RE: UDF question > (Taking off Macromedia cap and speaking as just one of yall...) > The question is - do you want CF to automatically handle everything for > you at the sacrifice of speed? Here is a good example: > > > > > > > > If CF had to auto lock this, it would need to use: > > > > > > > > > > ... > > > > It would be very difficult to make a system smart enough to know "Hey, I > could use one lock around this particular block of code." Therefore, we > would be stuck with the slower alternative. Personally, I'd rather just > do the work. It can't be that hard to cflock, or duplicate to the > request scope. > > .. again, all of the above is my personal opinion, not that of the > company. > > > === > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia > > Email: [EMAIL PROTECTED] > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Actually, it was a question for you because if there locks should be used in every situation then why even make it an option for the programmer? And I do disagree with you. Locking at the CFML layer should definitely be slower than locking at the CFAS layer because of the issue of interpretation and execution rather than pure execution of native code. I will state that I can't back any of this up because I don't know the inner workings of the server. - Matt Small -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:40 PM To: CF-Talk Subject: RE: UDF question > But shouldn't this whole issue be written into the server code? > Wouldn't it would run much faster that way than both the > individual sets > of cflocks that you've portrayed and the reality which is > sets of locks > around blocks of session accesses? As far as readonly or > exclusive goes, > then shouldn't the complier be able to distinguish the two? Again, speaking as a guy who has never used C++ or any other 'deep' language (well, Java, but Java is easy ;), I don't think you are right, and I HIGHLY encourage anyone out there to correct me if I'm wrong. I'm not saying the server CANT do the lock, I'm just saying that it could not be as fast as lettering the user make specific locks. > And as long as we're here, show me a single time when you > don't want to > use locks around a session scope. > Um I can't, because I _always_ think you should use locks. Did you mean that question for me? ;) === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
CF is merely an abstraction of a crap load of C++ code. I agree with you on the process that happens when you define a variable in CF. I don't see how that absolves the programmer of coming up with the best way of handling concurrency issues. Regardless, CF does provide you with many mechanisms of locking control. What really matters is picking the one that suits you, and to write code that is in line with the decision you've made. - Original Message - From: junkMail <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 1:18 pm Subject: Re: UDF question > With respect to this issue, comparing CFML to C++ is apples to > oranges. > I can't expect a low-level language to automatically manage > concurrent access > to shared memory resources, because I have defined the resources > and I have > decided how they are to be accessed and shared. I can't expect a > such system > to be prescient. > > The situation is different in ColdFusion. Although I declare and > use the > variables, ColdFusion creates the resources in memory and > essentially decides > how they are to be accessed and shared. ColdFusion can AND SHOULD > manage the > concurrency issues. > > C++ is not a multi-threaded language. It's a language capable of > producingmulti-threaded applications, such as ColdFusion. > > [EMAIL PROTECTED] > > > - Original Message - > From: <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 1:58 PM > Subject: Re: UDF question > > > > Interesting. > > > > Any language that implements locking (read: any that are worth > > programming in) uses some sort of "sloppy" locking mechanism. > Some are > > downright evil (read: C++). Certainly, I can't think of any > multi- > > threaded languages that handle concurrency automatically. > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Matthew R. Small wrote: > Wouldn't it would run much faster that way than both the individual sets > of cflocks that you've portrayed and the reality which is sets of locks > around blocks of session accesses? As far as readonly or exclusive goes, > then shouldn't the complier be able to distinguish the two? I think it can, but it will tend to overuse on the exclusive locks. And if you are writing a 3 MB WDDX packet from the session scope to a NFS share you don't want it to be in a block that is locked exclusively because one out of the X other operations is a write which requires an exclusive lock. Never forget a computer is a stupid machine. It doesn't know squat about your application. It doesn't know which shared scopes writes are fast or slow, which shared scope reads(!) are fast or slow, which intermediate operations are fast or slow. You do. You can group these operations together in blocks that require/can use the same type of lock. So you should decide how to lock. Jochem __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: RE: UDF question - locking...the future...maybe...
Yes. There are esoteric ways in Java to pass by copy as well, however, so knowledge of pointers is still an issue (but far less an issue than in some other languages). - Original Message - From: Raymond Camden <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 1:51 pm Subject: RE: UDF question - locking...the future...maybe... > Err, doesn't pointer and by ref mean the same thing? Doesn't Java pass > objects and arrays as pointers? > > === > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia > > Email: [EMAIL PROTECTED] > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -Original Message- > > From: Jon Hall [mailto:[EMAIL PROTECTED]] > > Sent: Monday, March 18, 2002 3:47 PM > > To: CF-Talk > > Subject: Re: UDF question - locking...the future...maybe... > > > > > > The link was in response to the question of how future > > versions of CF would > > handle locking, and not part of a discussion on whether to > > cflock, I'll be > > sure to change my subject lines properly so that people don't > > get confused > > from now on. Since Java has no pointers, and everything (I > > could be wrong > > about that everything) is passed by reference, then it > > follows that the > > necessity of single threading code so that pointers do not > > get corrupted, or > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question - locking...the future...maybe...
Err, doesn't pointer and by ref mean the same thing? Doesn't Java pass objects and arrays as pointers? === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: Jon Hall [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 3:47 PM > To: CF-Talk > Subject: Re: UDF question - locking...the future...maybe... > > > The link was in response to the question of how future > versions of CF would > handle locking, and not part of a discussion on whether to > cflock, I'll be > sure to change my subject lines properly so that people don't > get confused > from now on. Since Java has no pointers, and everything (I > could be wrong > about that everything) is passed by reference, then it > follows that the > necessity of single threading code so that pointers do not > get corrupted, or __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> 1) with today's computer's, the speed issue shouldn't be an > issue at all. > Unless you are doing something inside a loop over thousands > of iterations, > on multiple websites (hosted on the same server) at the same time, the > performance hit should be very minor. If you are looping > through thousands > of iterations, you expect a delay anyways. Not having concrete data, I'd say that this is not something you can just dismiss. Even if it worked for 90% of the web sites out there, the last 10% of the sites would really hate having this thrown their throats just because some coders can't be bothered to handle their own locking. Sorry if this sounds mean, but in some cases, I think the developer has some responsibility. For example, we don't stop you from doing: I've seen sites that do this. Imagine what happens when you change url.file in the query string to the current file. Of course, _all_ languages let you hang yourself. One could argue about where the responsibility of the developer ends and the vendor begins. I'm no expert on this, and again, I work for the vendor but am speaking as a developer. I'd like to hear what others think. > 2) Why not offer a simple merged solution? i.e. have CF Server > automatically lock any variables, unless the developer has > explitly stated a > lock beforehand. > This is certainly an idea - but again, my gut feeling is that this would be slow. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question - locking...the future...maybe...
The link was in response to the question of how future versions of CF would handle locking, and not part of a discussion on whether to cflock, I'll be sure to change my subject lines properly so that people don't get confused from now on. Since Java has no pointers, and everything (I could be wrong about that everything) is passed by reference, then it follows that the necessity of single threading code so that pointers do not get corrupted, or cause memory leaks, may not be necessary. Of course locking may still be required for counters and such... jon - Original Message - From: "Howie Hamlin" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 3:28 PM Subject: Re: UDF question > This article is about memory leaks caused by bad coding. We were talking about CFLOCKs and why the server should be doing > concurrency checking without the coder using CFLOCK at all. > > Howie > > - Original Message - > From: "Jon Hall" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 3:21 PM > Subject: Re: UDF question > > > > http://www.javaworld.com/javaworld/javaqa/1999-08/04-qa-leaks.html > > > > > > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
At 03:39 PM 3/18/2002 -0500, you wrote: >And as long as we're here, show me a single time when you don't want to >use locks around a session scope. The client hasn't paid their bill in 6+ months, you terminated your contract with them 2 months ago, and the client ( who still calls you every day) starts screaming over the phone because you are being un-responsive. Seems like a good time to remove locks... All kidding aside, I think there is a bit of absolute brilliance in the original posters statement. The same statement could be made for Application variables. I suppose one answer might be "You only have one user on the site." However, if you have such low traffic or user base, ColdFusion probably isn't the best solution. -- Jeffry Houser | mailto:[EMAIL PROTECTED] Need a Web Developer? Contact me! AIM: Reboog711 | Fax / Phone: 860-223-7946 -- My Books: http://www.instantcoldfusion.com My Band: http://www.farcryfly.com __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
I have two comments on this: 1) with today's computer's, the speed issue shouldn't be an issue at all. Unless you are doing something inside a loop over thousands of iterations, on multiple websites (hosted on the same server) at the same time, the performance hit should be very minor. If you are looping through thousands of iterations, you expect a delay anyways. 2) Why not offer a simple merged solution? i.e. have CF Server automatically lock any variables, unless the developer has explitly stated a lock beforehand. You're example would be an instance when the developer has not explitly locked anything, whereas if they had done something like this: Then the developer has explitly stated where to start/end the lock. However, if they hadn't, then everything would still run properly because there would be an inherent lock. And then they are responsible for the corresponding performance hit (if any). The logic to do this sort of coding should be very simple. As for myself, I currently set my servers to automagically lock all reads of application and session variables. Keeps my code very clean when I'm only reading elements (99% of my use of session variables). My 2 cents worth Shawn Grover -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 1:26 PM To: CF-Talk Subject: RE: UDF question (Taking off Macromedia cap and speaking as just one of yall...) The question is - do you want CF to automatically handle everything for you at the sacrifice of speed? Here is a good example: If CF had to auto lock this, it would need to use: ... It would be very difficult to make a system smart enough to know "Hey, I could use one lock around this particular block of code." Therefore, we would be stuck with the slower alternative. Personally, I'd rather just do the work. It can't be that hard to cflock, or duplicate to the request scope. . again, all of the above is my personal opinion, not that of the company. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: junkMail [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 3:18 PM > To: CF-Talk > Subject: Re: UDF question > > > With respect to this issue, comparing CFML to C++ is apples > to oranges. > > I can't expect a low-level language to automatically manage > concurrent access > to shared memory resources, because I have defined the > resources and I have > decided how they are to be accessed and shared. I can't > expect a such system > to be prescient. > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> But shouldn't this whole issue be written into the server code? > Wouldn't it would run much faster that way than both the > individual sets > of cflocks that you've portrayed and the reality which is > sets of locks > around blocks of session accesses? As far as readonly or > exclusive goes, > then shouldn't the complier be able to distinguish the two? Again, speaking as a guy who has never used C++ or any other 'deep' language (well, Java, but Java is easy ;), I don't think you are right, and I HIGHLY encourage anyone out there to correct me if I'm wrong. I'm not saying the server CANT do the lock, I'm just saying that it could not be as fast as lettering the user make specific locks. > And as long as we're here, show me a single time when you > don't want to > use locks around a session scope. > Um I can't, because I _always_ think you should use locks. Did you mean that question for me? ;) === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
But shouldn't this whole issue be written into the server code? Wouldn't it would run much faster that way than both the individual sets of cflocks that you've portrayed and the reality which is sets of locks around blocks of session accesses? As far as readonly or exclusive goes, then shouldn't the complier be able to distinguish the two? And as long as we're here, show me a single time when you don't want to use locks around a session scope. - Matt Small -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 3:26 PM To: CF-Talk Subject: RE: UDF question (Taking off Macromedia cap and speaking as just one of yall...) The question is - do you want CF to automatically handle everything for you at the sacrifice of speed? Here is a good example: If CF had to auto lock this, it would need to use: ... It would be very difficult to make a system smart enough to know "Hey, I could use one lock around this particular block of code." Therefore, we would be stuck with the slower alternative. Personally, I'd rather just do the work. It can't be that hard to cflock, or duplicate to the request scope. . again, all of the above is my personal opinion, not that of the company. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: junkMail [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 3:18 PM > To: CF-Talk > Subject: Re: UDF question > > > With respect to this issue, comparing CFML to C++ is apples > to oranges. > > I can't expect a low-level language to automatically manage > concurrent access > to shared memory resources, because I have defined the > resources and I have > decided how they are to be accessed and shared. I can't > expect a such system > to be prescient. > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Kush, I certainly buy your argument for low level language dealing primitive constructs, but folks who primarily work with code in terms of access to an application engine expect a bit more of a black box chosen solution to low level processs management. Many folks using CF have never seen the kind of code your are talking about and and the locking code looks unfriendly to them :-> Plus - I think that using locking is not the same thing as "Creating multi-threaded applcations". Regardless of how you lock, you are not going to influence how CF actually handles threading - only how how it handles concurrent access to resources. That being the case, it is an arguable point that CF (since it is in charge of resource access in any case) should provide a more seemless mechanism for concurrency - rather than abstracting everything else and then leaving this one low level detail up to the developer. -mk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 1:58 PM To: CF-Talk Subject: Re: UDF question Interesting. Any language that implements locking (read: any that are worth programming in) uses some sort of "sloppy" locking mechanism. Some are downright evil (read: C++). Certainly, I can't think of any multi- threaded languages that handle concurrency automatically. - Original Message - From: junkMail <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 12:50 pm Subject: Re: UDF question > Gosh, I disagree completely with this. > > For me, having my code littered with irrelevant CFLOCKs is sloppy. > > I'm comfortable with requiring the server setting. It's a simple, > clean,set-and-forget solution. Obviously, that's not going to > work for everyone. > If you can't enable Single Threaded Sessions on your server, then > you'll need > to do all the sloppy locking. (smile) > > [EMAIL PROTECTED] > > - Original Message - > From: "Raymond Camden" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 7:23 AM > Subject: RE: UDF question > > > > I don't recommend this. (Notice I said "I", not "Macromedia.") In > > general I feel this leads to sloppy programming, and if you > migrate and > > forget to use this setting, you can get in trouble. > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
This article is about memory leaks caused by bad coding. We were talking about CFLOCKs and why the server should be doing concurrency checking without the coder using CFLOCK at all. Howie - Original Message - From: "Jon Hall" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 3:21 PM Subject: Re: UDF question > http://www.javaworld.com/javaworld/javaqa/1999-08/04-qa-leaks.html > > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Howie Hamlin wrote: > Why CF doesn't protect threaded access to shared memory automatically, I'll never >know. It just doesn't make any sense. What if > you're a hosting provider? Switch on full checking in the Administrator. We do it and explain this a little bit and everybody is happy. Or at least not complaining ;) Jochem __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
(Taking off Macromedia cap and speaking as just one of yall...) The question is - do you want CF to automatically handle everything for you at the sacrifice of speed? Here is a good example: If CF had to auto lock this, it would need to use: ... It would be very difficult to make a system smart enough to know "Hey, I could use one lock around this particular block of code." Therefore, we would be stuck with the slower alternative. Personally, I'd rather just do the work. It can't be that hard to cflock, or duplicate to the request scope. .. again, all of the above is my personal opinion, not that of the company. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: junkMail [mailto:[EMAIL PROTECTED]] > Sent: Monday, March 18, 2002 3:18 PM > To: CF-Talk > Subject: Re: UDF question > > > With respect to this issue, comparing CFML to C++ is apples > to oranges. > > I can't expect a low-level language to automatically manage > concurrent access > to shared memory resources, because I have defined the > resources and I have > decided how they are to be accessed and shared. I can't > expect a such system > to be prescient. > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
http://www.javaworld.com/javaworld/javaqa/1999-08/04-qa-leaks.html - Original Message - From: "Douglas Brown" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 2:44 PM Subject: Re: UDF question > Maybe someone from Macromedia would be kind enough to comment on this? > > Doug Brown > - Original Message - > From: "junkMail" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 11:41 AM > Subject: Re: UDF question > > > > It's nice to hear someone else express this sentiment. (smile) > > > > Indeed, it doesn't make any sense. Multi-threaded applications are > > ubiquitous. Thousands of programmers have written code to properly manage > > access to shared memory resources. It's too bad none of them have worked for > > Allaire/Macromedia. > > > > I suppose we should be generous and assume that some gnarly legacy issues > > caused Allaire to go with the CFLOCK kludge. But I understand that Neo is a > > complete rewrite of ColdFusion. If the locking issues are still present in > > Neo, it's going to seriously shake my faith in the quality of Macromedia > > software engineering. > > > > [EMAIL PROTECTED] > > > > - Original Message - > > From: "Howie Hamlin" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Monday, March 18, 2002 8:21 AM > > Subject: Re: UDF question > > > > > > > Why CF doesn't protect threaded access to shared memory automatically, I'll > > never know. It just doesn't make any sense. What if > > > you're a hosting provider? Do you have to check all of your clients' code > > for proper locks? As far as I know, CF is the only app > > > server that has this quirk and I think that locking memoy is something that > > should be handled behind the scenes. > > > > > > Maybe this limitation will be alleviated with NEO > > > > > > Howie > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
With respect to this issue, comparing CFML to C++ is apples to oranges. I can't expect a low-level language to automatically manage concurrent access to shared memory resources, because I have defined the resources and I have decided how they are to be accessed and shared. I can't expect a such system to be prescient. The situation is different in ColdFusion. Although I declare and use the variables, ColdFusion creates the resources in memory and essentially decides how they are to be accessed and shared. ColdFusion can AND SHOULD manage the concurrency issues. C++ is not a multi-threaded language. It's a language capable of producing multi-threaded applications, such as ColdFusion. [EMAIL PROTECTED] - Original Message - From: <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 1:58 PM Subject: Re: UDF question > Interesting. > > Any language that implements locking (read: any that are worth > programming in) uses some sort of "sloppy" locking mechanism. Some are > downright evil (read: C++). Certainly, I can't think of any multi- > threaded languages that handle concurrency automatically. __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Hmmm... can we write multithreaded applications in ColdFusion? If so, please explain how. - Matt Small -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, March 18, 2002 2:58 PM To: CF-Talk Subject: Re: UDF question Interesting. Any language that implements locking (read: any that are worth programming in) uses some sort of "sloppy" locking mechanism. Some are downright evil (read: C++). Certainly, I can't think of any multi- threaded languages that handle concurrency automatically. - Original Message - From: junkMail <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 12:50 pm Subject: Re: UDF question > Gosh, I disagree completely with this. > > For me, having my code littered with irrelevant CFLOCKs is sloppy. > > I'm comfortable with requiring the server setting. It's a simple, > clean,set-and-forget solution. Obviously, that's not going to > work for everyone. > If you can't enable Single Threaded Sessions on your server, then > you'll need > to do all the sloppy locking. (smile) > > [EMAIL PROTECTED] > > - Original Message - > From: "Raymond Camden" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 7:23 AM > Subject: RE: UDF question > > > > I don't recommend this. (Notice I said "I", not "Macromedia.") In > > general I feel this leads to sloppy programming, and if you > migrate and > > forget to use this setting, you can get in trouble. > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Interesting. Any language that implements locking (read: any that are worth programming in) uses some sort of "sloppy" locking mechanism. Some are downright evil (read: C++). Certainly, I can't think of any multi- threaded languages that handle concurrency automatically. - Original Message - From: junkMail <[EMAIL PROTECTED]> Date: Monday, March 18, 2002 12:50 pm Subject: Re: UDF question > Gosh, I disagree completely with this. > > For me, having my code littered with irrelevant CFLOCKs is sloppy. > > I'm comfortable with requiring the server setting. It's a simple, > clean,set-and-forget solution. Obviously, that's not going to > work for everyone. > If you can't enable Single Threaded Sessions on your server, then > you'll need > to do all the sloppy locking. (smile) > > [EMAIL PROTECTED] > > - Original Message - > From: "Raymond Camden" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 7:23 AM > Subject: RE: UDF question > > > > I don't recommend this. (Notice I said "I", not "Macromedia.") In > > general I feel this leads to sloppy programming, and if you > migrate and > > forget to use this setting, you can get in trouble. > > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Gosh, I disagree completely with this. For me, having my code littered with irrelevant CFLOCKs is sloppy. I'm comfortable with requiring the server setting. It's a simple, clean, set-and-forget solution. Obviously, that's not going to work for everyone. If you can't enable Single Threaded Sessions on your server, then you'll need to do all the sloppy locking. (smile) [EMAIL PROTECTED] - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 7:23 AM Subject: RE: UDF question > I don't recommend this. (Notice I said "I", not "Macromedia.") In > general I feel this leads to sloppy programming, and if you migrate and > forget to use this setting, you can get in trouble. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Maybe someone from Macromedia would be kind enough to comment on this? "Success is a journey, not a destination!!" Doug Brown - Original Message - From: "junkMail" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 11:41 AM Subject: Re: UDF question > It's nice to hear someone else express this sentiment. (smile) > > Indeed, it doesn't make any sense. Multi-threaded applications are > ubiquitous. Thousands of programmers have written code to properly manage > access to shared memory resources. It's too bad none of them have worked for > Allaire/Macromedia. > > I suppose we should be generous and assume that some gnarly legacy issues > caused Allaire to go with the CFLOCK kludge. But I understand that Neo is a > complete rewrite of ColdFusion. If the locking issues are still present in > Neo, it's going to seriously shake my faith in the quality of Macromedia > software engineering. > > [EMAIL PROTECTED] > > - Original Message - > From: "Howie Hamlin" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, March 18, 2002 8:21 AM > Subject: Re: UDF question > > > > Why CF doesn't protect threaded access to shared memory automatically, I'll > never know. It just doesn't make any sense. What if > > you're a hosting provider? Do you have to check all of your clients' code > for proper locks? As far as I know, CF is the only app > > server that has this quirk and I think that locking memoy is something that > should be handled behind the scenes. > > > > Maybe this limitation will be alleviated with NEO > > > > Howie > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
It's nice to hear someone else express this sentiment. (smile) Indeed, it doesn't make any sense. Multi-threaded applications are ubiquitous. Thousands of programmers have written code to properly manage access to shared memory resources. It's too bad none of them have worked for Allaire/Macromedia. I suppose we should be generous and assume that some gnarly legacy issues caused Allaire to go with the CFLOCK kludge. But I understand that Neo is a complete rewrite of ColdFusion. If the locking issues are still present in Neo, it's going to seriously shake my faith in the quality of Macromedia software engineering. [EMAIL PROTECTED] - Original Message - From: "Howie Hamlin" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 8:21 AM Subject: Re: UDF question > Why CF doesn't protect threaded access to shared memory automatically, I'll never know. It just doesn't make any sense. What if > you're a hosting provider? Do you have to check all of your clients' code for proper locks? As far as I know, CF is the only app > server that has this quirk and I think that locking memoy is something that should be handled behind the scenes. > > Maybe this limitation will be alleviated with NEO > > Howie __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> > > Or enable "Single Threaded Sessions" in the CF Administrator. > > > > And pay a steep price in performance... > > Pay a price, yes, especially if you are using frames. But > I'd not call it a steep price. > > Has anyone ran stats on this one? I have, for specific problem applications. While I can neither provide specifics on performance differences (most of the performance tuning engagements I've performed have been under blanket NDAs) nor proof that the specific applications are representative of CF apps in general, my conclusion was that this option significantly impeded performance under load (50+ concurrent users). I'm not sure why, exactly, this causes a problem; my guess is that there's only one request queue, and if two requests from the same session are next to each other in the queue, subsequent requests won't process until the first request is complete, even if there are available worker threads. This is, of course, pure speculation. You might ask someone on the CF Server development team for more detail about how this option works. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
> Sorry to be a pest but, as I stated earlier on this list, > I have a feeling that most of the fear of Single Threaded > Sessions is based on CF urban legend. I'd welcome some > real information. Unfortunately, there's very little "real information" pertaining to server performance tuning. It has been my experience, though, that the single-threaded session option doesn't work very well under load. I have load-tested a few applications in my time. You're free to accept or reject this as it suits you, of course, but anecdotal information is going to be all you get when it comes to these sorts of things: "it worked for me when I did this" or "it didn't work". Macromedia has rarely provided useful, indepth performance tuning information, or useful descriptions of the internal operation of server features. > And what sort of a CF operation takes 20 seconds? Under normal conditions, very few, hopefully. Under extreme load, though, page times of 20 seconds aren't uncommon. > in/re "On sites where the all pages takes less than 100 ms > the problem would be smaller indeed." Good. That would > include the vast majority of my pages. I assume that means 100ms with a single user. How many milliseconds per page per user with ten users? fifty? one hundred? five hundred? Those are the questions that often need to be answered, to find the bottlenecks within an application. In my experience, pages that work perfectly well with few users may fail terribly under load. That's why it's so important to load-test applications, if you expect them to potentially bear any significant load. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Why CF doesn't protect threaded access to shared memory automatically, I'll never know. It just doesn't make any sense. What if you're a hosting provider? Do you have to check all of your clients' code for proper locks? As far as I know, CF is the only app server that has this quirk and I think that locking memoy is something that should be handled behind the scenes. Maybe this limitation will be alleviated with NEO Howie - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 8:23 AM Subject: RE: UDF question > I don't recommend this. (Notice I said "I", not "Macromedia.") In > general I feel this leads to sloppy programming, and if you migrate and > forget to use this setting, you can get in trouble. > > === > Raymond Camden, Principal Spectra Compliance Engineer for Macromedia > > Email: [EMAIL PROTECTED] > Yahoo IM : morpheus > > "My ally is the Force, and a powerful ally it is." - Yoda > > > -Original Message- > > From: junkMail [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, March 17, 2002 4:30 PM > > To: CF-Talk > > Subject: Re: UDF question > > > > > > Or enable "Single Threaded Sessions" in the CF Administrator. > > > > [EMAIL PROTECTED] > > > > - Original Message - > > From: "Raymond Camden" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Sunday, March 17, 2002 3:14 PM > > Subject: RE: UDF question > > > > > > > Of course, you wan't to wrap the call to this UDF in a > > cflock since it > > > reads from the session scope. > > > > __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
I don't recommend this. (Notice I said "I", not "Macromedia.") In general I feel this leads to sloppy programming, and if you migrate and forget to use this setting, you can get in trouble. === Raymond Camden, Principal Spectra Compliance Engineer for Macromedia Email: [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -Original Message- > From: junkMail [mailto:[EMAIL PROTECTED]] > Sent: Sunday, March 17, 2002 4:30 PM > To: CF-Talk > Subject: Re: UDF question > > > Or enable "Single Threaded Sessions" in the CF Administrator. > > [EMAIL PROTECTED] > > - Original Message - > From: "Raymond Camden" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Sunday, March 17, 2002 3:14 PM > Subject: RE: UDF question > > > > Of course, you wan't to wrap the call to this UDF in a > cflock since it > > reads from the session scope. > __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
junkMail wrote: > I don't get the first part of your reply. Are you saying that the Single > Threaded Sessions setting on the server is a bad idea because of your browsing > habits? No. It is a bad idea in general, but for me it is agravated because of my browsing habits. If I open some 6 browser tabs in 2 seconds and each one has to load 5 frames I fire 36 page requests in quick succession. Then it makes a big difference if they are run single threaded or not. Naturally I don't look at all of them at the same time, but if the one I want to read first is the last to load it does give a bad impression. > I don't believe I've ever experienced a "thread getting hung up" and > having to restart the browser. And what sort of a CF operation takes 20 > seconds? Datamining/searching. > Must be having a dull evening because I'm also confused by "run a grep on his > logfiles." I know what grep is, but what would I be looking for? Any error that looks like "Could not get exclusive access" (don't know the exact error because I don't customarily use them). It gives an indication of how often pages actually time out because other requests are still running. > Sorry to be a pest but, as I stated earlier on this list, I have a feeling > that most of the fear of Single Threaded Sessions is based on CF urban legend. > I'd welcome some real information. I had some problems with it during a project I was involved in. It involved full text searching on rather large datasets, which would take up to about 50 seconds. In such a case I usually do my first search, open a new window to do a second search and while that is running start to open the most interesting results of the first search in new tabs. But if you are running single threaded sessions all these new tabs, which typically returned 1 story in about 300 ms, had to wait until the long search has returned. > No offense intended, You would have to do better to offend me ;) Jochem __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
I don't get the first part of your reply. Are you saying that the Single Threaded Sessions setting on the server is a bad idea because of your browsing habits? I don't believe I've ever experienced a "thread getting hung up" and having to restart the browser. And what sort of a CF operation takes 20 seconds? in/re "On sites where the all pages takes less than 100 ms the problem would be smaller indeed." Good. That would include the vast majority of my pages. Must be having a dull evening because I'm also confused by "run a grep on his logfiles." I know what grep is, but what would I be looking for? Sorry to be a pest but, as I stated earlier on this list, I have a feeling that most of the fear of Single Threaded Sessions is based on CF urban legend. I'd welcome some real information. No offense intended, [EMAIL PROTECTED] - Original Message - From: "Jochem van Dieten" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, March 18, 2002 3:00 AM Subject: Re: UDF question > Ben Forta wrote: > > Pay a price, yes, especially if you are using frames. But I'd not call > > it a steep price. > > I would. Partially because I rarely browse with less than a dozen > browser tabs opened. But also because it causes serious issues with long > running queries/cfhttp calls etc. If I use one tab to do a search and > the search takes about 20 seconds, I can't do anything else in that > time. And if something really goes wrong and a thread is hung up it is > not uncommon to have to restart the browser to be able to get a new > session and continue. > > On sites where the all pages takes less than 100 ms the problem would be > smaller indeed. > > > > Has anyone ran stats on this one? > > Maybe somebody who runs a reasonably sized application with single > threaded sessions can run a grep on his logfiles to find out how often > this scenario occurs. > > Jochem > __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
Ben Forta wrote: > Pay a price, yes, especially if you are using frames. But I'd not call > it a steep price. I would. Partially because I rarely browse with less than a dozen browser tabs opened. But also because it causes serious issues with long running queries/cfhttp calls etc. If I use one tab to do a search and the search takes about 20 seconds, I can't do anything else in that time. And if something really goes wrong and a thread is hung up it is not uncommon to have to restart the browser to be able to get a new session and continue. On sites where the all pages takes less than 100 ms the problem would be smaller indeed. > Has anyone ran stats on this one? Maybe somebody who runs a reasonably sized application with single threaded sessions can run a grep on his logfiles to find out how often this scenario occurs. Jochem __ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question - extended
Wow - your second example makes me think that dotted syntax is what copying the variable? and the index sytax (session.var[ ]) is accessing by reference? That is too "anomalous" for me. I'd really like to get an answer from MM on that one. Makes me nervous. Mark -Original Message- From: Chuck McElwee [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 4:05 PM To: CF-Talk Subject: RE: UDF question - extended Along with the locking issues, I've found some interesting anomalies. I use 'Full Checking' (development server only) and find that (No locks) does not throw an error. I like this, but is this safe? Also, #Variables.session.sessionid# does not throw an error but #Variables.session["sessionid"]# does. Isn't the second simply an alternate syntax? What's up with that? Chuck McElwee etech solutions inc www.etechsolutions.com -Original Message- From: junkMail [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 4:55 PM To: CF-Talk Subject: Re: UDF question I brought this option up in an earlier thread on this list and got a bit of a spanking. (smile) I run my main server with Single Threaded Sessions enabled, as well as Server and Application scopes set to "Automatic read locking". I don't lock Session variables and I only lock writes for Server and Application variables. Based on very limited testing, I see no discernable performance hit and my code is a lot cleaner. The server, admittedly, does not host any extremely-high activity sites. It would be wonderful to have some definitive information from Macromedia about these options. Keith Meade [EMAIL PROTECTED] - Original Message - From: "Ben Forta" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, March 17, 2002 3:41 PM Subject: RE: UDF question > Pay a price, yes, especially if you are using frames. But I'd not call > it a steep price. > > Has anyone ran stats on this one? __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question - extended
Along with the locking issues, I've found some interesting anomalies. I use 'Full Checking' (development server only) and find that (No locks) does not throw an error. I like this, but is this safe? Also, #Variables.session.sessionid# does not throw an error but #Variables.session["sessionid"]# does. Isn't the second simply an alternate syntax? What's up with that? Chuck McElwee etech solutions inc www.etechsolutions.com -Original Message- From: junkMail [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 4:55 PM To: CF-Talk Subject: Re: UDF question I brought this option up in an earlier thread on this list and got a bit of a spanking. (smile) I run my main server with Single Threaded Sessions enabled, as well as Server and Application scopes set to "Automatic read locking". I don't lock Session variables and I only lock writes for Server and Application variables. Based on very limited testing, I see no discernable performance hit and my code is a lot cleaner. The server, admittedly, does not host any extremely-high activity sites. It would be wonderful to have some definitive information from Macromedia about these options. Keith Meade [EMAIL PROTECTED] - Original Message - From: "Ben Forta" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, March 17, 2002 3:41 PM Subject: RE: UDF question > Pay a price, yes, especially if you are using frames. But I'd not call > it a steep price. > > Has anyone ran stats on this one? __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: UDF question
I brought this option up in an earlier thread on this list and got a bit of a spanking. (smile) I run my main server with Single Threaded Sessions enabled, as well as Server and Application scopes set to "Automatic read locking". I don't lock Session variables and I only lock writes for Server and Application variables. Based on very limited testing, I see no discernable performance hit and my code is a lot cleaner. The server, admittedly, does not host any extremely-high activity sites. It would be wonderful to have some definitive information from Macromedia about these options. Keith Meade [EMAIL PROTECTED] - Original Message - From: "Ben Forta" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, March 17, 2002 3:41 PM Subject: RE: UDF question > Pay a price, yes, especially if you are using frames. But I'd not call > it a steep price. > > Has anyone ran stats on this one? __ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
Pay a price, yes, especially if you are using frames. But I'd not call it a steep price. Has anyone ran stats on this one? -Original Message- From: Chuck McElwee [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 4:43 PM To: CF-Talk Subject: RE: UDF question And pay a steep price in performance... Chuck McElwee etech solutions inc www.etechsolutions.com -Original Message- From: junkMail [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 4:30 PM To: CF-Talk Subject: Re: UDF question Or enable "Single Threaded Sessions" in the CF Administrator. [EMAIL PROTECTED] - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, March 17, 2002 3:14 PM Subject: RE: UDF question > Of course, you wan't to wrap the call to this UDF in a cflock since it > reads from the session scope. __ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: UDF question
And pay a steep price in performance... Chuck McElwee etech solutions inc www.etechsolutions.com -Original Message- From: junkMail [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 17, 2002 4:30 PM To: CF-Talk Subject: Re: UDF question Or enable "Single Threaded Sessions" in the CF Administrator. [EMAIL PROTECTED] - Original Message - From: "Raymond Camden" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, March 17, 2002 3:14 PM Subject: RE: UDF question > Of course, you wan't to wrap the call to this UDF in a cflock since it > reads from the session scope. __ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists