0

I know about the Cassandra PHP driver being in BETA. But I strongly believe DataStax offers the best solutions as far as PHP drivers go for Cassandra.

What I would love to try is to see if it's possible to get cassandra data into my PHP application using CQLSH and PHP shell commando's. (both Cassandra and PHP script run on the same server. )

Anyone ever tried this? Would there be a method to get CQLSH return json or a different output instead of columns fit for my console?

Thanks for your insights.

Armand
  • 215
  • 1
  • 6
  • Small note (perhaps it's not that obvious) I wish to write an application in PHP. So don't recommend a different programming language ;-) – Armand Jul 27 '15 at 19:28

1 Answers1

2

cqlsh is built using the DataStax python driver. That being said, I would not recommend system calls to cqlsh using OS system calls from php. Not only is it impractical from a data format perspective, it is also hacky, I would not expect it to perform well, and it would be adding a lot of complexity and failure scenarios to your application.

For scalability, if you ever need to move your application to a different machine, you would not be able to. These are just a few of the downsides that I can think of from the top of my head.

You are better off using the beta PHP driver from DataStax or waiting for a stable version. RC1 is due to drop soon.

phact
  • 7,305
  • 23
  • 27