Wednesday, March 21, 2007

accessing Coldfusion Components (CFC's) question

I haven't had any problems accessing my components (CFC's) when I use dot notation on my localhost, nor have I ever had problems using dot notation when I have a path mapping set up on a remote server. However, this (below) does not work when calling out components in an environment where a mapping is disallowed (shared environment, for instance, where you don't have access to CF adminstrator)-- I'm trying to get my process created in a way that doesn't require me to use full paths, for ANT builds, etc that can be ported to different machines).

Any suggestions for how to access components in a directory such as, for example, wwwroot/ApplicationName/Model/Components

where I cannot have a mapping setup? Is there a way to do this with CFOBJECT (in a modified format from below), or do I need to resort to CFINVOKE? If so, what would the path callout look like using CFOBJECT or CFINVOKE?:

<cfobject name="oContactData" component="ApplicationName.Model.Components.CFCmyprofile ">
<cfset qContacts = #oContactData.getMyContacts(SESSION.auth.SkillshowUserID, -1)#>


Looking for a modified line of the above code that works in a relative path manner-

Tuesday, March 20, 2007

Apollo -- check it out

Apollo Alpha has been released. I'm excited to try it out:
https://www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5Fapollo

Here is a nice look at some of what can be done for those interested:

Example presentation of Apollo (showcasing Ebay sample app)
http://www.demo.com/demonstrators/demo2007/91259.php

this is an older demo from Dec 2006, shows Apollo with Amazon's api's, Google Maps mashup with client-side address Vcards, and some other items (like Flex):
http://ajaxian.com/archives/adobe-apollo-demos

One intriguing thing about Apollo is that you can use existing web tech to build apps that interact with and run on the client This demo shows an application built using Adobe's Flex technology on the front end (View), and using Ebay on the back end to deliver data to the client. But that is just one incarnation. Apps could also be built with html+css and a database, and run equally well on the Apollo cross-OS runtime.

The API for synchronizing data online/offline, and accessing the file system, is what holds a lot of the power for developers (imo). I'm sure you can find other benefits. Apollo's APIs simplify the process for handling this. There are clever ways of doing it now ( dojotoolkit.org , etc), but they use Flash files, and other client side workarounds to get the job done, and are limited in the size, etc that you can save on the client (without changing preferences, etc).

Basically Apollo extends the reach of web dev tools (not having to write code in Java, C++, VB, etc, but instead using html, css, AJAX, Flash/Flex, etc.) to deliver applications that run on a user's machine as well as online. It enables web app developers with an extra set of API's along with a cross-OS runtime that they can use to extend the reach of their apps..... it has been developed from the paradigm of the 'mostly connected to the internet' that the world is moving towards.

Sunday, February 25, 2007

Coldfusion MX 7.02 on Mac Book Pro

Trying to get my dev environment up using CFMX on a Mac Book Pro and have followed Mark Andrachek's [awesome] instructions, http://webmages.com/geek/cfmx-on-intel-macs/, but encoutering a problem.

Symptom: after completing all steps, when I go to: http://localhost/CFIDE/Administrator/ I receive the following error message:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Apache/1.3.33 Server at mark-holtons-computer.local Port 80

- Apache (1.3) is running on my localhost (I know this because when I go to http://10.0.1.196/ I see:

"If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page."

In step 1 of Mark's instructions, I had been able to verify the CF Administrator was up and running, but now I cannot access it via : http://127.0.0.1:8300/CFIDE/Administrator/

I'm thinking this has to do with the connector and perhaps I didn't configure something correctly there. I'm pretty sure I compiled the Apache HTTPD/JRun4 Connector right, as I've followed the directions to the letter:


"Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request."

If I run a cat error_log from the shell, here is what the Apache error_log ("/private/var/log/httpd/error_log") states, line for line, when I make the request to http://localhost/cfide/administrator/ via the browser:

[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not initialize proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not open "/Applications/JRun4/lib /wsconfig/1/jrunserver.store": Permission denied
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] initialized proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] Couldn't initialize from remote server, JRun server(s) probably down.
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not initialize proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] could not open "/Applications/JRun4/lib
/wsconfig/1/jrunserver.store": Permission denied
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] initialized proxy for 127.0.0.1:51020
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] Couldn't initialize from remote server, JRun server(s) probably down.
[Sun Feb 25 10:58:13 2007] [notice] jrApache[449:49825] JRun will not accept request. Check JRun web server configuration and JRun mappings on JRun server.

That file, jrunserver.store, is one I had to create for connection purposes and has permissions of:
-rwxr-xr-x 1 holtonma holtonma 28B Feb 24 22:50 jrunserver.store

