eclipse / jnosql

Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.
Other
231 stars 72 forks source link

Blob/object storage API? #171

Closed salesportal closed 1 year ago

salesportal commented 5 years ago

Hobby salesportal guy again

I am also utilising S3/local file system for test with a thin abstraction to store ad fields (as XML files) and photos. Thus it uses only S3 and Elasticsearch, no need for other document store. Object store for this is very cheap and "good enough".

This could be yet another NoSQL technology that could be standardised. In its simplest form acts much like a filesystem (My abstaction interface is named IFileSystem) however there are some additional stuffs.

Optimistic concurrency would be highly useful here as a lot of use cases where there are

Think of sales or ad portal, I can store ad text/fields and thumbnails as a zipped file cheaply (to get above S3 100kb per cost minimum, otherwise one pays 100kb cost for 5kb image) and then also store the fields in Elasticsarch for viewing so in gallery view, info is retrieved from document store for speed.

otaviojava commented 5 years ago

Hello, thank you for the feedback. We already started that discussion on the last version.

https://github.com/eclipse/jnosql-diana-driver/issues/119 https://github.com/eclipse/jnosql-diana-driver/pull/120/

Could you tell us what do you think about it? This interface is already in the version 0.0.9:

https://mvnrepository.com/artifact/org.jnosql.diana/diana-driver-commons/0.0.9

salesportal commented 5 years ago

Hi,

That might work, eg. one sees the queryable metadata of S3/Blob Storage as a document with document API and perhaps even simple select queries (S3 has those I guess) and the binary object is seen as an attachment to that document. So S3/Blob Storage as simple document DBs really.

However perhaps not all such blob storage services support querying metadata (eg google one https://cloud.google.com/storage/docs/how-to ?) So then should one have an abstraction that is more filesystem like too? Such an API one could even use Dropbox as storage or a network filesystem or whatever.

My thinking is if app use case only needs to view it as file system, it can inject such a simple interface, if needs metadata it can inject interface to see it as a simple document store but that will narrow the number of available implementations.

Tradeoff against avoiding too many similar APIs though, blob stores are however sort of separate since they have the ability to have paths for the data and list items by path, which is something probably not in document DBs by default (though can be simulated by a path field on each document).

otaviojava commented 1 year ago

It has support; please, let me know if it works for you.