Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Stooshie's Avatar
    Join Date
    Mar 2008
    Location
    Dundee, Scotland
    Posts
    378
    Thanks
    9
    Thanked 39 Times in 39 Posts

    Question PHP connecting to remote Cassandra nodes

    Hi there,

    Has anyone else tried to connect to a remote Cassandra Database? All the tutorials I can find are about installing Cassandra on the local machine on which Cassandra and php both sit.

    The Cassandra database is already up and running on a remote server on which I will create column families etc... The reason for connecting remotely is that the nodes will be spread geographically and cassandra will handle the synching. We will then convert our PHP services file from communicating with MySQL to then communicating with Cassandra once the conversion has taken place. I just can't seem to get php to connect remotely with Cassandra.

    Any advice greatly appreciated.

    Andrew.
    Regards, Stooshie
    O

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    I'm not familiar with a Cassandra database.
    It also appears that there is no library for the cassandra db built into PHP or through pecl, so you'll either need to construct your own drivers for use with the PDO, or use standard socket communication.
    Remote doesn't matter. So long as its exposed, you can give it the ip/name and port combinations to communicate with it when you establish a socket connection.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    Regular Coder Stooshie's Avatar
    Join Date
    Mar 2008
    Location
    Dundee, Scotland
    Posts
    378
    Thanks
    9
    Thanked 39 Times in 39 Posts
    Thanks Fou-Lu.
    Regards, Stooshie
    O


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •