What is the best way to expose Cassandra REST API to web?

一笑奈何 提交于 2020-01-13 19:08:08

问题


I would like to work with Cassandra from javascript web app using REST API. REST should support basic commands working with DB - create table, select/add/update/remove items. Will be perfect to have something similar to odata protocol.

P.S. I'm looking for some library or component. Java is a most preferred.


回答1:


Staash solution looks perfect for the task - https://github.com/Netflix/staash




回答2:


You can use DataStax drivers. I used it via Scala but you can use Java, a Session object is a long-lived object and it should not be used in a request/response short-lived fashion but it's up to you.

ref. rules when using datastax drivers




回答3:


There is no "best" language for REST APIs, it depends on what you're comfortable using. Virtually all languages will be able to do this reasonable well, depending on your skill level.

The obvious choice is probably java, because cassandra's written in java, the java driver from Datastax is well supported, and because it's probably pretty easy to find some spring REST frameworks to do what you want. Second beyond that would be python - again, good driver support and REST frameworks with things like django or flask+potion. Ruby driver isn't bad, lots of ruby REST APIs out there, too.



来源:https://stackoverflow.com/questions/32321716/what-is-the-best-way-to-expose-cassandra-rest-api-to-web

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!