...what properties does this file need to have?? (does this file need to have user/group of "admin admin" instead of "holton holton"?)....

Greatly appreciate any words of wisdom anyone can provide.

Monday, February 19, 2007

Solaris 10 Containers (Zones) and Coldfusion MX Licensing

With the Enterprise version of Coldfusion MX 7, a CF developer has the ability to deploy your applications as .EAR files on multiple instances of the JRun application server (or any other J2EE compatible application server, such as BEA WebLogic, IBM Websphere, etc, even open source Tomcat, although that isn't supported by Adobe) . This redundancy enables fault tolerance, which is especially useful in a shared hosting environment . That is, should one instance of the application server fail for 1 application, this would not crash all applications relying on the Coldfusion server. Instead, each application can utilize its own instance of the JRun (or other J2EE) application server.

If you are not familiar with this, the following is a good article, as is Ben Forta's Advanced Coldfusion development book (a veritable CF bible) is a phenomenal reference:
http://www.adobe.com/devnet/coldfusion/j2ee/articles/multiple.html

The J2EE implementation of Coldfusion discussed above exists for really a single shared server environment, as the LICENSE restricts .EAR deployment to a maximum of 2 CPU's. The marketing material is not immediately clear on this, so be aware, that J2EE deployment is unlimited in terms of application server instances, but is limited to TWO CPUs. If I am incorrect on this, someone please provide clarification, but I'm somewhat certain after days of looking into this, that this is the case.

There are still distinct advantages there -- not only the capability for application server redundancy (and clustering), but also the ability to deploy as .EAR files enables the development process to be one that contains a bundled and dated version. While its common and certainly best practice to utilize version control such as CVS and Subversion, it's not common in the Coldfusion community to bundle and deploy applications as .EAR files. This is evidenced by the options available at most Coldfusion hosting sites, which consists mainly of FTP-ing files to your folder. (it should be noted there are small disadvantages to .EAR deployment, if you require frequent small changes to files, but this disadvantage can be significantly nulled out with the use of Apache ANT as a build, zip, ftp, and deploy tool). .EAR file deployment has the distinct process advantage of being able to quickly snap back to dated versions of one's web application instantly. As long as there weren't schema changes to the database, a developer can simply deploy an .EAR file to the application's directory and it will effectively 'unzip' the application and all its dependencies. .EAR file deployment can also be made easy through the use of mature deployment tools such as Apache ANT.

That brings me to my question. As CFMX 7 enterprise enables isolation and redundancy at the application-server level, Solaris 10 has the capability for Containers (aka 'Zones') for isolation and redundancy at the server level itself. The following is a summarized description of Solaris 10 Container capabilities from Sun's website:

  • "Build customized, isolated containers—each with their own IP address, file system, users, and assigned resources—to safely and easily consolidate systems
  • Guarantee sufficient CPU and memory resource allocation to applications while retaining the ability to use idle resources as needed
  • Reserve and allocate a specific CPU or group of CPUs for the exclusive use of the container
  • Automatically recover from potentially catastrophic system problems by leveraging the combined functionality of Predictive Self Healing and Solaris Containers"
My question to Adobe and the Coldfusion MX Community:
How would the implementation of multiple Sun Solaris 10 Containers affect the licensing of Coldfusion MX 7? If a server had 2 CPU's but was configured for multiple Solaris Zones, would the Enterprise License still apply in such a way that enabled unlimited instances of the application server throughout these Zones? Or is each Zone treated separately as a CPU? It would seem to me, since there are two processors, the enterprise license would allow for this type of integration with Solaris 10 Zones, but I cannot find any documentation on this on Adobe's Coldfusion site or in the license. Can anyone at Adobe help clarify this?

Respectfully,
Mark Holton

Coldfusion MX 7 and Sun Solaris 10 for x86 processors

Hopefully this bit of history is a good sign that it's just a matter of time before there is a supported Coldfusion MX 7 install for Sun Solaris 10 on an x86 processor. I know they support it with the SPARC processor, but why not with the newer x86 chips?

Macromedia/Adobe has supported it in the past, hopefully they will in the near future. Anybody know of any plans for this?
-Holts

https://partneradvantage.sun.com/partners/10moves/quotes.html

"Macromedia

Macromedia is committed to supporting the Solaris OS to ensure our ColdFusion developers can continue to deliver mission-critical business applications. Solaris 10 will provide customers with the scalable, reliable platform they need to continue delivering rich Internet applications with the ease of use and productivity of ColdFusion. "

Jeff Whatcott
Vice President of Product Management
Macromedia"