In light of waiting for the new movie by Dennis Villeneuve, Dune, I felt like posting this.
Frank Herbert’s Dune is literally one of the most full, articulate and solid Science Fictions books I have ever read. Honestly, I just can’t get enough of it! Plot, characters, setting, scenery, scenario, it is amazing!!!
The downside is I’m never happy with the movies though. The most serious approach (even though the director literally denied the word serious), was by David Lynch, in 1984’s Dune…
It was a good movie, but only for the fans… Very slow, with a lot of strange scenes, but it was something… The rest of the attempts are simply not worth mentioning.
While we are waiting for this, I remembered my primary school games, and this blew my mind…
Trib-une, a TRIB-ute to d-UNE
Only the best strategy game I could play back then… I think it revolutionized modern gaming…
For the past 4 years or so, I’ve been more active with the devops side of things. So, I was lucky enough to not work so closely to the business side anymore. That perk, though, came with a caveat. I was made responsible to provide optimizations and performance gains at the company’s main service, which unfortunately is largely built using one language thats hanging literally by a thread.
Yes, that language’s name is "Coldfusion". No, you have surely not heard of it before, and yes, luckily, it has nothing to do with physical cold fusion.
What is this Coldfusion?
Coldfusion, is a closed source language that was created by Adobe. It’s a language that was conceived in 1995 (!) and it’s purpose was to help people break the compiling loop that reigned the internet world back then.
Their first intent was to create a framework that would connect html pages with database engines, and thus providing an Api that would be very easy to change while coding websites.
Luckily, the first implementation of Coldfusion was coded in Visual C++ (god help us), and its runtime was strictly Windows, as back then the popular runtime and tools were being provided by the Gates family. There were some ports to Sun’s Solaris, but they were limited.
Ok, but, so whats this API you talking about?
If for some weird reason you have ended up in my position and Coldfusion is “paying your bills” you might end up reading up articles about how to do stuff.
Most helpful is Ben Nadel’s blog, this guy has been with Coldfusion since its first steps and he’s helped a lot lot of people with his posts. Ben will solve a lot of questions you will have when writing code with Coldfusion. He’s done a lot of good work, and also getting a lot of props for publishing his problems and solutions. There are also more resources you can address your questions at, I’ll just mention some here: official Coldfusion Adobe community community.adobe.com, the Adobe CF portal at coldfusion.adobe.com, CFML Slack, and more.
But there were times that we had to ask for professional help. Unfortunately Coldfusion is a closed source project. There is a respective open source implementation (called Lucee), but unfortunately – and that was explored when I was firstly joined – , it wasn’t 100% compatible with the company’s projects. Therefore, we were stuck with the closed source one, and even though its official documentation is good, Adobe, who’s got the reins in managing the whole language, at times, doesn’t really care what’s going on with the community. So, they are only answering the community’s questions only if they are under pressure.
The guy who’s applying pressure is Charlie Arehart. He’s liaised numerous times between popular questions (especially at the administration side of CF), and he’s doing a really good job.
Managing CF service
My troubles started when I was called to manage a Coldfusion service programmatically. CF, comes in a service – server package, which runs and you have the option of “visiting” a specially crafted server URL where you can point and click administrative options, after being authenticated. Options like for example change the code mappings, as to where the Coldfusion code resides inside your server, or, say, refresh something Coldfusion calls “query cache”.
Long story short, I had to find a way to make all those changes programmatically, as in any serious enterprise, you just can’t deal with point and click changes, iterating every single server.
Coldfusion Admin API
So luckily Coldfusion is exposing those Administrative functions in a form of an api. Charlies Admin API Blog Post, is descriptive enough to guide you through the process. So if for example you want programatically create some database connections (in CF world they are called “Data Source Objects”) you can do so like this:
// Login is always required. This example uses two lines of
code.adminObj = createObject("component","cfide.adminapi.administrator");
// Instantiate the data source
object.myObj = createObject("component","cfide.adminapi.datasource");
// Create a DSN.
host = "xx.x.xxx.xx",
port = "1433",
database = "northwind",
username = "sa",
login_timeout = "29",
timeout = "23",
interval = 6,
buffer = "64000",
blob_buffer = "64000",
setStringParameterAsUnicode = "false",
description = "Northwind SQL Server",
pooling = true,
maxpooledstatements = 999,
enableMaxConnections = "true",
maxConnections = "299",
disable_clob = true,
disable_blob = true,
disable = false,
storedProc = true,
alter = false,
grant = true,
select = true,
update = true,
create = true,
delete = true,
drop = false,
revoke = false);
The API cfc files that are offered are the following:
Charlie in his blog says that he has asked the Adobe team to document the functions that each cfc exposes, but unfortunately Adobe, being Adobe, didn’t. They have merely documented 7 out of the 18 files, and the rest are left as they were.
If you wish to introspect the other files you can do so just by log into http://localhost:8500/CFIDE/administrator/index.cfm while running a CF Server installation, and then, head to Security -> RDS.
There you either disable RDS (not recommended for long run setups), or change the password.
After that you can simply follow the virtual path, ie, if you wish to introspect the runtime.cfc you can simply go to : http://localhost:8500/CFIDE/adminapi/runtime.cfc, and you will be met with the following page:
So I went the extra mile and went and copied all the CF 2018 introspection code that Adobe is producing when visiting all the administrative modules listed in their server, by creating a complete “Coldfusion 2018 Admin API Documentation”.
You can just click the links below and you will get the html as it is being generated from the original Coldfusion Administration URL.
Just putting it here in case someone bumps into it, and is stumped. I recently changed and got a macbook. I moved from linux and one of the nice features I jumped to mac os were, seeing a misspelled word, right click -> see the suggestion, and correct it.
Problem started appearing when I updated to the new Catalina 10.15.4.
After that update, I started noticing that even though my words were being checked for spelling (showing an underlined squiggly line), when I was right-clicking, I kept receiving a Loading suggestions and nothing appearing as a suggestion.
I tried everything.
Resetting the dictionary, following apples suggestion, nothing seemed to work. In the end I gave up.
Had another fresher look and did the following:
System Preferences > Language & Region:
I removed the “second” preferred language, and restarted my mac.