O2-Czech-Republic / proxima-platform

The Proxima platform.
Apache License 2.0
18 stars 7 forks source link

JDBC storage #120

Open LesTR opened 4 years ago

LesTR commented 4 years ago

I would like to use jdbc database as storage in proxima. More specification TBD.

je-ik commented 4 years ago

Two options: a) map each row of SQL table to single attribute of entity b) map each column in row to attribute of entity

Both options seem to be valid use-cases, so we probably want long-term both of them. Option (b) can be a starting point, because proxima already has primitive types (int, long, string, bytes), which can be easily and automatically mapped onto table. Some primitive types might be needed to have complete types of SQL standard (e.g. dates).

JozoVilcek commented 4 years ago

How will the read path work for option b). For JDBC access, user code typically want key/row with selected columns/attributes, not individual "cells", which is I guess what proxima does as default. Or is there a change in 0.3.x?

je-ik commented 4 years ago

I think it should be quite straight forward - this is going to be batch type of storage, and in each batch read, observer must provide list of attributes to observe. These attributes will be mapped to SELECT <attributes> FROM table statement. The question is how to support joins with streaming data, that is probably something that would need additional support. But batch operations should work out of the box.