FroMage / redpipe

Redpipe Web Framework
Apache License 2.0
70 stars 10 forks source link

Make Server class more extensible #49

Open abner opened 5 years ago

abner commented 5 years ago

I would like to have the option to extend or enhance some aspects of the Server class. Like change the visibility of some methods to protected, like

private Single<JsonObject> loadConfig(JsonObject config) {
...

so i would merge with another ConfigRetriever strategies, like merge with environment variables.

Another change i propose is have a method to enhance VertxOptions, because when using Dropwizard Metrics, we can set a baseName to the metrics, but at this time DropwizarMetricsOptions does not pickup this from the configFile, so the only way is set it directly through the vertxOptions.metricsOptions object.

I will apply these changes to the Server class and i do have plans to submit this PR soon.

FroMage commented 5 years ago

Sounds good :)

abner commented 5 years ago

Sounds good :)

Another change i think i would like to add is the ability to turnoff session. Here i usually produce stateless servers, so i have no needs for session.

I would like to make two questions: Are you using redpipe in production? I just started to experiment with redpipe and i think it's a very good aproach, We have in our company Java developers with previous experience in JBoss and RestEasy. Second, i had issues when trying to package a example using redpipe-cdi when using gradle shadow plugin or maven-shade-plugin. With gradle i had issues with run task also (Weld couldn't load the beans from my project). I fixed the run task with a task which copy the resources from the src/main/resources to the ${buildDir}/classes/java/main. With ShadowJar plugin, i found problems with classLoaderExceptions running the generated jar. I just could create a functional jar using the gradle plugin capsule ---> apply plugin: "us.kirchmeier.capsule. Have you faced some of this issues also?

FroMage commented 5 years ago

Another change i think i would like to add is the ability to turnoff session. Here i usually produce stateless servers, so i have no needs for session.

That's also a nice option I'd accept a PR for.

Have you faced some of this issues also?

I haven't used redpipe with Gradle, so no, but I recall that using CDI 2 required some Maven dependency overrides that propagate to the user, as documented at http://redpipe.net/index.html#cdi