Our Blog. We have some things we'd like to share.

Sending UTF-8 email with Oracle

Released April 18th, 2007

I have seen several examples of sending email using oracle with non-ascii characters floating around the Internet, but few seem to tackle sending these ’special’ characters in both the subject and the body. Many also take a shortcut and use 8bit transfer encoding for the body. I am 99.9% sure that this will work on today’s mail servers, but basic SMTP only really needs to support 3 transfer encodings – 7bit ascii, base64, and quoted-printable.

Read the rest of this entry »

Recent Sitemap Enhancements

Released April 12th, 2007

There have been a couple recent enhancements to sitemaps that everyone should start using.

The first is that Google now supports embedding kml data into sitemaps. This allows you to provide a hint as to where information is related to geographicaly as well as more detailed information to be used in popups on the map. For more information on how to make the integration see the maps sitemap API page. We already support sitemaps in our content management solution and we will be integrating this new mapping feature as well.

The second new feature added has to do with getting your sitemap included in search engines. Now all search engines that support sitemaps will inspect your robots.txt file for a pointer to your sitemap. This should remove the need for everyone to submit their sitemap to every search engine. You may still want to submit your sitemap because there are nice tools from engines like Google that let you investigate more information about your site but now you won’t have to if all you are looking for is your site to be crawled correctly.

Computing time with Oracle sysdate

Released April 11th, 2007

If you ever need to work with something other than a day when using sysdate you are in luck. As it turns out you can work on sysdate with fractional days. This is just what a person needs when they want to do something like:

SELECT mycol FROM sometable WHERE sometimestamp < "30 seconds ago"

The main trick here is to know that sysdate math is based in days and fractional days work. Here are a few examples:

Remove hours from a date:

sysdate – hours/hours in a day

Remove minutes from a date:

sysdate – minutes/(hours in a day * minutes in an hour)
or
sysdate – minutes/minutes in a day

Remove seconds from a date:

sysdate – seconds/(hours in a day * minutes in an hour * seconds in a minute)
or
sysdate – seconds/seconds in a day

The example above would be:

SELECT mycol FROM sometable WHERE sometimestamp < sysdate - 30/(24*60*60)

How to Create and Overlay KML on a Google Map Using Google’s My Maps

Released April 6th, 2007

A few days ago Google made their “My Maps” announcment and since then there has been nothing but buzz buzz buzz about it. So I figured I would take a minute to show how someone can use this new tool from Google to create their own embedded maps for their site.

Read the rest of this entry »

Mongrel vs. WEBrick

Released April 3rd, 2007

We had the need to hook up a simple ruby web process (non-rails) to our production apache server. As Leslie Hensley pointed out, fcgi and scgi are on the way out, and mongrel + mod_proxy_balancer is the new way to go. We use mongrel extensively in our rails deploys, but always just used WEBrick to do simple serving. To make a long story short, we had to ask ourselves….is mongrel that much better (and in this case better == faster) than WEBrick?

Read the rest of this entry »

Latest on Rails Performance

Released April 1st, 2007

Updated Rails 1.2 performance numbers have been released. While these number look pretty good it is hard to get a good idea of exactly what the performance of Rails is. A couple of other benchmarks that include Rails such as performance tests for 6 frameworks and Grails vs Rails benchmarks show a different picture. Both of these come up with much worse performance than the first. Maybe the issue is that the second two benchmarks are using Apache ab but the first uses a new version of rails bench. Of course most people probably aren’t that worried about the benchmarks that much because you can find ways to make anything fast as shown with Rails doing 4000 requests a second.

Online Vs Offline Applications: Everything old is new again

Released March 28th, 2007

Everyone has probably noticed this already but the old is new again cycle for “online” desktop apps has been shortening at a rapid pace. Everywhere you turn you see people talking about offline and online apps and what should be online vs offline. If you take your time machine back you would see something like the following timeline:

  • 1970s 3270
  • 1980s X terminal
  • 1990s Java applets
  • 2000 Flash
  • 2005 Ajax

Up until about 2000 it was taking 10 years to cycle from “we want everything on our desktop” to “we want everything on the server”. Now the cycle seems to have sped up to every year and then to constant. A couple recent examples of new faces on this old idea are Adobe’s Apollo and Joyent’s Slingshot.

Fundamentally not much has changed from the 1970s. The goal is to centralize computing resources into one place (in the simple view of things) and make issues like software deployment easier.The main difference now is that the industry has come to the point where there isn’t any turning back and everyone has bought on to the need and usefulness of online apps. The main sticking point seems to be finding a way to resolve issues that come up from users being disconnected from time to time. I’ll bet that one won’t be fully resolved until you have connectivity anywhere and everywhere you go.

Tomcat + UTF8 + HTTP Get

Released March 19th, 2007

By default tomcat doesn’t UTF-8 encode get parameters like it does post parameters. This doesn’t seem to be the case with other application servers. So before you get yourself into trouble with your internationalized web application, make sure you make this change.

iSeries SQL Performance

Released March 11th, 2007

Our project has entered the stage where we start tuning the data access to improve performance. This project uses Hibernate to access a AS400/iSeries system via the JT400 JDBC driver. My prior experience using the SQL Server
database introduced me to Microsoft’s Query Analyzer, which is a nice tool for identifying where you need to index the database. A bit of searching turned up an IBM tool called Visual Explain that fits the same need. The sysadmin started the profiling tool against my connection, and I ran through a standard usage scenario in our application. Visual Explain showed each query, how long it took, the access strategy, and recommended indexes. This kind of tool is absolutely essential for database performance tuning.

The second important item we learned from this process is the performance difference between a true SQL index on the iSeries and a keyed logical index. From iSeries V4R2 on, SQL indexes have page sizes of 64k. By comparison, a DDS logical will max out at 32k, and will typically be much smaller. The performance is so much better that our customer is converting all all their DDS logical indexes to SQL, even if only their legacy RPG applications use it. This IBM document has a good discussion of this issue.

Hibernate and your Getters and Setters

Released March 11th, 2007

When you’re using Hibernate and are mapping to properties, keep your getters and setters as simple and self-contained as possible. The receiver being initialized may not have any other properties set, and the value being passed may not be fully initialized yet, either.

If you don’t respect these two possibilities, then you will get bit in the butt alot, when you least expect it. To be fair, these situations can happen whether you’re using Hibernate or not, but when we first started using the framework we made lots of assumptions.

Here is a completely ridiculous example that violates the above restrictions:
Read the rest of this entry »

Cincinnati 513.298.1865

Virginia 7875 Promontory Court Dunn Loring, VA 22027

Kentucky 12910 Shelbyville Road Suite 310 Louisville, KY 40243 502.245.6756

© 2010 Mission Data twitter