<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Coders Like Us &#187; simpledb</title>
	<atom:link href="http://coderslike.us/tag/simpledb/feed/" rel="self" type="application/rss+xml" />
	<link>http://coderslike.us</link>
	<description>Things I've learned and stuff I'm thinking about.</description>
	<lastBuildDate>Sat, 31 Mar 2012 00:16:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='coderslike.us' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Coders Like Us &#187; simpledb</title>
		<link>http://coderslike.us</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://coderslike.us/osd.xml" title="Coders Like Us" />
	<atom:link rel='hub' href='http://coderslike.us/?pushpress=hub'/>
		<item>
		<title>Persistent Counters in SimpleDB</title>
		<link>http://coderslike.us/2010/03/09/persistent-counters-in-simpledb/</link>
		<comments>http://coderslike.us/2010/03/09/persistent-counters-in-simpledb/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:15:55 +0000</pubDate>
		<dc:creator>dkavanagh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[simpledb]]></category>
		<category><![CDATA[typica]]></category>

		<guid isPermaLink="false">http://coderslike.us/?p=351</guid>
		<description><![CDATA[I&#8217;ve already discussed the new consistency features of Amazon SimpleDB. One of the things people have wished for in SimpleDB was a way to manage a universal counter, something similar to an auto-incrementing primary key in MySQL. The consistency features allow clients to implement such a thing very easily. The following is an algorithm; To [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=351&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve already <a href="http://coderslike.us/2010/02/25/eventually-consistent-or-immediately-with-simpledb/">discussed</a> the new consistency features of <a href="http://aws.amazon.com/simpledb/">Amazon SimpleDB</a>. One of the things people have wished for in SimpleDB was a way to manage a universal counter, something similar to an auto-incrementing primary key in MySQL. The consistency features allow clients to implement such a thing very easily. The following is an algorithm;<br />
<pre class="brush: plain;">
Read value
Write value+1, but only if the previous value is what we just read
If write failed, increment value and try again
else return new value
</pre></p>
<p>To make it easy for Java programmers to do this with <a href="http://code.google.com/p/typica/">typica</a>, I&#8217;ve added a Counter class. Usage is very simple as you can see by this example;<br />
<pre class="brush: plain;">
SimpleDB sdb = new SimpleDB(&quot;AccessId&quot;, &quot;SecretKey&quot;);
Domain dom = sdb.createDomain(&quot;MyDomain&quot;);
Counter c = new Counter(dom, &quot;counter1&quot;);
for (int i=0; i&lt;20; i++) {
	System.err.println(&quot;next val = &quot;+c.nextValue());
}
</pre><br />
This code creates a counter and initializes it if there isn&#8217;t a current value. It uses a Iterator-like interface, but there is no test for next value because there always is one. The Counter object is stateless, so it relies totally on SimpleDB for its value. This will work very well on multiple app servers, all relying on the same counter for unique values.</p>
<p>To avoid this blog getting out of date, I won&#8217;t include the counter code here, rather you can browse it in <a href="http://code.google.com/p/typica/source/browse/trunk/java/com/xerox/amazonws/sdb/Counter.java">SVN</a>.</p>
<p>Code has been checked into SVN r311. I&#8217;ll update this post once the new version of typica is released which includes this.</p>
<p>For those seeking a more pythonic version, have a look <a href="http://www.elastician.com/2010/02/stupid-boto-tricks-2-reliable-counters.html">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/coderslikeus.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/coderslikeus.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/coderslikeus.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/coderslikeus.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/coderslikeus.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/coderslikeus.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/coderslikeus.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/coderslikeus.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/coderslikeus.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/coderslikeus.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/coderslikeus.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/coderslikeus.wordpress.com/351/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/coderslikeus.wordpress.com/351/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/coderslikeus.wordpress.com/351/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=351&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://coderslike.us/2010/03/09/persistent-counters-in-simpledb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd0b0382966354c72daa660969bca2cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dkavanagh</media:title>
		</media:content>
	</item>
		<item>
		<title>Eventually Consistent, or Immediately with SimpleDB</title>
		<link>http://coderslike.us/2010/02/25/eventually-consistent-or-immediately-with-simpledb/</link>
		<comments>http://coderslike.us/2010/02/25/eventually-consistent-or-immediately-with-simpledb/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 00:52:13 +0000</pubDate>
		<dc:creator>dkavanagh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[simpledb]]></category>

		<guid isPermaLink="false">http://coderslike.us/?p=343</guid>
		<description><![CDATA[Amazon SimpleDB has been a service that provides a schema-less data store with some fairly simple query abilities. One of the catches has always been that when you put a piece of data in, you might not get it back in a query right away. That time delay is generally very short (like &#60; 1 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=343&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Amazon SimpleDB has been a service that provides a schema-less data store with some fairly simple query abilities. One of the catches has always been that when you put a piece of data in, you might not get it back in a query right away. That time delay is generally very short (like &lt; 1 second), but there are no guarantees of this. The cause of this goes back to the fundamental tradeoffs in highly available and redundant systems, such as those Amazon builds. Werner Vogels does a pretty good job of laying out the tradeoffs in his &quot;<a href="http://www.allthingsdistributed.com/2007/12/eventually_consistent.html">Eventually Consistent</a>&#8221; blog post, and others he links to. Essentially, it&#8217;s the CAP theorem, which talks about how you can have only 2 of Consistency, Availability or  Partitioning (which gets at redundancy).<br />
Using SimpleDB has required an understanding of how inconsistent results will affect your application. Mostly, it has been important that the application never rely on data being there immediately. This can cause problems when trying to give the user completely up to date information.</p>
<p>SimpleDB now supports consistent read, put and delete. There is a cost for consistency, which is potentially higher latency. Let&#8217;s take a look at the new features.<br />
The simplest improvement is in the Select and GetAttributes calls. Supplying the &#8220;ConsistentRead=true&#8221; parameter ensures consistent data is returned. Now, SimpleDB is an option for storing application state. A regular Put can be used and consistent read will get the current state, always.<br />
What is far more interesting is what has been done with put and delete. PutAttributes has some optional parameters that define a condition that must be met to allow the put to continue. In the request, you can define an expected value for some attribute, or specify that the attribute simply must exist. One application for consistent put is a counter. Imagine an item that has counter attribute. To increment the counter, simply read the value, then do a conditional put, specifying the new value, but only if the old value is set. The request will fail if another writer got there first. A retry loop is required, as in this pseudo-code<br />
<pre class="brush: plain;">
value = read(counter);
while (put counter=value+1, if counter==value fails) {
    value = read(counter);
}
</pre></p>
<p>The same can happen for the delete operation. In a future post, I&#8217;ll talk about how to use typica to access these new features from Java. (added! http://coderslike.us/2010/03/09/persistent-counters-in-simpledb/)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/coderslikeus.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/coderslikeus.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/coderslikeus.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/coderslikeus.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/coderslikeus.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/coderslikeus.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/coderslikeus.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/coderslikeus.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/coderslikeus.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/coderslikeus.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/coderslikeus.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/coderslikeus.wordpress.com/343/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/coderslikeus.wordpress.com/343/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/coderslikeus.wordpress.com/343/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=343&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://coderslike.us/2010/02/25/eventually-consistent-or-immediately-with-simpledb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd0b0382966354c72daa660969bca2cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dkavanagh</media:title>
		</media:content>
	</item>
		<item>
		<title>A Unique Method of Authenticating against App-Managed Userlist</title>
		<link>http://coderslike.us/2010/01/14/a-unique-method-of-authenticating-against-app-managed-userlist/</link>
		<comments>http://coderslike.us/2010/01/14/a-unique-method-of-authenticating-against-app-managed-userlist/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 02:34:56 +0000</pubDate>
		<dc:creator>dkavanagh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[simpledb]]></category>
		<category><![CDATA[socket]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://coderslike.us/?p=325</guid>
		<description><![CDATA[I have a project that uses Amazon&#8217;s SimpleDB service for data storage. Being a Java programmer, I have become fond of using JPA (Java Persistence Architecture) implementations. In some cases, I&#8217;ve used EclipseLink, but more recently I&#8217;ve been playing with SimpleJPA. This is a partial JPA implementation on top of SimpleDB. The benefits include writing [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=325&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have a project that uses Amazon&#8217;s <a href="http://aws.amazon.com/simpledb/">SimpleDB</a> service for data storage. Being a Java programmer, I have become fond of using <a href="http://http://java.sun.com/developer/technicalArticles/J2EE/jpa/">JPA</a> (Java Persistence Architecture) implementations. In some cases, I&#8217;ve used EclipseLink, but more recently I&#8217;ve been playing with <a href="http://code.google.com/p/simplejpa/">SimpleJPA</a>. This is a partial JPA implementation on top of SimpleDB. The benefits include writing value objects with minimal annotations to indicate relationships.  </p>
<p>Anyway, enough about why I do it. Since my user list is also stored in JPA entities, I&#8217;d like to tie this into the container managed authentication. The web app I&#8217;m writing is being deployed to <a href="http://tomcat.apache.org/">tomcat</a> and so <a href="http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/Realm.html">realms</a> are used to define a authentication provider. Tomcat provides several realms that hook into a JDBC Database, JAAS, JNDI Datasource and more. In my case, I wanted to rely in data access via JPA.  Before discussing the challenges, I should point out that in a Java web app container, there are different class loaders to contend with. The container has its own classloader, and each web application has its own. My application obviously contains all of the supporting jars for SimpleJPA and my value objects. Since authentication is being handled by the container, it doesn&#8217;t have access to my app&#8217;s classloader. So, I&#8217;d need to deploy about 12 jar files into the tomcat/lib directory to make them available to the container. One of those contains my value objects and could change in the future. I don&#8217;t think that&#8217;s a very nice deployment strategy (deploying a war, and then a separate jar for each software update).</p>
<p>To solve this problem, I had to come up with a way to write my own Realm with as few dependencies on my application as possible. What I came up with is a socket listener, running on a dedicated socket, within my web application. It only accepts connections from localhost, so it is not likely to become a security concern. The socket listener receives a username and returns username,password,role1,role2,&#8230; as a string. That is the contract between my web application and the authentication realm. The realm interfaces with the socket listener and uses that to get information about the user trying to authenticate, which is converts to the object format used within realms in tomcat.</p>
<p>The code for the socket listener is fairly simple;<br />
<pre class="brush: plain;">
package org.scalabletype.util;

import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;
import java.net.ServerSocket;
import java.net.UnknownHostException;

import javax.persistence.EntityManager;
import javax.persistence.Query;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.scalabletype.data.DataHelper;
import org.scalabletype.data.User;

/**
 * This class listens on a port, receives a username, looks up user record, then responds with data.
 */
public class AuthServer extends Thread {
	private static Log logger = LogFactory.getLog(AuthServer.class);
	public static final int AUTH_SOCKET = 2000;

	public AuthServer() { }

	public void run() {
		while (!isInterrupted()) {
			try {
				ServerSocket ss = new ServerSocket(AUTH_SOCKET);
				while (!isInterrupted()) {
					Socket sock = ss.accept();
					try {
						// confirm connection from localhost only
						InetAddress addr = sock.getInetAddress();
						if (addr.getHostName().equals(&quot;localhost&quot;)) {
							// get user to authenticate
							InputStream iStr = sock.getInputStream();
							byte [] buf = new byte[1024];
							int bytesRead = iStr.read(buf);
							String username = new String(buf, 0, bytesRead);
							logger.info(&quot;username to authenticate:&quot;+username);

							// fetch user from JPA
							EntityManager em = DataHelper.getEntityManager();
							Query query = em.createQuery(&quot;select object(o) from User o where o.username = :name&quot;);
							query.setParameter(&quot;name&quot;, username);
							User usr = (User)query.getSingleResult();

							// return user data, or nothing
							OutputStream oStr = sock.getOutputStream();
							logger.info(&quot;got connection, going to respond&quot;);
							if (usr != null) {
								StringBuilder ret = new StringBuilder();
								ret.append(usr.getUsername());
								ret.append(&quot;,&quot;);
								ret.append(usr.getPassword());
								ret.append(&quot;,&quot;);
								ret.append(usr.getAuthGroups());
								oStr.write(ret.toString().getBytes());
							}
							oStr.flush();
						}
						sock.close();
					} catch (Exception ex) {
						logger.error(&quot;Some problem handling the request&quot;, ex);
					}
				}
			} catch (Exception ex) {
				logger.error(&quot;problem accepting connection. will keep going.&quot;, ex);
			}
		}
	}
}
</pre><br />
The socket listener needs to be invoked when the web application is initialized and a ServletContextListener is a good place to do that;<br />
<pre class="brush: plain;">
public class ScalableTypeStarter implements ServletContextListener {
	private AuthServer auth;

	public void contextInitialized(ServletContextEvent evt) {
		// init data persistence layer
		DataHelper.initDataHelper(evt.getServletContext());

		// start authorization socket listener
		auth = new AuthServer();
		auth.start();
	}

	public void contextDestroyed(ServletContextEvent evt) {
		if (auth != null) {
			auth.interrupt();
			auth = null;
		}
	}
}

</pre></p>
<p>Here is the code for my realm, which is packaged by itself into a jar, and deployed (once) into the tomcat/lib directory.<br />
<pre class="brush: plain;">
package org.scalabletype.util;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.catalina.Group;
import org.apache.catalina.Role;
import org.apache.catalina.User;
import org.apache.catalina.UserDatabase;
import org.apache.catalina.realm.GenericPrincipal;
import org.apache.catalina.realm.RealmBase;

/**
 * This realm authenticates against user data via the socket listener.
 *
 */
public class UserRealm extends RealmBase {
	public static final int AUTH_SOCKET = 2000;

    protected final String info = &quot;org.scalabletype.util.UserRealm/1.0&quot;;
    protected static final String name = &quot;UserRealm&quot;;

    /**
     * Return descriptive information about this Realm implementation and
     * the corresponding version number, in the format
     * &lt;code&gt;&amp;lt;description&amp;gt;/&amp;lt;version&amp;gt;&lt;/code&gt;.
     */
    public String getInfo() {
        return info;
    }

    /**
     * Return &lt;code&gt;true&lt;/code&gt; if the specified Principal has the specified
     * security role, within the context of this Realm; otherwise return
     * &lt;code&gt;false&lt;/code&gt;. This implementation returns &lt;code&gt;true&lt;/code&gt;
     * if the &lt;code&gt;User&lt;/code&gt; has the role, or if any &lt;code&gt;Group&lt;/code&gt;
     * that the &lt;code&gt;User&lt;/code&gt; is a member of has the role. 
     *
     * @param principal Principal for whom the role is to be checked
     * @param role Security role to be checked
     */
    public boolean hasRole(Principal principal, String role) {
        if (principal instanceof GenericPrincipal) {
            GenericPrincipal gp = (GenericPrincipal)principal;
            if(gp.getUserPrincipal() instanceof User) {
                principal = gp.getUserPrincipal();
            }
        }
        if (!(principal instanceof User) ) {
            //Play nice with SSO and mixed Realms
            return super.hasRole(principal, role);
        }
        if (&quot;*&quot;.equals(role)) {
            return true;
        } else if(role == null) {
            return false;
        }
        User user = (User)principal;
        UserInfo usr = findUser(user.getFullName());
        if (usr == null) {
            return false;
        } 
        for (String group : usr.groups) {
			if (role.equals(group)) return true;
		}
        return false;
    }
		
    /**
     * Return a short name for this Realm implementation.
     */
    protected String getName() {
        return name;
    }

    /**
     * Return the password associated with the given principal's user name.
     */
    protected String getPassword(String username) {
        UserInfo user = findUser(username);

        if (user == null) {
            return null;
        } 

        return (user.password);
    }

    /**
     * Return the Principal associated with the given user name.
     */
    protected Principal getPrincipal(String username) {
        UserInfo user = findUser(username);
        if(user == null) {
            return null;
        }

        List roles = new ArrayList();
        for (String group : user.groups) {
            roles.add(group);
        }
        return new GenericPrincipal(this, username, user.password, roles);
    }

	private UserInfo findUser(String username) {
		UserInfo user = new UserInfo();
		try {
			Socket sock = new Socket(&quot;localhost&quot;, AUTH_SOCKET);
			OutputStream oStr = sock.getOutputStream();
			oStr.write(username.getBytes());
			oStr.flush();
			InputStream iStr = sock.getInputStream();
			byte [] buf = new byte[4096];
			int len = iStr.read(buf);
			if (len == 0) {
				return null;
			}
			String [] data = new String(buf, 0, len).split(&quot;,&quot;);
			user.username = data[0];
			user.password = data[1];
			ArrayList&lt;String&gt; groups = new ArrayList&lt;String&gt;();
			for (int i=2; i&lt;data.length; i++) {
				groups.add(data[i]);
			}
			user.groups = groups;
		} catch (UnknownHostException ex) {
			ex.printStackTrace();
		} catch (IOException ex) {
			ex.printStackTrace();
		}
		return user;
	}

	class UserInfo {
		String username;
		String password;
		List&lt;String&gt; groups;
	}
}
</pre></p>
<p>The web app&#8217;s context.xml contains this line to configure the realm;<br />
<pre class="brush: plain;">
&lt;Realm className=&quot;org.scalabletype.util.UserRealm&quot; resourceName=&quot;ScalableTypeAuth&quot;/&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/coderslikeus.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/coderslikeus.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/coderslikeus.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/coderslikeus.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/coderslikeus.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/coderslikeus.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/coderslikeus.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/coderslikeus.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/coderslikeus.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/coderslikeus.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/coderslikeus.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/coderslikeus.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/coderslikeus.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/coderslikeus.wordpress.com/325/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=325&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://coderslike.us/2010/01/14/a-unique-method-of-authenticating-against-app-managed-userlist/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd0b0382966354c72daa660969bca2cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dkavanagh</media:title>
		</media:content>
	</item>
		<item>
		<title>Amazon SimpleDB now available in the EU region</title>
		<link>http://coderslike.us/2009/09/22/amazon-simpledb-now-available-in-the-eu-region/</link>
		<comments>http://coderslike.us/2009/09/22/amazon-simpledb-now-available-in-the-eu-region/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 05:52:32 +0000</pubDate>
		<dc:creator>dkavanagh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[simpledb]]></category>

		<guid isPermaLink="false">http://coderslike.us/?p=277</guid>
		<description><![CDATA[Amazon has just announced support for SimpleDB in their European data center. That means applications running in the EU will have lower latency when accessing SimpleDB. That&#8217;s good news for SimpleDB adoption. The EU SimpleDB is a totally separate version of the service as with S3 and EC2. So, you simply use the EU endpoint [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=277&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Amazon has just <a href="http://developer.amazonwebservices.com/connect/ann.jspa?annID=499">announced</a> support for SimpleDB in their European data center. That means applications running in the EU will have lower latency when accessing SimpleDB. That&#8217;s good news for SimpleDB adoption. The EU SimpleDB is a totally separate version of the service as with S3 and EC2. So, you simply use the EU endpoint (<a href="http://sdb.eu-west-1.amazonaws.com/">sdb.eu-west-1.amazonaws.com</a>) and it is business as usual.</p>
<p>The QueryTool now has built in support for region selection, which should make it easier to test queries and export data from both places. It is available for download <a href="http://code.google.com/p/typica/">here</a></p>
<p>Typica is ready for the EU. Simply create the SimpleDB object with the new EU endpoint (instead of the default US endpoint);</p>
<p><em>SimpleDB sdb = new SimpleDB(accessId, secretKey, true, &#8220;</em><a href="http://sdb.eu-west-1.amazonaws.com/"><em>sdb.eu-west-1.amazonaws.com</em></a><em>&#8220;);</em></p>
<p><em><br />
</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/coderslikeus.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/coderslikeus.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/coderslikeus.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/coderslikeus.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/coderslikeus.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/coderslikeus.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/coderslikeus.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/coderslikeus.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/coderslikeus.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/coderslikeus.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/coderslikeus.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/coderslikeus.wordpress.com/277/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/coderslikeus.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/coderslikeus.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=277&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://coderslike.us/2009/09/22/amazon-simpledb-now-available-in-the-eu-region/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd0b0382966354c72daa660969bca2cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dkavanagh</media:title>
		</media:content>
	</item>
		<item>
		<title>QueryTool now exports data</title>
		<link>http://coderslike.us/2009/09/18/querytool-now-exports-data/</link>
		<comments>http://coderslike.us/2009/09/18/querytool-now-exports-data/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 15:12:05 +0000</pubDate>
		<dc:creator>dkavanagh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[simpledb]]></category>
		<category><![CDATA[typica]]></category>

		<guid isPermaLink="false">http://coderslike.us/?p=272</guid>
		<description><![CDATA[There are some things I&#8217;ve been wanting in the QueryTool, so I just threw them in. Here&#8217;s the list; proxy support (add proxy host and port to the command line args) sortable results table (via column header click) export result data to CSV file scrollable query scratchpad The tool can be downloaded here To run [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=272&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are some things I&#8217;ve been wanting in the QueryTool, so I just threw them in. Here&#8217;s the list;</p>
<ul>
<li>proxy support (add proxy host and port to the command line args)</li>
<li>sortable results table (via column header click)</li>
<li>export result data to CSV file</li>
<li>scrollable query scratchpad</li>
</ul>
<p><img class="alignnone size-full wp-image-273" title="Screen shot 2009-09-18 at 10.00.01 AM" src="http://coderslikeus.files.wordpress.com/2009/09/screen-shot-2009-09-18-at-10-00-01-am.png?w=655&h=492" alt="Screen shot 2009-09-18 at 10.00.01 AM" width="655" height="492" /></p>
<p>The tool can be downloaded <a href="http://code.google.com/p/typica/downloads/detail?name=QueryTool1.2.jar&amp;can=2&amp;q=#makechanges">here</a></p>
<p>To run it, type;</p>
<p><em>java -jar QueryTool1.2.jar &lt;AccessId&gt; &lt;SecretKey&gt; [ProxyHost] [ProxyPort]</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/coderslikeus.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/coderslikeus.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/coderslikeus.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/coderslikeus.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/coderslikeus.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/coderslikeus.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/coderslikeus.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/coderslikeus.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/coderslikeus.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/coderslikeus.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/coderslikeus.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/coderslikeus.wordpress.com/272/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/coderslikeus.wordpress.com/272/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/coderslikeus.wordpress.com/272/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=272&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://coderslike.us/2009/09/18/querytool-now-exports-data/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd0b0382966354c72daa660969bca2cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dkavanagh</media:title>
		</media:content>

		<media:content url="http://coderslikeus.files.wordpress.com/2009/09/screen-shot-2009-09-18-at-10-00-01-am.png" medium="image">
			<media:title type="html">Screen shot 2009-09-18 at 10.00.01 AM</media:title>
		</media:content>
	</item>
		<item>
		<title>QueryTool 1.1, even more to like!</title>
		<link>http://coderslike.us/2009/08/05/querytool-1-1-even-more-to-like/</link>
		<comments>http://coderslike.us/2009/08/05/querytool-1-1-even-more-to-like/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 20:39:17 +0000</pubDate>
		<dc:creator>dkavanagh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[simpledb]]></category>
		<category><![CDATA[typica]]></category>

		<guid isPermaLink="false">http://coderslike.us/?p=262</guid>
		<description><![CDATA[A number of you have requested some new features, and some of them have made it into this new release. You can now add and delete domains from within the tool. Also, clicking on results lets you copy the cell or row into the clipboard. This later feature can be really handy for putting item [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=262&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-263" title="Screen shot 2009-08-05 at 4.29.39 PM" src="http://coderslikeus.files.wordpress.com/2009/08/screen-shot-2009-08-05-at-4-29-39-pm.png?w=655&h=489" alt="Screen shot 2009-08-05 at 4.29.39 PM" width="655" height="489" /></p>
<p>A number of you have requested some new features, and some of them have made it into this new release. You can now add and delete domains from within the tool. Also, clicking on results lets you copy the cell or row into the clipboard. This later feature can be really handy for putting item names into queries. So, check it out! Once you <a href="http://code.google.com/p/typica/">download</a> the jar, you run it by using this command;</p>
<p>java -jar QueryTool1.1.jar &lt;accessId&gt; &lt;secretKey&gt;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/coderslikeus.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/coderslikeus.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/coderslikeus.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/coderslikeus.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/coderslikeus.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/coderslikeus.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/coderslikeus.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/coderslikeus.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/coderslikeus.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/coderslikeus.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/coderslikeus.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/coderslikeus.wordpress.com/262/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/coderslikeus.wordpress.com/262/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/coderslikeus.wordpress.com/262/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=262&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://coderslike.us/2009/08/05/querytool-1-1-even-more-to-like/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd0b0382966354c72daa660969bca2cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dkavanagh</media:title>
		</media:content>

		<media:content url="http://coderslikeus.files.wordpress.com/2009/08/screen-shot-2009-08-05-at-4-29-39-pm.png" medium="image">
			<media:title type="html">Screen shot 2009-08-05 at 4.29.39 PM</media:title>
		</media:content>
	</item>
		<item>
		<title>Query Tool for Amazon SimpleDB</title>
		<link>http://coderslike.us/2009/04/15/query-tool-for-amazon-simpledb/</link>
		<comments>http://coderslike.us/2009/04/15/query-tool-for-amazon-simpledb/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 14:08:57 +0000</pubDate>
		<dc:creator>dkavanagh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[simpledb]]></category>
		<category><![CDATA[typica]]></category>

		<guid isPermaLink="false">http://coderslike.us/?p=159</guid>
		<description><![CDATA[Although these projects are never really finished, I can say I&#8217;ve completed version 1 of the Amazon SimpleDB Query Tool. This is built on top of a new SimpleDB API that will be part of an upcoming typica release. The code currently resides in a branch, but will hopefully get merges into trunk in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=159&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Although these projects are never really finished, I can say I&#8217;ve completed version 1 of the Amazon <a href="http://aws.amazon.com/simpledb/">SimpleDB</a> Query Tool. This is built on top of a new SimpleDB API that will be part of an upcoming <a href="http://code.google.com/p/typica/">typica</a> release. The code currently resides in a <a href="http://code.google.com/p/typica/source/browse/#svn/branches/newsdb">branch</a>, but will hopefully get merges into trunk in the next few weeks.</p>
<p>OK, more about the tool. It was built to provide a convenient way to test queries. That&#8217;s it. Towards that end, there is a list of features I included that really met a need for me.</p>
<ul>
<li>flexible query workspace (scratch pad)</li>
<li>run query on the line where the cursor is</li>
<li>allow domain selection via the UI</li>
<li>display domain metadata</li>
<li>show results from several queries at once</li>
<li>show box usage and other stats</li>
</ul>
<p>Now, the moment you&#8217;ve all been waiting for, a screenshot!</p>
<p><img class="alignnone size-full wp-image-160" title="querytool" src="http://coderslikeus.files.wordpress.com/2009/04/querytool.png?w=655&h=537" alt="querytool" width="655" height="537" /></p>
<p>Right now, the code is still in SVN, so if you&#8217;d like to run it, you&#8217;ll need to check out the branch and build it.  If you get that far, to run it, you can use this command, &#8220;ant test.main -Dclass=QueryTool -Dargs=&#8221;&lt;access id&gt; &lt;secret key&gt;&#8221;</p>
<p>For an official release, I&#8217;ll make an executable jar, so you&#8217;d run &#8220;java -jar QueryTool.jar &lt;access id&gt; &lt;secret key&gt;&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/coderslikeus.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/coderslikeus.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/coderslikeus.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/coderslikeus.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/coderslikeus.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/coderslikeus.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/coderslikeus.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/coderslikeus.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/coderslikeus.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/coderslikeus.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/coderslikeus.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/coderslikeus.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/coderslikeus.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/coderslikeus.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=coderslike.us&#038;blog=6290704&#038;post=159&#038;subd=coderslikeus&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://coderslike.us/2009/04/15/query-tool-for-amazon-simpledb/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bd0b0382966354c72daa660969bca2cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dkavanagh</media:title>
		</media:content>

		<media:content url="http://coderslikeus.files.wordpress.com/2009/04/querytool.png" medium="image">
			<media:title type="html">querytool</media:title>
		</media:content>
	</item>
	</channel>
</rss>
