Jump to content

Posts Tagged ‘open source’


Oracle/Sun not off to a good start with open source

Thursday, July 29th, 2010 by Jim Mlodgenski

Hot off the heels of Oracle stopping the PostgreSQL build farm servers for Solaris, Oracle released an automatic update for Java that rebrands the company name from Sun to Oracle which had the cascading effect of breaking Eclipse.

While I don’t think this is some sort of coordinated plan by Larry to bring down open source in general, I think this is indicative of the pain of integrating Sun in to Oracle and we can expect more of this in the future. On the positive side, I think the reactions by the PostgreSQL and Eclipse communities really highlight the power of the open source process. In both cases, the communities had solutions quickly in the wake of the mess created by Oracle.

Oracle/Sun not off to a good start with open source



Scala PostgreSQL Access

Thursday, July 8th, 2010 by Jim Mlodgenski

Recently, I’ve been digging into Scala to understand how PostgreSQL would integrate inside of Scala code. Scala is an interesting language which runs on the JVM like Java but eliminates much of the Java boiler plate code increasing the productivity of developers. With many of the knowledgeable Java programmers advocating Scala and large success stories like Twitter becoming more common, there is a possibility that one day Scala will unseat Java and the dominate enterprise programming language in the future. Given this possibility, it is encouraging that PostgreSQL is respected in the Scala community, but unfortunately, what I’m finding, database persistence in general is still appears to be immature inside of Scala. There is an early module called DBC that attempts to provide database connectivity, but this initial attempt was lacking. Below is an example of running a simple query which I find very awkward:

object MainDBC {

  import scala.dbc._
  import scala.dbc.Syntax._
  import syntax.Statement._

  def main(args: Array[String]): Unit = {
    val db = database("jdbc:postgresql://localhost/scala","postgres","password")
    val res = db.executeStatement {
      (select fields (("pgbench_tellers.tid" of integer)
                  and ("pgbench_tellers.bid" of integer)
                  and ("pgbench_branches.bbalance" of integer))
         from "pgbench_tellers, pgbench_branches"
        where "pgbench_tellers.bid = pgbench_branches.bid")
    }

    println(" tid   bid   bbalance")
    println("----- ----- ----------")
    for(val i <- res) {
      for(val f <- i.fields) {
        val r = f.content.sqlString
        print(r + "      ".dropRight(r.length))
      }
      println()
    }
  }
}

There are a number of object layers available that may be much easier to use, but the nice thing about Scala running on the JVM is that you can leverage the low level JDBC interface and eliminate much of the awkwardness. Below is an example of the same query but using JDBC.

object MainJDBC {

  import java.sql.{Connection, DriverManager, ResultSet}

  def main(args: Array[String]): Unit = {
    classOf[org.postgresql.Driver]
    val db = DriverManager.getConnection("jdbc:postgresql://localhost/scala","postgres","password")
    val st = db.createStatement

    val res = st.executeQuery(
               "SELECT pgbench_tellers.tid, pgbench_tellers.bid, pgbench_branches.bbalance" +
               "  FROM pgbench_tellers, pgbench_branches " +
               " WHERE pgbench_tellers.bid = pgbench_branches.bid")

    println(" tid   bid   bbalance")
    println("----- ----- ----------")
    while (res.next) {
        for(val i <- 1 to res.getMetaData.getColumnCount) {
          val r = res.getInt(i).toString
          print(r + "      ".dropRight(r.length))
        }
        println
    }
    db.close
  }
}
Scala PostgreSQL Access



Give Me My Own Cloud

Thursday, February 25th, 2010 by Jim Mlodgenski

I’ve recently attended several Cloud Computing forums and panels, and the general feeling throughout most of the audience has been that the promise of Cloud Computing sounds great, but many organizations are still apprehensive about moving to a public cloud such as Amazon’s EC2. This is understandable given security concerns and just the general feeling of a lack of control, so the concept of private clouds  becomes a great solution. It allows organizations to use the power of Cloud Computing without ever leaving the friendly confines of their own data center. There are many products that enable this such as VMWare’s vShere and the open source product Eucalyptus with many more on the way. When you look at this architecturally, this really is the next generation of virtualization giving administrators more power to efficiently use their physical resources.

The other interesting trend was the types of applications organizations are considering for use in the cloud. While there is much talk about replatforming existing application onto Cloud Computing infrastructures, many organizations seem to people getting their feet wet with new applications. They seem to be fairly traditional applications and not leveraging the elasticity of the cloud and they are just leveraging the financial benefits of not needed to procure new hardware. This trend show a lot of great promise for PostgreSQL given that Oracle does not have a favorable licensing model in virtualized environments. While Oracle is expensive in traditional environments, much of the cost benefits are eroded when Oracle is needed in a cloud environment. This is leading many people to open source solutions and PostgreSQL is a natural fit for many Oracle users.

Give Me My Own Cloud



Automating Cloud Deployments

Monday, February 1st, 2010 by Jim Mlodgenski

One of the promises of Cloud Computing is the ease of spinning up new instances and adding them to an existing application allowing for elasticity, but actually doing that in practice is anything but simple. Increasing the complexity would be adding another dimension of wanting to accomplish this across multiple cloud vendors. This is important for some SAAS vendors that want redundancy or just for organizations wanting to avoid vendor lock-in. An open source project by Red Hat called DeltaCloud shows the promise of on day allowing this, but the functionality of actually configuring a running instance is not addressed. RightScale has a number of Ruby Gems that addresses the same problem as DeltaCloud, but again, it falls short on configuring a running instance. These two projects will probably progress together since DeltaCloud actually uses the RightScale Gems under the covers.  A project that handles configuring running instances well is Cloud Tools which powers Cloud Foundry for SpringSource. Cloud Tools provides a simple way to configure running instances in complex deployments which even includes setting up replication between 2 database servers. The downside is that it only works for Amazon’s EC2. Since all of the projects are open, jamming them together could be a powerful combination and may be necessary as cloud deployments become more complex across providers.

Automating Cloud Deployments



School is Out

Wednesday, September 30th, 2009 by Bruce Momjian

I completed teaching my university database course at the end of August. The class went more smoothly than I thought. It was similar to teaching at a conference, except it was twice a week for ten weeks. I had a teaching assistant who graded the homework, and an experienced professor helped with exams and grading, so I focused mostly on lectures.

All the students had heard of Postgres and knew of its reputation. They all used Postgres for homework assignments, including one that required writing an application that connected to Postgres. No one had major problems, which is a good indication that our one-click installers are easy for new users.

Though the course is over, I am still on the Drexel faculty and will probably be involved in database and open source activities there in the future.

School is Out