Skip directly to content

Java

Building A High Throughput Web App with Spring-MVC and VoltDB

Thursday, June 21, 2012 - 12:00am

written by Andrew Wilson on June 21, 2012

My last few posts have discussed parts of a web application that integrate VoltDB into a Spring web application. Today I will show how all the pieces are put together to build a low latency, high throughput Spring-MVC application. Much of my focus will be on the data layer where VoltDB resides, but I will go all the way up to the browser too.

 

The application is simple. It has two main parts. The first is a scheduled process that casts votes into VoltDB. Those votes simulate people calling in and voting for their favorite contestant in a talent show.

Impact of Java Garbage Collection on in-memory databases

Friday, May 2, 2014 - 12:00am

Some users of Java, and specifically Java as it is used in in-memory database technology, worry Java’s ‘Garbage Collection’ can impact performance. Garbage Collection is intended to simplify memory management (allocation and de-allocation) and therefore reduce the amount of code written, speed development, and avoid memory management bugs. Garbage collection typically works by copying actively used (live) objects or tracking free memory occupied by unused (garbage) objects.

 

The primary concern is that most implementations of garbage collection stop (pause) application execution for some

Introducing VoltDB 3.0

Tuesday, January 22, 2013 - 12:00am

written by John Piekos on January 22, 2013

The VoltDB engineering team is thrilled to announce that VoltDB 3.0 is now available!  Over the past six months we’ve added a ton of features to VoltDB 3.0. This blog post lists the highlights, but that just scratches the surface. Look for future blog posts to dive into specific areas of version 3 functionality.

So let’s jump into what’s new in VoltDB 3.0…

Even Faster

VoltDB 3.0 has lower latency and more throughput than the VoltDB v2.x release.

JSON in VoltDB

Tuesday, February 5, 2013 - 12:00am

written by John Piekos on February 5, 2013

VoltDB 3.0 introduces the use of JSON-encoded columns to allow more flexibility in how you structure and interact with your data. New SQL functions and index capabilities let you work more naturally with JSON data while maintaining the efficiency and transactional consistency of a relational database.

How?  A VoltDB JSON Example

Let’s assume that you want to implement a single sign-on (SSO) application using VoltDB.  You wish to store the login session for a set of different online sites under a common username.

Leaderboards: Optimization for Ranking-Related Queries

Friday, October 5, 2012 - 12:00am

written by Douglas Patten on October 5, 2012

My name is Xin Jia and I was one of the student interns at VoltDB this summer. For one of my projects, I worked on a feature that greatly improved the performance of ranking-related queries.

Finding the rank of an entry in a sorted list of data is a common operation in a lot of applications. Take a leaderboard within gaming application as an example: it is common to have a scoreboard that keeps track of users’ scores. Questions like, “what are the top-n users and their corresponding scores?”, or “what is the rank of a certain user?” are often

Simplify Your Stored Procedure Logic with Expectations

Monday, December 3, 2012 - 12:00am

written by Andrew Wilson on December 3, 2012

John Hugg was talking with me today about a way to reduce the complexity of error checking in a stored procedure and how rarely it is used. VoltDB’s stored procedures let you set “expectations” on each SQL statement. Those expectations can eliminate several lines of code leading to shorter, readable and more reliable stored procedures.

Consider the following sample:

Example.DDL

CREATE TABLE user_table (

user_name        varchar(200)        UNIQUE NOT NULL,

  password         varchar(100)        NOT NULL,

  CONSTRAINT user_name_idx PRIMARY KEY

 

Using the Spring @Schedule Annotation

Wednesday, May 30, 2012 - 12:00am

written by Andrew Wilson on May 30, 2012

In a previous life I had a requirement that a web application scanned the expiration date of purchased content and sent one of three emails letting the user know that the item would expire soon, was going to expire very soon and that the item has expired. It fired up at early in the morning when the server had the lowest utilization. Later, I had to write a similar feature that would run every couple of minutes.

Using the Spring Converter API with VoltDB Data Objects

Wednesday, June 20, 2012 - 12:00am

written by Andrew Wilson on June 20, 2012

Mapping one type to another is a pretty common task. Hibernate and other ORM’s map a result from a data source’s native representation to an application specific representation. In English, I want to convert a JDBC result set, or data objects, into a collection of POJOs (plain old Java objects) using some kind of data mapping tool or API.

VoltDB client for the Go Language

Monday, October 29, 2012 - 12:00am

written by Ryan Betts on October 29, 2012 

A while ago I published my Go VoltDB driver to github (https://github.com/rbetts/voltdbgo).  I wrote the driver for three reasons: to learn and write a little go; to be able to test and script against VoltDB using go; and to experiment with some different VoltDB client patterns.

We, and the community, have written several production quality drivers for VoltDB (available at https://www.voltdb.com/download). The go driver, however, has not been tested for production use.

With caveats complete, what’s up with voltdbgo?

Firstly, it only supports

VoltDB, native memory, and you

Monday, March 3, 2014 - 12:00am

written by Ariel Weisberg on March 3, 2014 

(Originally published here.)

Target audience

This post targets other VoltDB developers who are going to be dealing with the various unconventional ways Volt now uses native memory in the Java portions of the database. It will also be of interest to other Java developers looking to step outside what is typically considered Java’s comfort zone for interacting with native memory.

What was

Out of the box Java doesn’t give you much in the way of tools for accessing native memory allocation and deallocation mechanisms like mmap or malloc.

Writing VoltDB Apps in Java Q & A

Friday, October 5, 2012 - 12:00am

written by Andrew Wilson on October 5, 2012

NewSQL and NoSQL databases present developers with a new and interesting programming model where there are fewer connections to the database, query parallelism, partitions and an easy model for supporting new clusters. Last month I presented a webinar introducing the basics of application development using VoltDB. We had a lot of great questions and I thought it would be handy to write them up and share the answers with everyone.

Q: Can you address how you would handle joining tables that have different partition keys?