Skip to content

Instantly share code, notes, and snippets.

[
{
"bill@acmesoft.com":{
"passwordAge":4343100,
"Name":"Bill SysAdmin",
"Password":"f1f16683f3e0208131b46d37a79c8921"
}
},
{
"jill@acmesoft.com":{
{
"bill@acmesoft.com":{
"passwordAge":"\u0000BE<",
"Name":"Bill SysAdmin",
"Password":"f1f16683f3e0208131b46d37a79c8921"
}
}
{
"bill@acmesoft.com":{
"passwordAge":4343100,
"Name":"Bill SysAdmin",
"Password":"f1f16683f3e0208131b46d37a79c8921"
}
}
{"bill@acmesoft.com":{"passwordAge":4343100,"Name":"Bill SysAdmin","Password":"f1f16683f3e0208131b46d37a79c8921"}}
@johndemic
johndemic / gist:3841345
Created October 5, 2012 17:58
Deleting an Account with Mule and Cassandra
<flow name="AccountDelete" doc:name="AccountGet">
<http:inbound-endpoint
exchange-pattern="request-response"
host="localhost"
port="8081"
path="account/delete"/>
<cassandradb:remove config-ref="CassandraDB"
columnPath="Accounts:#[message.inboundProperties['http.relative.path'].split('/')[1]]"
rowKey="#[message.inboundProperties['http.relative.path'].split('/')[0]]" doc:name="Cassandradb"/>
<json:object-to-json-transformer />
@johndemic
johndemic / gist:3841314
Created October 5, 2012 17:53
Querying for Accounts by Row with Mule and Cassandra
<flow name="AccountList" doc:name="AccountsList">
<http:inbound-endpoint
exchange-pattern="request-response"
host="localhost" port="8081"
path="account/list"/>
<cassandradb:get-slice
config-ref="CassandraDB"
rowKey="#[message.inboundProperties['http.relative.path'].split('/')[0]]"
columnParent="Accounts" count="100">
<cassandradb:column-serializer
@johndemic
johndemic / gist:3841275
Created October 5, 2012 17:47
Querying for an Account with Mule and Cassandra using Explicit Column Serialization
<flow name="AccountGet" doc:name="AccountGet">
<http:inbound-endpoint
exchange-pattern="request-response"
host="localhost"
port="8081"
path="account/get" />
<cassandradb:get config-ref="CassandraDB"
columnPath="Accounts:#[message.inboundProperties['http.relative.path'].split('/')[1]]"
rowKey="#[message.inboundProperties['http.relative.path'].split('/')[0]]" doc:name="Cassandradb">
<cassandradb:column-serializers>
@johndemic
johndemic / gist:3841234
Created October 5, 2012 17:41
Querying for an Account with Mule and Cassandra
<flow name="AccountGet" doc:name="AccountGet">
<http:inbound-endpoint
exchange-pattern="request-response"
host="localhost"
port="8081"
path="account/get"
doc:name="HTTP"/>
<cassandradb:get config-ref="CassandraDB"
columnPath=
"Accounts:#[message.inboundProperties['http.relative.path'].split('/')[1]]"
@johndemic
johndemic / gist:3841135
Created October 5, 2012 17:22
Creating Accounts with Mule and Cassandra
<flow name="AccountCreate" doc:name="AccountsCreate">
<http:inbound-endpoint
exchange-pattern="request-response"
host="localhost"
port="8081"
path="account/create"
mimeType="application/json" />
<json:json-to-object-transformer
returnClass="java.util.Map"/>
<cassandradb:insert config-ref="CassandraDB" />
@johndemic
johndemic / gist:3841116
Created October 5, 2012 17:19
JSON Account Data
{
"Accounts":{
"engineering":{
"joe@acmesoft.com":{
"Name":"Joe Developer",
"Password":"286755fad04869ca523320acce0dc6a4",
"passwordAge": 731400
},
"jane@acmesoft.com":{
"Name":"Jane Developer",