danieldkim / cassandra-node-bridge Goto Github PK
View Code? Open in Web Editor NEWCassandra-Node Bridge provides a link between Apache Cassandra and Node.js. Access cassandra from Node.js through an asynchronous Javascript interface.
Cassandra-Node Bridge provides a link between Apache Cassandra and Node.js. Access cassandra from Node.js through an asynchronous Javascript interface.
Seems like cassandra_proxy.rb won't work with Thrift 0.5.0
sbos@pride-linux:~/tmp/cassandra-node-bridge$ ruby cassandra_proxy.rb
/var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/struct.rb:151:in field_accessor': undefined method
[]' for :name:Symbol (NoMethodError)
from ./lib/cassandra_types.rb:32
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from ./lib/cassandra.rb:8
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from cassandra_proxy.rb:4
I've set up and running cassandra_proxy.rb. After that I do the next things in node:
var sys = require("sys");
var cassandra = require("cassandra-node-client").create(10000, "localhost");
cassandra.get_uuids(function(x, y) {
sys.puts(sys.inspect(x));
sys.puts(sys.inspect(y));
});
This code outputs the next error:
sbos@pride-linux:~/tmp$ node test.js
{ message: 'uninitialized constant CassandraProxy::UUID\ncassandra_proxy.rb:549:in get_uuids\'\ncassandra_proxy.rb:549:in
times'\ncassandra_proxy.rb:549:in get_uuids\'\ncassandra_proxy.rb:500:in
send'\ncassandra_proxy.rb:500:in receive_data\'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:1005:in
call'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:1005:in spawn_threadpool\'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:1001:in
initialize'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:1001:in new\'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:1001:in
spawn_threadpool'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:993:in defer\'\ncassandra_proxy.rb:527:in
receive_data'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:195:in run_machine\'\n/usr/local/lib/site_ruby/1.8/eventmachine.rb:195:in
run'\ncassandra_proxy.rb:755'
, stack: [Getter/Setter]
}
undefined
Seems like cassandra_proxy.rb won't work with Thrift 0.5.0
sbos@pride-linux:~/tmp/cassandra-node-bridge$ ruby cassandra_proxy.rb
/var/lib/gems/1.8/gems/thrift-0.5.0/lib/thrift/struct.rb:151:in field_accessor': undefined method
[]' for :name:Symbol (NoMethodError)
from ./lib/cassandra_types.rb:32
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from ./lib/cassandra.rb:8
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
require'
from cassandra_proxy.rb:4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.