Cloud Service

Cloud Service

You can easily write software that uses Citrusleaf’s services to host your data. With Citrusleaf, you can either run our software within the cloud provider of your choice, or you can attach to our multitenant hosted service and leave the management to us.

Citrusleaf excells when used for rapid building and prototyping of service which require intense personalization. When every behavior must be recorded, and each page has computation to display a rich and personalize content experience, Citrusleaf provides the data muscle. By coding your logic in a rapid development language like Python or Ruby and leaving the data storage to us, you avoid optimizing your database and data layout too early.

While providing rapid prototyping, Citrusleaf operates at Internet scale. Through its elasticity and scalability, when your prototype turns into a great product, you'll know your database won't block your success.

Our product is undergoing rapid development right now. Our wiki is a great place to learn about our rapidly evolving features.

Using Citrusleaf as a service is as simple as downloading our clients, reading up on our architecture, and giving our examples a try.

When you integrate our client into your application, you'll simply configure those clients to access the servers we manage at Amazon Web Service, Rackspace, and in our own data center. As our service is currently experimental, we bring clusters down from time. If you can't contact a listed data center, please contact us

The host names for each are:

Datacenter Hostname
Rackspace rackspace.citrusleaf.net
Amazon EC2 West aws.citrusleaf.net
Citrusleaf US West us-west.citrusleaf.net


Python Example

Our wiki contains the full documentation of our Python client, but here's a quick example of what a Citrusleaf client in Python looks like.

The example uses a single column in a namespace. The example stores a value associated with a key and subsequently retrieve it. The client is pure Python, and runs in any 2.5 or 2.6 Python interpreter.

When you download our Python client, you'll get the full, runnable example as well as other example code. This fragment uses a single column in a namespace, and simply stores and retrieves the data. The client is pure Python, and runs in any 2.5 or 2.6 Python interpreter.

	import citrusleaf
	
	# the example starts here
	# Let's make a key and a value
	key = "0000000000"		
	value = ""
	for i in xrange(10):
		value = value + key
	
	# then create our shared cluster object
	# and set the host
	cluster = citrusleaf.CitrusleafCluster()
	cluster.addHost(arg_host, arg_port)
	
	# Let's put the value in the test namespace
	retCode = citrusleaf.put(cluster, "test", "pyexample", key, dict( {"columnname": value} ), )
	
	print "put result was ",retCode
	
	retcode, generation, value = citrusleaf.get(cluster, "test", "pyexample", key, "value")
	
	print "get result was: ",value
  

Ruby Example

Our wiki contains the full documentation of our Ruby client, but here's a quick example of what a Citrusleaf client in Ruiby looks like

The Citrusleaf Ruby client is implemented using a thin layer over the Citrusleaf C client. In this way, Ruby gains the efficiency of the C client with minimal engineering. However, the C client is built only for Linux with GCC support. Since we make available the client source, you are welcome to port the C client to your own environment. OS X and BSD should be painless.

The example uses a single column in a namespace. The example stores a value associated with a key and subsequently retrieve it. The Ruby client is cool because it auto-marshalls complex types, and auto-detects whether the set parameters are single values, arrays, or dictionaries.

When you download our Ruby client, you'll get the full, runnable example as well as other example code.

require "Citrusleaf"

puts "connect to cluster!"
c.add_node("aws.citrusleaf.net", 3000);
puts "connected !"

# create a complicated data structure
s = Set.new();
(1..6).each { |x| s.add(x) }
s.add("brian");
s.add("bulkowski");
s.add(4.23);

c.delete("test", "mytable", "mykey");
c.put("test", "mytable" "mykey", "mycolumn", s);

rv, gen, set2 = c.get("test", "mytable", "mykey", "mycolumn");
if rv != 0
   puts "problem fetching marshalled data rv #{rv}"
   Process.exit
end

  

Back to top