Administrating and Developing with Informix
Antonio Cangiano writes in his Zen and the Art of Programming blog that version 0.7.0 of the Python driver/wrapper for DB2 and Informix is now out of beta.
This release includes improved Unicode support, plus some bug fixes.
Antonio's blog also mentions in the comments that we can expect to see a Django adapter soon.[Read More]
MarkJamison 100000ESF6 2,511 Views
Informix 12.10.FC9 has been released.
The Release Notes can be found here.
Of specific interest to me is the Smart Trigger functionality.
RSS feeds provide a convenient way to display up to date information directly in your Firefox browser toolbar. I for one spend more time perusing the BBC News and Slashdot feeds than I should.
Implementing an RSS feed that displays database information is very simple, hence the 5 minute Informix RSS feeds..
These two examples, for JSP and PHP, display a summary of the last 20 orders from the IDS stores_demo database. They both use the following IDS 10.0 SQL query:
Five Minute JSP Informix RSS Feed
If you have a working Tomcat installation setting it up to work with Informix JDBC drivers is as simple as copying the JDBC jar files into $CATALINA_HOME/common/lib and restarting.
Customize the machine, Informix Server and links in this code and create a new Tomcat webapp. The resulting URL can be added to the Firefox toolbar as a Live Bookmark.
Five Minute PHP Informix RSS Feed
Here's the equivalent code in PHP. This example uses the Informix PDO Driver.
This should result in the same output as the JSP example.
The look of the XML output when viewed from a browser can be improved by using an XSL stylesheet, and various parameters such as refresh interval (TTL) can be tweaked. There are some good RSS tutorials and books available, or it can be fun to reverse engineer the stylesheet of your favourite news feed to see what they do.[Read More]
gbowerman 100000B5T0 4,545 Views
Look out for the upcoming Ziff Davis seminar on Wednesday September 26th, when Kevin Brown and Madison Pruet will talk about 99.999% - How Available is Your Business?
"Attendees will hear from IBM IDS technical leaders Kevin Brown and Madison Pruet who will discuss the importance of reaching 99.999% uptime, and why this level of business continuity can rarely be achieved with a "one-size-fits-all" solution. The availability capabilities of IDS 11 will be prominently featured."
Inside Informix V11
Eric Herber has written an article about IDS 11 in Database Trends magazine, which includes a nice Open Admin Tool screenshot of a MACH11 topology. For the impatient, go to http://es1.tecnavia.com/ee/databasetrends/# and skip to page 18.
September Chat with Labs - RFID and Web Services
This month's Chat with the Labs covers the new Web Feature Service - which can provide a useful service layer for any kind of data, including GeoSpatial. Here's the blurb.
Location Based Services and RFID using Web Feature Services
This feature implements an Open GeoSpatial Consortium(R) Web Feature Service (OGC WFS) in IDSto act as a presentation layer for the Spatial and Geodetic DataBlade modules. The OGC WFS interface allows requests for geographical features across the web using platform-independentcalls. The XML-based GML (Geography Markup Language) is used as the encoding for transportingthe geographic features. Our speakers for this Chat will be Jerry Keesee, Director of the Informix Lab and Alan Caldera, Senior IDS Development Engineer.
RSVP for this Chat at: ttps://ww4.premconf.com/webrsvp/register?conf_id=7267470
Comments, questions: lspina AT us.ibm.com
There are 3 IIUG Cheetah tech days on the US West coast in the next week:
Since the directions to the San Jose IBM facility on the website are allegedly unreliable, here are the directions in full:
Morgan Hill/GilroyTake highway 101 and head North. Take the 880 highway exit, right and head towards Oakland. Go 4.1 miles to 237 and go West onto 237. Go 2.4 miles to the North First Street exit, turn right. We are on the right side - 4400 North First St.
From San Jose Airport:Get onto North/West 87 (Guadalupe Parkway) and take ramp onto highway 101, towards San Francisco. Take the Great America Parkway/Bowers exit and head right. Keep straight onto Great America Parkway for 1.9 miles. Take 237, right, towards Milpitas for 1.0 miles and take the North First Street exit and head North.You.ll now be going over 237. We are on the right side . 4400 North First St.
From San Francisco Airport:Get onto highway 101 and head South towards San Jose. Go 26.7 miles to 237, towards Milpitas. Go 4.7 miles to the North First Streetexit and head North. You.ll now be going over 237. We are on the right side - 4400 North First St.
From Oakland Airport/ East BayExit airport onto highway 880 South, go 26.3 miles to 237 West. Go 2.4 miles to the North First Street exit, turn right. We are on the right side, 4400 North First St.
Firstly, if you follow The Informix Zone you will already know there's a new Informix RedBook, 162 pages of high availability goodness entitled: Informix Dynamic Server V10: Superior Data Replication for Availability and Distribution. This compliments the RedBook published last December: Informix Dynamic Server V10 . . . Extended Functionality for Modern Business.
Secondly, IBM RedBooks are pioneering a new authoring process known as RedWiki. The old style RedBook authoring process took the form of a residency. Authors, typically IBM employees, would travel to a specific site and work there until the job was done. With the new process, anyone can apply to be an author, and the team collaborate on the book via a Wiki page from their regular locations working part-time. I like this concept, it can mean larger teams, and can draw on a greater pool of authoring talent. We use wiki pages extensively within Informix support and development both informally in small teams and in a larger more structured environment.
I turned down the last opportunity for a RedBook residency.. the flesh was willing but the time was lacking. With the Wiki-based authoring process I'd have probably applied. To see an example of the new style of RedWiki take a look at PHP Zend for i5/OS.
I hope this concept catches on and look forward to seeing some Informix RedBooks written this way. Judging by the expertise on display in the IIUG and comp.databases.informix newsgroups there would be no shortage of enthusiasm and talent for a distributed Informix RedBook.
gbowerman 100000B5T0 3,337 Views
I just read an interesting post from ZDNet blogger Paul Murphy entitled Sun’s training problem..
I know of a Sun V880 installed in January of 2002 with eight 750Mhz processors, 16GB, and four A1000 disk packs that ran Informix 10 with Sybase/IQ with exactly zero downtime for almost three years despite a half dozen or so disk replacements and a Sybase upgrade....Paul's main point is about Sun not evangelizing their SMP and in-memory data integration solutions, though the implication is also there that IBM has work to do to evangelize the modernity, relevance and reliability of Informix Dynamic Server.
Reading this led me to reminisce about my first Sun machine at Informix, an Ultra 2, running several IDS instances, it never stopped working.[Read More]
The Informix Application Development blog marks its first anniversary today. When I started this blog a year ago I wondered how long it would be before I ran out of things to write and the blog went the way of most blogs, slowly running out of steam. Fortunately it has been a good year to be writing about Informix. With rapidly growing sales, an open beta for a major new release and many people generating content to review in the form of technical articles on developerWorks and other sites, there is always something to write about. There are more detailed articles lined up waiting for me to have time to write them.
A great sign of the rejuvenation of Informix is the proliferation of new blogs and websites devoted to the product in the past year. Highlights include The Informix Zone, independent of IBM and the definitive website for Informix advocacy and content. The Informix Technology blog, an excellent source of well-researched in-depth articles. Informix Magazine an IDS driven portal and aggregator for all things Informix. The IDS Experts blog - a new platform for Informix Tech Support and Development engineers. Meanwhile, the International Informix User Group has negotiated a free download of IDS with no time-limit, in addition to the growing repository of user contributed Informix utilities. Open source Informix initiatives have also been on the increase, for example the Informix Driver for Ruby and the continued development of DBD::Informix.
Lessons I have learned after a year of blogging include:
It has been fun writing the blog this past year and I have got to know some good people along the way. Informix has a loyal and growing following both inside and outside of IBM, having earned its status as a cult database through a combination of performance, reliability, small footprint and ease of administration that place it in a category of its own. Yes I am biased.[Read More]
This is part 1 of what will ultimately be a 3 part article describing an AJAX-based front end to an image database written in ZK - an event-driven component-based development framework. ZK can work well for GUI web applications as it provides a simple markup language to define the user interface and takes care of the AJAX synchronization behind the scenes.
Part 1 - Uploading and downloading images to a database
A ZK database application has the following dependencies (if you have ZK installed and you know how to get a database connection you can skip this part):
2. Create a Database
For part 1 a simple table consisting of an image number, image name and a byte data type to store an image is sufficient:
create database imgdb1;create table album(id serial, name varchar(100), img byte);create unique index nameIdx on album(name);
3. Create a new ZK Application
Create a new application directory, say "imgdb1", (under $TOMCAT_HOME/webapps if using Tomcat), and edit the WEB-INF/web.xml file to add ZK support. The ZK Quick Start Guide (PDF) section 5 describes how to do this.
4. Write the Presentation Layer
One of ZK's strengths is the ease of writing a user interface with the ZUML markup language. Note: the <ZK> tag shown here is closed in step 5. In my example, the code in steps 4 and 5 is written to a file called index.zul (which the server will recognize as a default file like index.html). A window containing the image and Display/Add/Delete buttons can be succinctly defined in ZUML as follows:
5. Write the Database Service Methods
The displayImage() method selects the named image from the database, retrieves it from the ResultSet as an InputStream object which can then be set to the image defined in the window via an AImage object.
The uploadImage() method calls FileUpload.get()to upload an image from the local filesystem to the database. If the file is confirmed to be an image it is retrieved as a byte array and bound to a prepared INSERT statement.
The deleteImage() method sends a DELETE statement to the database.
<zscript> import org.zkoss.image.AImage; import java.sql.*;import javax.sql.*;import javax.naming.*;In this example the Connection conn = ds.getConnection(); statement gets a JDBC connection from a connection pool. Replace this (and the Context and DataSource declarations) with a direct DriverManager.getConnection(url) call and associated initialization code if you prefer to make a direct connection.
Now, assuming the data server is online, pointing the browser to the application URL (in my case http://localhost:8080/imgdb1/) should display the application.
Part 2 will add basic browsing, update, delete, and a incorporate a few informational fields to the database application. Comments are welcome, particularly suggestions on improving the code.[Read More]
In part 1 of this article I looked at how to use the ZK AJAX web framework to:
The application created in part 1 was a demo of implementing these two methods, but did not do anything usable. In Part 2 I will use these methods to create to create a working BREAD (browse, read, edit, add, delete) application for a database table containing an image file and informational columns.
Note: This example was tested using the Firefox browser.
Part 2 - a photo database application
To convert the simple demo of part 1 into a working application the following major features will be added:
This article builds on part 1, and assumes a working ZK environment with database connectivity via JDBC, and a new or existing ZK application.
2. The species database
For this example I am choosing to store the photo column in a separate blobspace. This is a design choice at the Informix data server level and makes no difference to how the application works (it just reduces I/O to the physical log). On my Windows laptop the commands I used to create a 100Mb blobspace called blobspace were:
copy NUL c:\ifmxdata\%INFORMIXSERVER%\blobspaceonspaces -c -b blobspace -g 4 -p c:\ifmxdata\%INFORMIXSERVER%\blobspace -o 0 -s 102400ontape -s -L 0onmode -l
The new database will store some basic information about animal species in table spc_list: name, genus, species, photo:
create database imgdb2;
3. Define the presentation layer
In previous ZK examples I have inter-mingled ZUML markup tags which define the presentation with the ZSCRIPT Java code which defines the service methods. This is ok for small examples but starts to look messy for larger applications. This time the ZSCRIPT code is stored in a separate file: part2.jul for clarity. Note the file can have any name and extension, I just made up ".jul" to remind me that this is Java code sourced from a ".zul" file.
The GUI part of this application consists of a listbox on the left side of the screen. On the right side of the screen is an image and detail grid, with a panel of buttons separated by a splitter. This is my index.zul file:
<zk> <window title="Pacific Northwest Fauna" border="normal" width="1000px">Note one deviation from the default display characteristics.. I redefined the listbox element slightly using a STYLE tag to make the border between rows stand out more.
Note also there is one line of embedded zscript code at the end, to call the method to retrieve the records at startup, and pass on the name parameter if it has been optionally included in the URL (e.g. http://localhost:8080/imgdb2/?name=Hairy%20Woodpecker).
4. Define the service methods
This is the Java code to populate the listbox and implement functionality behind the buttons. The listbox is dynamically generated by implementing the ListitemRenderer class. Note that the listbox is populated using the retrieveRecords() method and is set to use the SimpleListModel.
The displayRec() method is called when a row in the listbox is clicked on and uses the same approach as in part 1 to select the image object from the database and display. In part 1 if the image was too large it would overflow the window it was defined in. Here the image is set to a fixed width of 500 pixels and the height is dynamically set to maintain the aspect ratio; this way the application maintains its overall proportions and the images are displayed correctly.
The file upload is implemented in a separate method called doFileGet() called when the New photo button is pressed. A boolean variable newImage is set when an image has been uploaded.
This allows the addRec() method to support adding a record with or without an image, and query the user to make sure they wanted to add a record if no new image is present.
Similarly the modifyRec() method can modify fields in the table without changing the image if the user did not upload a new image before pressing the Modify button.
The part2.jul file contains the following:
// image database application zscript codeimport org.zkoss.image.AImage; import java.sql.*;import javax.naming.*;import javax.sql.*;Now the application is starting to become useful, particularly for a small database; but suppose there were thousands of records - dumping them into a simple listbox is not going to work so well, the application would need to display records pages at a time. The following features would also be nice to have:
In part 3, when I get around to writing it, I'll look at adding some of these features. If you have any suggestions for part 3, or ways to improve the existing code please let me know.[Read More]
A new developerWorks article was published last week by Abhishek Mathur called Using the new Deployment Wizard in IDS Cheetah - New control for the IDS install process.
The article highlights an important new feature in IDS 11.10 install - the ability to customize which components are installed.
Now instead of copying all the files during installation, just those for the chosen components are copied. For IDS 10.0 and below most of the files in the media were language files of which only a small subset were likely to be relevant to your locale. I am not sure I go along with this sentence though..
Have you seen how large some other Enterprise RDBMS installations are? However the point of this sentence is well-intentioned. Perhaps 270Mb should be viewed as considerable if we can reduce the footprint by only copying the required files.
This goes a step towards Componentization - where you can pick and choose which Software components you wish to install rather than legacy all-or-nothing software installations.[Read More]
IBM announced a security vulnerability involving insecure use of the /tmp directory by the IDS and CSDK UNIX install scripts recently. The text of the announcement is here: Possible security vulnerabilities with Informix Dynamic Server, CSDK, and I-Connect product installers.
Reports of this vulnerability have been around since the beginning of October when someone called Larry Cashdollar sent an announcement directly to Bugtraq. As far as I can tell, in contrast to other security advisories we receive, IBM were not given any advance notice of this so had to start working on a response from that point. Since the announcement the usual security sites have picked it up, generally giving it a rating of less critical:
FrSIRT Security Advisories: IBM Informix Insecure Permissions and Temporary File Creation Vulnerabilities
Secunia Advisory #1: IBM Informix Dynamic Server Insecure Temporary File Creation
Secunia Advisory #2: IBM Informix Products Insecure Permissions and Temporary File Creation
Security Tracker: Informix Dynamic Server Uses Unsafe Installation Scripts and Directory Permissions That May Let Local Users Gain Elevated Privileges
I've been waiting for the dust to settle before writing about this given the less than critical impact, the straightforward workaround, the difficulty of exploiting and the IIUG coverage, but now the official IBM announcement is out it's worth at least highlighting the workaround:
Use the -log option when performing your product installation to redirect the temporary files created to a secure directory.
The following example from Jonathan Leffler illustrates using the -log workaround:
umask 077mkdir /tmp/informix./installserver -log /tmp/informixThis creates a directory with no public (or group) access, and then directs the install logs to that directory.
It is also worth mentioning that Informix products running on Windows do not have this vulnerability.[Read More]
gbowerman 100000B5T0 4,832 Views
Adria Informix User Group Meeting 11/17/09
The Adria IUG president Hrvoje Zokovic sent me a note reporting on the 1st Adria Informix User Group Meeting..
Stockholm Informix User Group Meeting 11/16/09
After a busy week of meetings in the UK and Ireland I went to Stockholm to talk at the Stockholm Informix User Group meeting. I was a bit disappointed that it wasn't snowing but you can't have everything. The meeting started with an introduction from IBM Sweden's Information Management sales manager Fredrik Prien, followed by me presenting the IDS roadmap, then discussing embeddability, virtualization and cloud computing. Next up was Rickard Linck with a very detailed and informative talk on recent IDS features, followed by Ulf Åkerberg with an interesting talk on High availability demands at the Swedish Migration Board.
Speaking at this event turned out to be a lucrative endeavour, with all presenters receiving some bottles of Schnapps, Schnapps glasses and a scarf. Forgetting that the Schnapps was in my hand luggage and going through 3 sets of airport security to get home was challenging, but somehow I managed to bring them home without needing to drink them on the spot.
After the user group meeting most attendees decamped to a very pleasant Swedish restaurant for nourishment and bibulation..
MarkJamison 100000ESF6 2,219 Views
Yes this blog is slowing working it's way back to being active. Then intent will still be to help discuss issues revolving around the Informix Database platform and work. Again with both an eye towards the Developer and the Administrator. After all if you are not writing code against a Database what is the point in an administrator.
Too bad this has already started, but it looks like a useful resource nonetheless: Ajax Code Camp - a free online class that describes itself as an 18 week training course, but in fact appears to be a 22 week course.
The class is written by San Shing, a technology architect at Sun, who puts the class material online in various formats as he writes. I read through Ajax Basics slides from week 1, a 65 slide PDF file with speaker notes which does a thorough job at explaining the fundamentals of AJAX.
It's good to see this much information presented in a class format made available for free. Note he is also asking for volunteers:
If you do Websphere now might be a good time to get involved in the Ajax for IBM WebSphere Platform Early Program..
The early program release includes:
The package is available to download for the usual platforms, along with a getting started guide and information center.
If anyone tries integrating this with Informix I'll be interested to hear how it went.[Read More]