inveniosoftware / domapping

Package generating elasticsearch mapping from jsonschemas
https://domapping.readthedocs.io
GNU General Public License v2.0
14 stars 8 forks source link

RFC Elasticsearch naming in the Invenio ecosystem #2

Closed tiborsimko closed 8 years ago

tiborsimko commented 9 years ago

It would be good to harmonise the naming of various Elasticsearch related packages, functions and variables inside the Invenio ecosystem.

A little reminder first:

We currently seem to be using all these terms:

The proposal is to standardise everything to one term used throughout the Invenio ecosystem. I'd vote for "Elasticsearch" which is (1) the official product name (unlike Elastic, which is the company's name), and (2) very unambiguous (unlike "ES"). This would give something like:

WDYT @jirikuncar @lnielsen @nharraud

P.S. Note that I don't particularly care about word length, the code editors are good at auto-completing...

nharraud commented 9 years ago

No problem for me. Just to be sure, this applies to the cli command too I suppose. Right now it is esjsonschema. Should I rename it to elasticsearch-jsonschema/jsonschema2elasticsearch or should I search for a shorter version to help people follow the 80 characters rule?

nharraud commented 8 years ago

@jirikuncar @lnielsen @tiborsimko So is it decided? Do I rename the project and CLI command as elasticsearch-jsonschemas? If so, I will do it as soon as #1 is merged. The patch is already long enough without adding this.

jirikuncar commented 8 years ago

Braindump:

tiborsimko commented 8 years ago

domapping

I like this one. It's short, and although the "Elastic" tune is not really expressed in the name, the "mapping" is clear enough once people know a little bit about general context. And the name evokes dojson they know extensively from the Invenio ecyosystem, and we can reuse the same naming technique in other contexts later if need be, keeping our horizons open. (dojson, domapping, dothis, dothat...)

elasicschema

I like this one too. A nice option if we'd go for expressing "Elastic" tune in the package name more explicitly.

(P.S. Note that whatever name we choose for this package, we still may want to synchronise about environment variables for this and other packages such as SEARCH_ELASTIC_HOSTS in search...)

nharraud commented 8 years ago

I like elasicschema too. Name of the company developing Elasticsearch + schema, and everybody knows that elasticsearch uses json so no need to specify it. We should just be careful as the name is already used on github: https://github.com/leandro/elastic-schema. But it's a small project with only one contributor and no recent activity it should be ok.

eson is used by 3 other projects on github. I'm not a very big fan of domapping as mapping is too generic as a word. It might conflict later with something else if we have another dependency using this terminology.

schemastic and eschema are nice and not used.

jirikuncar commented 8 years ago

My idea of usage was: domapping elastic (create|update|merge|diff|..) [ARGS]

nharraud commented 8 years ago

My idea of usage was: domapping elastic (create|update|merge|diff|..) [ARGS]

@jirikuncar Wouldn't people get the impression that this project can be used to generate other things, also called mapping, which are not elasticsearch mappings? Also the CLI has multiple commands: schema_to_mapping, mapping_to_jinja, jinja_to_mapping. It would make very long commands if we added elastic to each of them.

jirikuncar commented 8 years ago

Wouldn't people get the impression that this project can be used to generate other things

Good docs can solve this issue + we have doors open for generating other mappings ...

tiborsimko commented 8 years ago

(@nharraud FWIW even though I usually like very descriptive names, I'm not too much afraid of that kind of impression. E.g.dojson is similarly very generic name too -- yet for people using it in the Invenio context, the meaning becomes clear fast, I think people pick it up quickly in general.)

nharraud commented 8 years ago

@tiborsimko Yes but there is only one json, so it is not really an issue. mapping has no real meaning, elasticsearch could as well have called it model, table or anything else and it would have still made sense. Just by curiosity I searched the page of disambiguation of the word mapping: https://en.wikipedia.org/wiki/Mapping.

@jirikuncar not knowing what type of mapping these other things would be, if we try to support other formats I would rather call this schema2json. Then it would be clear that we allow any transformation from jsons-schema to json. After making them a little more generic, we could rename commands mapping_to_jinja and jinja_to_mapping as json_to_jinja and jina_to_json. However it might conflict with dojson prerogatives.

jirikuncar commented 8 years ago

Then it would be clear that we allow any transformation from jsons-schema to json.

Then we can just write a set of rules for dojson :wink:

nharraud commented 8 years ago

@jirikuncar Yep, if we want to make this generic it would make more sense. A jsons-chema is just a json file.

However I don't know when I will have the time to move the whole thing to dojson. If we need this fast I would first release this project and deprecate it later as we move the code to dojson.

lnielsen commented 8 years ago

I vote for domapping or elasticschema.

jirikuncar commented 8 years ago

Let's go for domapping so we are not blocking elastic* prefix.

nharraud commented 8 years ago

Ok for domapping. I'll rename it as soon as the PR is merged.

jirikuncar commented 8 years ago

@nharraud you should be able to do the renaming now.

natsheh commented 8 years ago

@jirikuncar I guess you meant @nharraud :)

jirikuncar commented 8 years ago

@natsheh thanks #ihateautocompletion