28 karma · joined November 3, 2011
I was part of a similar attempt - building a better "SQL" and relational DB. This was roughly 8 years a go. You can have a look at our GitHub Projects or look at some further links and may be you get inspired :)
* http://bandilab.github.io/ - introduction to the bandicoot project
* https://www.infoq.com/presentations/Bandicoot/ - presentation of the Bandicoot language on
* https://github.com/ostap/comp - another interesting attempt, a query language based on a list comprehension
I bought the TUXEDO Infinity Book - 13" Full HD screen, 16GB RAM, Intel Core i7-6500U, 1.4 kg only. It works ok, I'm using Suse Linux + Cinnamon Desktop Env. There are two things I'd improve on the laptop: the touchpad could be of a better quality, the Intel Dual AC 3160 wlan does not have the best reception (may be a problem with the antenna?).
Otherwise, we should punish you with a speeding ticket, because you will sometime in the future with some probability exceed a speed limit. Would that be ok for you?
* use as many constraints as possible (this helps the query optimizer)
* use indexes which bring better performance in your use case (e.g. bitmap join index or even index-organized tables)
* apply table/index partitioning
* use materialized views as a query result cache
:)
It has two modes: 1) as a commnad line
./comp -f commits.json,authors.txt '[ i.commits | i <- commits, a <- author, i.commits.author.name == a ]'
2) as a service to allow querying of the files through simple http interface
./comp -f commits.json,authors.tx -l :9090
curl -d '{"expr": "[ i.commits | i <- commits, a <- author, i.commits.author.name == a ]"}' http://localhost:9090/full
or through an interactive console on http://localhost:9090/console
disclosure: I'm a co-author, and happy to get a feedback or answer any questions :)
It's focusing on bandicoot language, but concepts are taken from the relational algebra. It should match the logic of SQL.
Suddenly there is a solution to distributed always consistent real time fully scalable reliable easy to use inexpensive database :)
Do you know this saying? "Nobody can give so much as I can promise you."
What is the benefit here? As an application developer I need to restart the transaction and hope it's not going to fail again - hence I'm serializing the execution on my own...
On top of all this, when it comes to constraints in relational model they can be complex and the probability of failing transactions is just going to grow. I can see this working only if I start relaxing on my constraints and redirecting transactions in such a way that conflicting transactions are coming to the database already serialized.
What about restarting transactions within NuoDB transparently as soon as an update conflict has occurred?
re 1) and 2). I think they are related. The serialization can be done on account level. There is no need to have a single global write lock. This also implies that if the bank account transfers are typicaly to different accounts the serialization will be as often as the aborts. Hence very rare and the system will perform equally good in both cases. However, the serialization does not require further retries and doesn't force the application programmers to workaround the problems.
If I have two transactions and one of them is aborted because of the changes done by the other transaction what am I as a developer supposed to do? Retry? I hope not, because a retry is in other words serializing the execution. One after another.
So, if I have a system with a lot of concurrency (i.e. bank accounts and transfers) I'd better not use NuoDB because I'd get a lot of transfers aborted, not good. If I have a system with a very little write conflicts I'd go for serializability because that gives 100% consistency and will be fast anyway due to very little conflicts.
From the wikipedia link you posted, it is fairly clear that the Snapshot isolation is good when you don't need consistency. For that you'd have to either abort every time there is a conflict or introduce write-write conflict (ie. serializing).
update COUNTER set VAL = VAL + 1
Let's assume the initial state is one entry with VAL = 0. If I run the update statement in two concurrent transactions I'd expect the result to be 2 when both transactions complete. However, I don't understand how that can be achieved without serializing those transactions.
Anyway, let's go back to nuodb :) I'm really interested on how it manages the whole ACID. I did not get it from the page nor from your reply.
For simplicity, let's pick on durability only. The archive nodes listen to replication and store serialized atoms on disk. At the same time the atoms replicate the changes to other instances. Is the durability achieved by a synchronous replication?
http://bandilab.org/blog/2011-06-22.Ostap.Running_on_Multipl...
or maybe I just don't have enough information about the nuodb ?
Let me give you an example.
select vendor, model, avg(price) as price from allCars group by vendor, model;
So far, this is simple and clear. Now let's imagine someone has a requirement to calculate this for different set of cars:
select vendor, model, avg(price) as price from allCars where vendor = 'BMW' group by vendor, model;
or
select vendor, model, avg(price) as price from allCars where year > 1990 group by vendor, model;
This approach only works if I'm always selecting from the same table - allCars, and I know all the condition in advance. To reuse the actual code which calculates the average prices (select ... group by) I'd need something like this:
select vendor, model, avg(price) as price from $cars -- $cars is a variable with at least three attributes (vendor, model, price) group by vendor, model;
This way I could write my own relational operator which calculates avg prices of cars per vendor and a model no matter where the cars are coming from.
Does anyone else have the same problem as me or am I just not smart enough to figure out how to do it in SQL?