wazuh / wazuh-indexer

Wazuh indexer, the Wazuh search engine
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
6 stars 16 forks source link

[Proposal] Language for Plugins #230

Closed AlexRuiz7 closed 1 month ago

AlexRuiz7 commented 1 month ago

Description

We want to start developing plugins for wazuh-indexer (OpenSearch). We need to decide the programming language to use, as we can use any language compatible with the JVM.

OpenSearch has both, Java and Kotlin plugins. We asked them about which one is preferred, but it's up to the authors to decide.

It's worth mentioning that the @wazuh/devel-indexer team is not familiar with the development cycle for OpenSearch plugins, neither with Kotlin, and only a bit with Java. We understand that Kotlin is getting more and more market share, but Java is still one of the most used programming languages nowadays, being the most one used for the JVM. Using Kotlin would add a second factor to our learning curve on developing plugins for OpenSearch.

The goal of the issue is to elaborate a comparison between the languages, to better understand the implications on using one or the another. This comparison must help us decide one of them with proper arguments and justification.

Java

Kotlin

AlexRuiz7 commented 1 month ago

Code comparison

f-galland commented 1 month ago

Below is an in depth comparison between the two languages from the Kotlin team themselves:

Kotlin fixes a series of issues that Java suffers from:

What Java has that Kotlin does not:

What Kotlin has that Java does not:

Reference:

AlexRuiz7 commented 1 month ago

We are finally using Java as our main programming language for wazuh-indexer plugins, for the reasons listed below. We don't discard using Kotlin in the future.