-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a49de54
Showing
119 changed files
with
5,357 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Compiled source # | ||
################### | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.o | ||
*.so | ||
|
||
# Packages # | ||
############ | ||
# it's better to unpack these files and commit the raw source | ||
# git has its own built in compression methods | ||
*.7z | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
|
||
# Logs and databases # | ||
###################### | ||
*.log | ||
|
||
# OS generated files # | ||
###################### | ||
.DS_Store* | ||
ehthumbs.db | ||
Icon? | ||
Thumbs.db | ||
|
||
# Editor Files # | ||
################ | ||
*~ | ||
*.swp | ||
|
||
# Gradle Files # | ||
################ | ||
.gradle | ||
.ivy2 | ||
.ivy2.cache | ||
.m2 | ||
|
||
# Build output directies | ||
/target | ||
*/target | ||
/build | ||
*/build | ||
|
||
# IntelliJ specific files/directories | ||
out | ||
.idea | ||
*.ipr | ||
*.iws | ||
*.iml | ||
atlassian-ide-plugin.xml | ||
|
||
# Eclipse specific files/directories | ||
.classpath | ||
.project | ||
.settings | ||
.metadata | ||
|
||
# NetBeans specific files/directories | ||
.nbattrs | ||
**/bin/* | ||
|
||
#.gitignore in subdirectory | ||
.gitignore | ||
|
||
### infer ### | ||
# infer- http://fbinfer.com/ | ||
infer-out | ||
*/infer-out | ||
.inferConfig | ||
*/.inferConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# jauntsdn.com / RSocket-JVM | ||
|
||
[RSocket](https://jauntsdn.com/post/rsocket-summary/) is low latency/high throughput L5 network protocol, | ||
intended for high-performance services communication. It is transport agnostic, and runs on top | ||
of any reliable byte stream transport. | ||
|
||
This repository hosts API part of RSocket-JVM - suite of libraries for fast interprocess/network communication using major | ||
Reactive Streams impls. | ||
|
||
RSocket-JVM includes RSocket-RPC: remote procedure call system on top of Protocol Buffers. | ||
|
||
### Motivation / Purpose | ||
|
||
RSocket-JVM is [very fast](https://jauntsdn.com/post/rsocket-vs-spring/) alternative to | ||
projectreactor-only RSocket/RSocket-java from "Reactive Foundation" - | ||
which is plagued by number of performance and security [problems](https://jauntsdn.com/post/rsocket-million-streams-2/). | ||
|
||
**Multiple vendor libraries**. [Shared protocol core](https://jauntsdn.com/post/rsocket-jvm/) with minimal dependencies | ||
(netty-buffer only) streamlined development process for each next vendor library. | ||
|
||
**Shared transports**. Message byte transports are based on `rsocket-messages` and netty only | ||
so are usable by each vendor library. Transports are considered part of RSocket-JVM runtime. | ||
|
||
**Non-intrusive**. API & runtime are clearly split so from end-user perspective there is | ||
only defined set of basic interactions on buffers/messages: | ||
```groovy | ||
Publisher<Message> requestResponse(Message message); | ||
Publisher<Message> requestStream(Message message); | ||
Publisher<Message> requestChannel(Publisher<Message> messages); | ||
Publisher<Void> fireAndForget(Message message); | ||
``` | ||
### Project-reactor, rxjava, helidon | ||
|
||
RSocket-JVM is currently comprised of RSocket-rxjava (rxjava3), RSocket-reactor (project-reactor), and RSocket-helidon (helidon-commons-reactive). | ||
|
||
### RSocket-RPC | ||
|
||
[RSocket-RPC](https://jauntsdn.com/post/rsocket-grpc/) is reflection-free, codegen based remote procedure call system | ||
relying on single data format - protocol buffers. This combination opened many optimization opportunities and enabled | ||
GRPC interop via respective GRPC transport. | ||
|
||
Each vendor library has RSocket-RPC API module accompanied by compiler binary. | ||
|
||
### Examples | ||
|
||
[RSocket-jvm-interop-demo](). | ||
|
||
## Build | ||
|
||
Building `jauntsdn/RSocket-jvm` requires java11 for helidon, and java8 for rxjava/reactor. | ||
``` | ||
./gradlew | ||
``` | ||
|
||
Building & installing artifacts into local maven repository | ||
``` | ||
./gradlew clean build publishToMavenLocal | ||
``` | ||
|
||
## Binaries | ||
|
||
Binary releases are published on Maven Central for reactor, rxjava & helidon libraries. | ||
|
||
```groovy | ||
repositories { | ||
mavenCentral() | ||
} | ||
dependencies { | ||
implementation "com.jauntsdn.rsocket:rsocket-messages:1.0.0" | ||
implementation "com.jauntsdn.rsocket:rsocket-rpc-idl:1.0.0" | ||
implementation "com.jauntsdn.rsocket:rsocket-<VENDOR>:1.0.0" | ||
implementation "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>:1.0.0" | ||
} | ||
``` | ||
|
||
RSocket-RPC compiler binaries are for linux only | ||
```groovy | ||
protobuf { | ||
plugins { | ||
rsocketRpc { | ||
artifact = "com.jauntsdn.rsocket:rsocket-rpc-<VENDOR>-compiler:1.0.0" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## LICENSE | ||
|
||
Copyright 2020-Present Maksym Ostroverkhov. | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/* | ||
* Copyright 2020 - present Maksym Ostroverkhov. | ||
*/ | ||
|
||
plugins { | ||
id "io.spring.dependency-management" apply false | ||
id "com.google.protobuf" apply false | ||
id "com.github.sherter.google-java-format" apply false | ||
id "com.palantir.git-version" | ||
id "com.github.ben-manes.versions" | ||
} | ||
|
||
description = "RSocket-jvm api libraries: parent" | ||
|
||
apply from: "gradle/dependency-management.gradle" | ||
apply from: "gradle/publishing.gradle" | ||
|
||
allprojects { | ||
dependencyLocking { | ||
lockAllConfigurations() | ||
} | ||
} | ||
|
||
subprojects { | ||
apply plugin: "com.github.sherter.google-java-format" | ||
|
||
version = projectVersion(project) | ||
|
||
println "Building module ${project.name}:${version}" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
def javaVersion = project.name.endsWith("helidon") ? 11 : 1.8 | ||
|
||
plugins.withType(JavaLibraryPlugin) { | ||
compileJava { | ||
sourceCompatibility = javaVersion | ||
targetCompatibility = javaVersion | ||
|
||
options.compilerArgs << "-XDignore.symbol.file" | ||
dependsOn "googleJavaFormat" | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
classifier "sources" | ||
from sourceSets.main.allJava | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier "javadoc" | ||
from javadoc.destinationDir | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
archives javadocJar | ||
} | ||
|
||
if (version.endsWith("SNAPSHOT")) { | ||
tasks.withType(Javadoc).all { enabled = false } | ||
} else { | ||
javadoc { | ||
options.with { | ||
links jdkJavaDoc() | ||
links "https://netty.io/4.1/api/" | ||
|
||
addStringOption("Xdoclint:none", "-quiet") | ||
} | ||
} | ||
} | ||
} | ||
|
||
googleJavaFormat { | ||
toolVersion = "1.6" | ||
exclude "**/generated" | ||
} | ||
} | ||
|
||
task printProjectVersion { | ||
doLast { | ||
println "Project version: ${projectVersion(project)}" | ||
} | ||
} | ||
|
||
task updates { | ||
doLast { | ||
dependencyUpdates | ||
} | ||
} | ||
|
||
def jdkJavaDoc() { | ||
def version = JavaVersion.current() | ||
def majorVersion = version.majorVersion | ||
if (version.isJava11Compatible()) { | ||
return "https://docs.oracle.com/en/java/javase/$majorVersion/docs/api/" | ||
} else { | ||
return "https://docs.oracle.com/javase/$majorVersion/docs/api/" | ||
} | ||
} | ||
|
||
def projectVersion(project) { | ||
def versionSuffix = "" | ||
def gitBranchName = versionDetails().branchName | ||
def branchName = gitBranchName ?: project.findProperty("branch") | ||
if (branchName != null) { | ||
if (branchName == "develop") { | ||
versionSuffix = "-SNAPSHOT" | ||
} else if (branchName.startsWith("feature")) { | ||
versionSuffix = "-${branchName.replace("/", "-")}-SNAPSHOT" | ||
} | ||
} | ||
return project.version + versionSuffix | ||
} | ||
|
||
defaultTasks "goJF", "clean", "build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
group=com.jauntsdn.rsocket | ||
version=1.0.0 | ||
|
||
dependencyManagementPluginVersion=1.0.11.RELEASE | ||
protobufPluginVersion=0.8.17 | ||
googleJavaFormatPluginVersion=0.9 | ||
gitPluginVersion=0.12.3 | ||
versionsPluginVersion=0.39.0 | ||
|
||
nettyBomVersion=4.1.69.Final | ||
reactorBomVersion=Dysprosium-SR22 | ||
rxjavaVersion=3.1.2 | ||
helidonCommonReactiveVersion=2.3.4 | ||
jsr305Version=3.0.2 | ||
javaxInjectVersion=1 | ||
javaxAnnotationVersion=1.3.2 | ||
protobufVersion=3.19.0 | ||
|
||
org.gradle.parallel=true | ||
org.gradle.configureondemand=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright 2020 - present Maksym Ostroverkhov. | ||
*/ | ||
|
||
ext.removeDependencyScope = { pom -> | ||
pom.withXml { | ||
asNode().dependencyManagement.first().dependencies.first().each { | ||
dep -> | ||
def scope = dep.scope | ||
scope.each { | ||
if (it.value().first() != "import") { | ||
dep.remove(scope.first()) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
ext.managedDependencyModules = { parent -> | ||
parent.subprojects | ||
.findAll { !it.name.endsWith("bom")} | ||
.sort { "$it.name" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright 2021 - present Maksym Ostroverkhov. | ||
*/ | ||
|
||
subprojects { | ||
apply plugin: "io.spring.dependency-management" | ||
|
||
dependencyManagement { | ||
imports { | ||
mavenBom "io.netty:netty-bom:${nettyBomVersion}" | ||
mavenBom "io.projectreactor:reactor-bom:${reactorBomVersion}" | ||
} | ||
|
||
dependencies { | ||
dependency "io.reactivex.rxjava3:rxjava:${rxjavaVersion}" | ||
dependency "io.helidon.common:helidon-common-reactive:${helidonCommonReactiveVersion}" | ||
dependency "javax.inject:javax.inject:${javaxInjectVersion}" | ||
dependency "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}" | ||
dependency "com.google.code.findbugs:jsr305:${jsr305Version}" | ||
} | ||
generatedPomCustomization { | ||
enabled = false | ||
} | ||
} | ||
} |
Oops, something went wrong.