My Projects
Search Blog

Categories
Archives
Useful Links
Photo Albums
RSS

Powered by
BlogCFM v1.15

Vivio Technologies Dedicated Hosting
26 January 2007
CFOpenChat 1.01 Released

CFOpenChat version 1.01 is now available.  There were two very minor bug fixes, both of which were discussed in the forums quite some time ago, I finally decided to put out a release.

download CFOpenChat 1.01 here.

Posted by rickroot at 11:21 AM | Link | 0 comments
06 September 2006
CFOpenChat Updated

A lot of progress has been made in the last week with regards to the reliability of CFOpenChat.  It handles temporary connection failures much better now, and will hopefully no longer just randomly decide to boot everyone out of the chat room at will.

CFOpenChat is a coldfusion powered chat room application built using Rob Gonda's ajaxCFC.  It supports MSSQL and MySQL, and could easily be adapted for other database as well.

For full details, a demo, and the download, visit:

http://www.opensourcecf.com/cfopenchat/

CFOpenChat is free, open source software licensed under the BSD license.

Posted by rickroot at 6:54 AM | Link | 0 comments
12 July 2006
Reading large files with java versus CFFILE

A question was posted on the cf-talk list (thread) about reading large files with CFFILE and problems they were having.

I suggested trying java to read the large file line by line and I posted the following code:

<cfsetting showdebugoutput="Yes">
<cfscript>
 cnt = 0;
 // large text file, 4MB, 80,000+ lines
 srcFile = "E:\Inetpub\wwwroot\tools\mass_email\list.dat";
 // create a FileReader object
 fr = createObject("java","java.io.FileReader");
 // Call the constructure with the source file path
 fr.init(srcFile);
 // create a BufferedReader object
 br = createObject("java","java.io.BufferedReader");
 // call the constructor with the FileReader as the arg
 br.init(fr);
 // read the first line
 str = br.readLine();
 // loop ... str will be undefined if there are no more lines
 while (isDefined("str")) {
  // do stuff with the string
  cnt = cnt + 1;
  // read the next line so we can continue the loop
  str = br.readLine();
 }
 // close the buffered reader object
 br.close();
 writeOutput(cnt);
</cfscript>

 

The code above was tested on CFMX 7 and it does work.  On my server, it consistently returns the results in about 400ms (ranging between 350ms and 500ms).

In order to compare, I wrote some CFML code that does essentially the same thing using CFFILE and looping through the file content as a list with chr(10) as the delimiter.

The CFFILE route was slower and much more erratic, ranging from 450ms to over 2000ms - probably averaging 1400ms in the 20-30 times I reloaded the page.

So if you're reading a large file and doing line by line processing - consider using native java rather than CFFILE.

Posted by rickroot at 2:15 PM | Link | 1 comment
17 February 2006
CFAJAX Chat - Coming Soon, Demo Online!

In an effort to teach myself Ajax, I've written what I think is a pretty nice chat room application that I'll be releasing the source for soon.

Project: CFAJAX Chat
Home page: http://www.opensourcecf.com/cfajaxchat
Author: Rick Root
License: GPL
Platform: CFMX 6.1+, Bluedragon 6.2+ (?)
Description: Description: CFAJAX Chat is a multi-user chat room application written in CFML and making use of AJAX technology with the help of CFAJAX.
Posted by rickroot at 8:17 AM | Link | 0 comments