最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

cassandra - use ScyllaDB with PHP- Swoole - Stack Overflow

programmeradmin4浏览0评论

I am new to backend ,but I plan to have back end that can handle ~100k concurrent connections. I found that PHP-swoole is much faster than others , eg node-js. For database part, based on web search , NOSQL ScyllaDB is the fastest and can handle too many requests and data at same time.. .. this is the good part. Now , I have installed ScyllaDB into my Ubunto server, it works fine from command propmpt. But when need to call from remote devices, like mobile phones, I have to set backend server. I assume i have to install a driver frist, which should be Cassandra to enable PHP to connect with ScyllaDB. when I install , i get below error :

root@srv613969:/xxxxx sudo pecl install cassandra
pecl/cassandra requires PHP (version >= 5.6.0, version <= 7.1.99), installed version is 8.3.6
No valid packages found

I have PHP 8.3.which seems to be not supported by Cassandra.

Question : is my approach correct , are there any other alternatives , eg node-js , java,.. etc. which is better.

Thanks..

I am new to backend ,but I plan to have back end that can handle ~100k concurrent connections. I found that PHP-swoole is much faster than others , eg node-js. For database part, based on web search , NOSQL ScyllaDB is the fastest and can handle too many requests and data at same time.. .. this is the good part. Now , I have installed ScyllaDB into my Ubunto server, it works fine from command propmpt. But when need to call from remote devices, like mobile phones, I have to set backend server. I assume i have to install a driver frist, which should be Cassandra to enable PHP to connect with ScyllaDB. when I install , i get below error :

root@srv613969:/xxxxx sudo pecl install cassandra
pecl/cassandra requires PHP (version >= 5.6.0, version <= 7.1.99), installed version is 8.3.6
No valid packages found

I have PHP 8.3.which seems to be not supported by Cassandra.

Question : is my approach correct , are there any other alternatives , eg node-js , java,.. etc. which is better.

Thanks..

Share Improve this question asked Mar 17 at 12:54 waleed noseirwaleed noseir 671 silver badge8 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Unfortunately, the Cassandra PHP driver is no longer under active development, and hasn't had a PR merged in a few years.

So there are a few options here:

  • Revert your local PHP version back down to 7.1.x.

  • Build your data access layer using another language with a driver that is still actively developed: Java, Python, JS/TS/Node.js, etc.

  • Try Astra DB as your database, and then you can take advantage of Astra's Data API, which negates the need for a driver as you can interact with your data layer with restful calls.

Now, I'm a DataStax employee, so I'm going to be a little biased here. But if you don't want to downgrade your local PHP version, then making some simple restful API calls might be the easiest way to go. At least give Astra DB a look. It's free tier is pretty generous, and then you wouldn't have to run your own DB, either.

发布评论

评论列表(0)

  1. 暂无评论