Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace custom internal structures with more standard/modern libraries #336

Open
1 of 10 tasks
cjbrooks12 opened this issue Dec 3, 2019 · 4 comments
Open
1 of 10 tasks

Comments

@cjbrooks12
Copy link
Contributor

cjbrooks12 commented Dec 3, 2019

There's a lot of functionality I built custom for Orchid, but I would like to start migrating some of that stuff to libraries that could do it better and reduce the maintenance burden of Orchid. There are also a handful of Java libraries that would be nice to migrate to pure-kotlin options that are better for this project. Below is a list of the current functionality that I would like to replace:

  • ASCII tables: Krow -> Picnic
  • Logging: Clog -> Timber
  • Event Bus: custom -> ??? (either find new library, or see if I can get similar functionality without an event bus at all)
  • CLI: A pretty hacky version of the common options -> kotlinx.cli
  • Options: Enable usage of delegates instead of annotations for creating options in Kotlin.
  • Bible verse API: Eden -> just implement the API calls directly within the OrchidBible plugin and drop the library entirely
  • DI: Guice -> Koin (currently blocked due to lack of multibindings. Switch is ideal for improvements to startup performance and simpler API)
  • Dev Server: NanoHTTPD + custom routing framework -> Ktor (also opens possibility of isomorphic deployment)
  • Validation API: Hibernate Validator -> ??? (is this even that useful? should we drop option validation entirely and just leave that up to the plugins when using those options?)
  • Mocking: Mockito -> Mockk
@thekalinga
Copy link

Event Bus

How about Project Reactor? You get eventing & stream composition. But the price of learning is steep tho.

@cjbrooks12
Copy link
Contributor Author

It's probably a bit overkill for a simple event bus, but I do think the core engine could do well to be made more reactive. I've used RxJava and Kotlin Coroutines a lot, but never Project Reactor; do you have any resources you'd recommend for learning more about it?

@thekalinga
Copy link

Agree, it can become an overkill

I learnt it from that is reactor documentation

https://projectreactor.io/learn

https://projectreactor.io/docs/core/release/reference/

Reactor & RxJava are more or less the same just that reactor is a bit more feature rich. Both of them collaborated on common code base. They are both implementations of reactive streams spec

@mikehearn
Copy link

You should check out PicoCLI. It's Java not Kotlin but is probably the nicest CLI library out there.

SnakeSVx added a commit to orchid-revival/Orchid that referenced this issue Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants