• Home

  • Custom Ecommerce
  • Application Development
  • Database Consulting
  • Cloud Hosting
  • Systems Integration
  • Legacy Business Systems
  • Security & Compliance
  • GIS

  • Expertise

  • About Us
  • Our Team
  • Clients
  • Blog
  • Careers

  • VisionPort

  • Contact
  • Backcountry.com, CityPASS, and Zapp’s in the news

    Jon Jensen

    By Jon Jensen
    August 17, 2010

    I want to call attention to a few of our clients who have been in the news lately.

    Today, Backcountry.com’s CIO Kelly Phillipps spoke at the NRFtech 2010 conference in California on cultivating community and encouraging user-contributed content, and why Backcountry.com invests so much in building its community.

    About a month ago, CityPASS was featured in a spot on the Today Show about hostess gifts. A lot of viewers visited the website as the spot aired in each of the U.S. time zones!

    Finally, we were sad to learn that Zapp’s Potato Chips founder Ron Zappe passed away in June. He had quite an adventure building his two companies, first in oilfield services in Texas, then in 1985 with his potato chips company focused on spicy Cajun chips. Their online store is simple—​their products are excellent!


    clients

    Ruby on Rails Typo blog upgrade

    Jon Jensen

    By Jon Jensen
    August 11, 2010

    I needed to migrate a Typo blog (built on Ruby on Rails) from one RHEL 5 x86_64 server to another. To date I’ve done Ruby on Rails deployments using Apache with FastCGI, mongrel, and Passenger, and I’ve been looking for an opportunity to try out an nginx + Unicorn deployment to see how it compares. This was that opportunity, and here are the changes that I made to the stack during the migration:

    I used the following packages from End Point’s Yum repository for RHEL 5 x86_64:

    • nginx-0.7.64-2.ep
    • ruby-enterprise-1.8.7-3.ep
    • ruby-enterprise-rubygems-1.3.6-3.ep

    The rest were standard Red Hat Enterprise Linux packages, including the new RHEL 5.5 postgresql84 packages. The exceptions were the Ruby gems, which were installed locally with the gem command as root.

    I had to install an older version of one gem dependency manually, sqlite3-ruby, because the current version requires a newer version of sqlite than comes with RHEL 5. The installation commands were roughly:

    yum install sqlite-devel.x86_64
    gem install sqlite3-ruby -v 1.2.5
    
    gem install unicorn
    gem …

    hosting redhat ruby rails

    Creativity with fuzzy string search

    Josh Tolley

    By Josh Tolley
    August 10, 2010

    magnifying glass

    PostgreSQL provides a useful set of contrib modules for “fuzzy” string searching; that is, searching for something that sounds like or looks like the original search key, but that might not exactly match. One place this type of searching shows up frequently is when looking for peoples’ names. For instance, a receptionist at the dentist’s office doesn’t want to have to ask for the exact spelling of your name every time you call asking for an appointment, so the scheduling application allows “fuzzy” searches, and the receptionist doesn’t have to get it exactly right to find out who you really are. The PostgreSQL documentation provides an excellent introduction to the topic in terms of the available modules; This blog post also demonstrates some of the things they can do.

    The TriSano application was originally written to use soundex search alone to find patient names, but that proved insufficient, particularly because common-sounding last names with unusual spellings would be ranked very poorly in the search results. Our solution, which has worked quite well in practice, involved creative use of PostgreSQL’s full-text search combined with the pg_trgm contrib module.

    A trigram is a …


    open-source postgres search

    End Point turns 15 years old

    Jon Jensen

    By Jon Jensen
    August 9, 2010

    End Point was founded on August 8, 1995, so yesterday was its 15th anniversary! (Or is it a birthday? I’m never sure which it is for a company.) End Point’s founders Rick Peltzman and Ben Goldstein have been friends since grade school, and this wasn’t the first business they started together—​in college they painted houses together.

    Nearly 20 years later, sensing the huge potential of the newly commercialized Internet as a medium for mass communications and commerce, they joined forces again. They founded End Point to offer Internet and ecommerce consulting and hosting services. That was back before the Internet became heavily hyped, before the tech bubble of the late ’90s, and like most new companies, it took a lot of hard work, hope, patience, skill, and a little luck.

    End Point has grown from those humble beginnings to our present staff of 21 employees located in 13 states. We work with wonderful clients, old and new, who in many cases have become very close partners and friends as we’ve worked together to grow their businesses over the years.

    If we worked together in one office, we’d certainly celebrate with a large birthday cake, but since we’re a distributed company, we’re …


    company

    Tail_n_mail and the log_line_prefix curse

    Greg Sabino Mullane

    By Greg Sabino Mullane
    August 6, 2010

    One of the problems I had when writing tail_n_mail (a program that parses log files and mails interesting lines to you) was getting the program to understand the format of the Postgres log files. There are quite a few options inside of postgresql.conf that control where the logging goes, and what it looks like. The basic three options are to send it to a rotating logfile with a custom prefix at the start of each line, to use syslog, or to write it in CSV format. I’ll save a discussion of all the logging parameters for another time, but the important one for this story is log_line_prefix. This is what gets prepended to each log line when using ‘stderr’ mode (e.g. regular log files and not syslog or csvlog). By default, log_line_prefix is an empty string. This is a very useless default.

    What you can put in the log_line_prefix parameter is a string of sprintf style escapes, which Postgres will expand for you as it writes the log. There are a large number of escapes, but only a few are commonly used or useful. Here’s a log_line_prefix I commonly use:

    log_line_prefix = '%t [%p] %u@%d '

    This tells Postgres to print out the timestamp, the PID aka process id (inside of square …


    monitoring open-source perl postgres

    A WordPress Migration Quick Tip

    Steph Skardal

    By Steph Skardal
    August 4, 2010

    This morning Chris Kershaw asked me about a WordPress migration issue he was experiencing. Chris dumped the database from the current live server and imported it to another server with a temporary domain assigned and then tried to access the blog. Whenever he would attempt to visit the login (wp-admin) page, he would be redirected to the live domain admin login URL instead of the temporary domain. Luckily, there’s a quick fix for this.

    The simplified explanation for this is that throughout the WordPress code, there are various places where the base URL is retrieved from the database. There is a table (wp_options by default) that includes option settings and a function to retrieve data from the wp_options table (get_option). You’ll see something similar to the following two lines scattered throughout the WordPress source to retrieve the base URL to be used in redirects or link creation. In Chris’ case, my guess is that the wp-admin page was attempting to redirect him to the secure login page, which uses one of the examples below to get the base URL.

    $home = parse_url( get_option('siteurl') );
    $home_path = parse_url(get_option('home'));

    If we take a look at the …


    php

    Distributed Transactions and Two-Phase Commit

    Josh Tolley

    By Josh Tolley
    July 29, 2010

    The typical example of a transaction involves Alice and Bob, and their bank. Alice pays Bob $100, and the bank needs to debit Alice and credit Bob. Easy enough, provided the server doesn’t crash. But what happens if the bank debits Alice, and then before crediting Bob, the server goes down? Or what if they credit Bob first, and then try to debit Alice only to find she doesn’t have enough funds? A transaction allows the debit and credit operations to happen as a package (“atomically” is the word commonly used), so either both operations happen or neither happens, even if the server crashes halfway through the transaction. That way the bank never credits Bob without debiting Alice, or vice versa.

    That’s simple enough, but the situation can become more complex. What if, for instance, for buzzword-compliance purposes, the bank has “sharded” its accounts database by splitting it in pieces and putting each piece on a different server (whether this is would be smart or not is outside the scope of this post). The typical transaction handles statements issued only for one database, so we can’t wrap the debit and credit operations within a single BEGIN/COMMIT if Alice’s account information …


    database open-source postgres ruby scalability

    Spree: Gift Certificates and Coupons

    Steph Skardal

    By Steph Skardal
    July 29, 2010

    In a recent Spree project, I’ve been working with Bill Bennett to add gift certificate functionality. According to the Spree documentation, gift certificate functionality is trivial to implement using the existing coupon architecture. Here are some of the changes we went through as we tried to use the coupon architecture for gift certificate implementation—​we found that it wasn’t so simple after all.

    Here is a very simplified visualization of the coupon and adjustment data model in Spree. Coupons use polymorphic calculators to compute the applicable discount.

    First, Bill and I brainstormed to come up with an initial set of changes required for implementing gift certificates as coupons after we reviewed the data model shown above:

    1. Add logic to create a coupon during checkout finalization, which was done with the following:
    # coupon object class method
    def self.generate_coupon_code
      # some method to generate an unused random coupon code beginning in 'giftcert-'
    end
    # inside order model during checkout finalization
    line_items.select { |li| li.variant.product.is_gift_cert? }.each do |line_item|
      line_item.quantity.times do
        coupon = Coupon.create(:code => Coupon …

    ecommerce rails spree
    Previous page • Page 180 of 222 • Next page