House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

"Fire and forget" logging on ColdFusion Standard - best option?

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nick Gleason
04/15/2012 03:05 PM

We're trying to determine what would be the most effective way to do "fire and forget" logging in our CMS / CRM system.  The goal is to improve performance by not having the page loads have to wait for the logging portion of the code.  We would like it to be a usable solution on CF Standard 9 (and possibly earlier versions).  We've used cfthread a bit for this and it works pretty well.  But, the concern is that CF Standard limits the number of threads you can use (to 10, I think). We've looked at using an event gateway too, which seems like it would be a great solution but my understanding is that this is also throttled to some extent on CF 9 to some extent.  So, I'm not sure if we would face a bottleneck problem that way. Are there other alternatives that we're not thinking about? Best, Nick

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
04/15/2012 10:22 PM

----- Excess quoted text cut - see Original Post for more ----- Perhaps you could do the logging in onRequestEnd, after returning the page to the browser using CFFLUSH? The user wouldn't have to wait, in that case, although other users' requests may end up in the queue a bit longer. You might also spend some time minimizing the work that logging does. Are you logging to a database? Maybe you could defer that, and write to a file (should generally be faster), then later on use a scheduled task (or some other alternative outside of CF) to read the file into the database. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or on

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Russ Michaels
04/16/2012 05:06 AM

I can't really think of any way to do it without processing overhead, cfthread would be the obvious choice, and an event gateway will use up a request in just the same way as cfthread. Upgrading to cfenterprise would be the obvious choice so you can have more threads and additional instances, but if this is not an option for you, then how about installing a copy of railo and give that a try, even if you only use it for processing logging and stuff like that it at least gives you some extra threads outside of CF. Another little trick is that you switch CF back to developer mode which gives you all the enterprise features, and create a new instance, then put your std license back in. You lose all the enterprise options again, but the instance you create is still running, and you can start/stop it, use its cfadmin etc. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nick Gleason
04/16/2012 01:31 PM

Hi Russ, Thanks for the follow up.  Cfthread is very cool for this sort of thing - we've been using it.  But, we would eventually like to offer an open source version and don't want to force people to use enterprise for this to work well.   Best, Nick ............................................................................ .. CitySoft, Inc. | http://www.citysoft.com Phone: (866) 751-1992 | Direct: (617) 899-5395 | Fax: (617) 507-0444 Spend Less >> Do More - Community Enterprise combines great features with an affordable price. ............................................................................ .. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nick Gleason
04/16/2012 01:31 PM

Hi Dave.  Many thanks for your reply.  We'll give this some thought.  I'm not sure how cfflush comes into play but we'll dig into it a bit. N ............................................................................ .. CitySoft, Inc. | http://www.citysoft.com Phone: (866) 751-1992 | Direct: (617) 899-5395 | Fax: (617) 507-0444 Spend Less >> Do More - Community Enterprise combines great features with an affordable price. ............................................................................ .. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Russ Michaels
04/16/2012 04:33 PM

if it is to be an open source app then I would have thought using Railo would be an appropriate solution being as it is also open source ? Russ

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Nick Gleason
04/16/2012 05:08 PM

Yes, that would be great.  it's just a matter of time and resources at this point, but over time would love to see how it does on railo. Nick > if it is to be an open source app then I would have thought using Railo > would be an appropriate solution being as it is also open source ? > > Russ


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 23, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference