Now Playing Tracks

Evolving database access for new programming models

ORMs have been accepted as the standard solution for database access in the Java enterprise world for a long time. Like other patterns in Java enterprise programming they are based on a traditional model of object-oriented programming with object identity, mutable state, behavior and encapsulation. In practice, this leads to two problems:

This programming model is inherently imperative, unlike the declarative languages used for database access which describe the constraints on the data that should be queried but leave the execution strategy up to the database engine. It is practically impossible to predict the data access patterns in an imperative, mutable-state-based application in an automated way so that a minimum number of efficient database queries could be generated, thus leading to the biggest part of the well-known “impedance mismatch” of ORMs. The usual work-around consists of annotating the data model with hints for fetching certain data, or writing performance-critical queries explicitly, thus foregoing the convenience of the imperative data mapping.

In recent years, however, the traditional object-oriented programming model itself has come under attack. As CPUs are gaining more and more cores and the performance of the individual cores is not increasing by much, multi-threaded programming has become a requirement for scalable applications but this is very difficult to do in imperative programming with mutable state.

The solution has been known for a long time: functional programming. Taken to its extremes, it completely eschews mutable state, object identity and eager evaluation. Much like in a database query language, you only state what data you need, but not when or in what order it should be computed. A more pragmatic solution is provided by languages like Scala which gives you the power of abstraction from both object-oriented and functional programming and avoids mutable state in many cases but still allows you to use it when you want.

This new approach to programming also requires a new way of thinking about database access. Instead of object-relational mapping we need something akin to functional-relational mapping that allows us to compose database queries the same way we can compose functions, and then materialize the data in the form of immutable objects in the application. This is the approach taken by Slick, Typesafe’s database library for Scala, which treats database tables like Scala collections and compiles queries to a single SQL statement. This is only possible by using a host language as powerful as Scala which is well suited to building expressive DSLs that can be verified at type-checking time.

Stefan Zeiger is a Senior Software Engineer at Typesafe and the tech lead for Slick, the Scala database library

Get going with spatial NoSQL JEE6 applications in the cloud with OpenShift

In this session, Steve is a PaaS Dust Spreader (aka developer evangelist) with OpenShift gives an introduction to building apps on a Platform as a Service, using OpenShift as an example. We’ll begin with an introduction to PaaS and spatially-aware apps, and then get your JEE6 on JBoss EAP code up and running on OpenShift.

We’ll explore how easy it is to bring in dependencies and deploy your code, how to connect your code to a MongoDB back-end data store and merge in some of the (Github quickstarts) we have assembled - including (JEE6 with Mongo Spatial)

There are two goals of this session:

1) To leave knowing why you should start using a PaaS for your development work

2) Leave with first hand knowledge on how to run your Java code in the cloud for free!

This is just one of eight workshops on offer, attend 2 half day workshop for a single price of $299 for the whole day!

Visit http://jaxconf.com/workshops for more information! Hurry spaces are going fast!

 

Methodology, Spock, Java, NoSQL, Git, Neo4j and more at JAX hands-on Workshops

So, the big news for the past month has been that JAXConf, June 4-5 in Santa Clara will be FREE TO ATTEND for all! With over 40 sessions, keynotes and community event it is guaranteed to be a truly unique experience combining Pro style sessions with a community vibe.

However, for anyone wanting an extra deep dive into a specific topic, a hand-on workshop day will run at JAX Santa Clara HQ on June 3, the day before the conference. You can choose to attend 2 half-day workshops from the many of offer, charged at only $299 for both:

  • Continuous Delivery: Agile Infrastructure, with Thoughtwork’s Jez Humble
  • Continuous Delivery: Automating the build, test and deployment process again with Jez Humble
  • Java EE 7 Hands-on Lab with Oracle Evangelist Arun Gupta
  • Life is a graph - Connecting data with neo4j, led by HackNY leader Peter Bell
  • The Joy of Git with Githubber extraordinaire Tim Berglund
  • Mobile Design Workshop with Nathaniel T. Schutta
  • Java Testing with Spock with Ken Sipe
  • Get going with spatial NoSQL JEE6 applications in the cloud with OpenShift with Steve Citron-Pousty of RedHat
Make sure to register now (free of charge for the conference of course!) and guarantee your place.

For more information please email shonam@sandsmedia.com or visit JAXConf.com.

imageimageimageimageimageimage

An interview with Cloudera’s Kathleen Ting - ZooKeeper aficionado

JAX - Can you sum up your JAXConf session in 140 characters? 

KT - Configure ZooKeeper correctly and it’ll be as impenetrable as a distributed system allows.


JAX - Why is the theme of your session important to developers right now?

KT - ZooKeeper is the unsung hero. Although a critical component, ZooKeeper is often noticed only after it’s missing. In this presentation, we’ll talk about how to efficiently resolve some of the common issues that can cause ZooKeeper’s unavailability. An impenetrable ZooKeeper makes for a healthy cluster.


JAX - Why did you start coding?

KT - When I was growing up I wanted to be just like my older brother, an attorney. That was until my sophomore year of high school when on a whim, I attended an engineering camp hosted by Santa Clara University.I found myself happily holed up in the computer lab coding functional programming exercises in LISP. (Tiger got to hunt. Bird got to fly.

Lisper got to sit and wonder, (Y (Y Y))? – with apologies to Kurt Vonnegut and hat tip to Darius Bacon.) http://blog.cloudera.com/blog/2013/02/meet-the-engineer-kathleen-ting/


JAX - What in the development world (project or otherwise) is really interesting you at the moment?

KT - In a former life, I wrote software for storage on the mainframe, and in those days, you needed really deep pockets for pricey software and a lot of expensive big iron to get much value from your data. But now, with Apache Hadoop serving as the “Great Equalizer” for storing and processing Big Data, many, many more companies have the ability to do the same thing a lot more economically using open-source software and industry-standard hardware. I think the time is now for Big Data – there are more and more use cases every day, and for that reason, everyone wants a piece of the action. It’s an exciting time to be involved!


JAX - Who are your tech heroes?

KT - @cutting, @BigDataBorat, @DEVOPS_BORAT, @aprabhakar, @aaron_kimball, @gstein, @noirinp, @saintstack, @awadallah, @QwertyManiac, @jmhsieh, @tlipcon, @atm, @esammer, @elicollins, @mikeolson, @cbisciglia, @hackingdata, @otrajman, @esteban


JAX - What does the future hold for Java and/or the JVM?

KT - Big data platforms are written in Java. Big data is going places. Java’s along for the ride.

 

JAX - What’s the soundtrack to your work?

KT - Come Sail Away by the Styx


JAX - Would you rather fight one horse-sized duck or 100 duck-sized horses? Explain your reasoning.

KT - One horse-sized duck. Never underestimate distributed power - computing or otherwise.

To Tumblr, Love Pixel Union