We are migrating our Postgresql v10 (Linux) database to Azure and due to the timeframe involved would prefer not to change our current use of the npgsql driver in our apps.
Has anyone had any experience here? Can we utilize our use of that driver with very little or no changes to our code?
The one thing I'm aware of is that queries must use the shard column to help the Citus coordinator distribute to the right node. Anything else?
Thank you!
I have no personal experience with Citus, but as far as I know, Citus is supposed to be extremely compatible with PostgreSQL - definitely at the wire protocol level - and so general PostgreSQL drivers (like Npgsql) are supposed to work fine with it.
You may definitely need to change the way you're doing things at a higher level (e.g. sharding), but at the low-level database driver level Npgsql should be OK.
Related
I'm trying to use Apache Flink's Table concept in one of my projects to combine data from multiple sources in real-time. Unfortunately, all of my team members are Node.JS developers. So, I'm looking for possible ways to connect to Flink from NodeJS and query from it. In Flink's documentation for SQL Client, it's mentioned that
The SQL Client aims to provide an easy way of writing, debugging, and submitting table programs to a Flink cluster without a single line of Java or Scala code. The SQL Client CLI allows for retrieving and visualizing real-time results from the running distributed application on the command line.
Based on this, is there any way to connect to Flink's SQL client from NodeJS? Is there any driver already available for this like Node.JS drivers for MySQL or MSSQL. Otherwise, what are the possible ways of achieving this?
Any idea or clarity on achieving this would be greatly helpful and much appreciated.
There's currently not much that you can do. The SQL Client runs on local machines and connects to the cluster there. I think what will help you is the introduction of the Flink SQL Gateway, which is expected to be released with Flink 1.16. You can read more about that on https://cwiki.apache.org/confluence/display/FLINK/FLIP-91%3A+Support+SQL+Gateway
Another alternative is to check out some of the products that offer a FlinkSQL editor on the market, maybe that is useful path for your colleagues.
For example:
https://www.ververica.com/apache-flink-sql-on-ververica-platform
https://docs.cloudera.com/csa/1.7.0/ssb-overview/topics/csa-ssb-intro.html
Note that this is not exactly what you asked for, but could be an option to enable your team.
I need an embedded cassandra for my project and I was wondering if I can use Stubbed Cassandra for data storage. Because I need a system to simulate CQL requests and responses.
Thanks everyone.
You cant use it as a real datastore. Use real cassandra as a real cassandra datastore. check out ccm which is probably more what your looking for.
There are wrappers for it in dtests (python) and the java driver uses it for testing and has a java wrapper.
I don't really have any experience at all with SCassandra but I worked on several projects using Apache Cassandra and there are some use cases like multidatacenter infrastructure to experiment and I don't think SCassandra can do it. So if you plan to do simple tests, that's fine, But advanced use cases really need to be tested in a real cassandra distribution.
As others have mentioned, you will need the real Cassandra for data storage. However, if you want to test CQL requests/responses then you can use this library:
Cassandra-Spy
It runs an actual embedded Cassandra and also can simulate failures for inserts/selects. This helps you test your app's behaviour in failure cases. I wrote the library to address this specific use case.
I am new to Distributed databases and the initial roadblock am facing is to have a distributed transaction across heterogeneous databases where the control goes to Transaction Manager which is mostly the OS implementation (MSDTC in Windows).
How are generally Distributed Transactions implemented on Linux?
And if they are implemented which major databases have support for it? (MSSQL, MYSQL, POSTGRES, ORACLE, SYBASE)
I don't think there is any service like MSDTC in Linux. I expect you will need to use some 3rd party transaction manager. Or maybe you could try to port MSDTC to Linux on Mono (no idea how hard it is or if possible).
I'm not much familiar with transaction managers other than for Java.
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.
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.
I'm using Cassandra as the database and want to use Devise
Does Devise support Cassandra as the database? I looked around but did not find any information related to Devise-Cassandra on the wiki or anywhere else.
Is there third party plugins supporting it or other gem for authentication as devise?
Thank you
No, I have never heard of such thing.
Actually I suggest you keep your users in a more traditional database and use cassandra only for the most intensive I/O data.
Cassandra wasn't made to substitute other databases nor to be user with ORM (that's actually written in its official webpage)