-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #433 from kmgowda/kmg-syncq-1
Add SyncQueue performance Benchmarking Signed-off-by: Keshava Munegowda <keshava.gowda@gmail.com>
- Loading branch information
Showing
12 changed files
with
14,591 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
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
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,61 @@ | ||
## | ||
# Copyright (c) KMG. All Rights Reserved. | ||
# | ||
# 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 | ||
## | ||
|
||
# Building Container | ||
FROM gradle:7.5.0-jdk17 as SbkGradleBuilder | ||
MAINTAINER Keshava Munegowda <keshava.gowda@gmail.com> | ||
USER root | ||
|
||
ENV APP_NAME=sbk | ||
ENV SBK_PROJECT=atomicq | ||
ENV APP_HOME=/opt/${APP_NAME} | ||
|
||
WORKDIR /opt/sbk | ||
|
||
COPY --chown=root:root gradle ${APP_HOME}/gradle | ||
COPY --chown=root:root build.gradle ${APP_HOME}/build.gradle | ||
COPY --chown=root:root build-drivers.gradle ${APP_HOME}/build-drivers.gradle | ||
COPY --chown=root:root gradle.properties ${APP_HOME}/gradle.properties | ||
COPY --chown=root:root settings.gradle ${APP_HOME}/settings.gradle | ||
COPY --chown=root:root settings-drivers.gradle ${APP_HOME}/settings-drivers.gradle | ||
COPY --chown=root:root gradlew ${APP_HOME}/gradlew | ||
COPY --chown=root:root checkstyle ${APP_HOME}/checkstyle | ||
COPY --chown=root:root perl ${APP_HOME}/perl | ||
COPY --chown=root:root sbk-api ${APP_HOME}/sbk-api | ||
COPY --chown=root:root sbk-yal ${APP_HOME}/sbk-yal | ||
COPY --chown=root:root sbm ${APP_HOME}/sbm | ||
COPY --chown=root:root sbk-gem ${APP_HOME}/sbk-gem | ||
COPY --chown=root:root sbk-gem-yal ${APP_HOME}/sbk-gem-yal | ||
|
||
RUN mkdir -p ${APP_HOME}/drivers | ||
|
||
# Copy the SBK storage drivers | ||
COPY --chown=root:root drivers/concurrentq ${APP_HOME}/drivers/concurrentq | ||
COPY --chown=root:root drivers/atomicq ${APP_HOME}/drivers/atomicq | ||
|
||
|
||
|
||
ENV GRADLE_USER_HOME=/opt/SBK | ||
RUN gradle :${SBK_PROJECT}:distTar --no-daemon --info --stacktrace | ||
|
||
# Runtime Container | ||
FROM openjdk:17-jdk-slim as SbkApp | ||
ENV APP_NAME=sbk | ||
ENV SBK_PROJECT=atomicq | ||
ENV APP_HOME=/opt/${APP_NAME} | ||
|
||
COPY --from=SbkGradleBuilder ${APP_HOME}/${SBK_PROJECT}/build/distributions/${APP_NAME}-*.tar /opt/${APP_NAME}.tar | ||
|
||
RUN tar -xvf /opt/${APP_NAME}.tar -C /opt/. | ||
RUN mv /opt/${APP_NAME}-* /opt/${APP_NAME} | ||
|
||
EXPOSE 9718 | ||
|
||
ENTRYPOINT ["/opt/sbk/bin/sbk-atomicq"] |
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,61 @@ | ||
## | ||
# Copyright (c) KMG. All Rights Reserved. | ||
# | ||
# 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 | ||
## | ||
|
||
# Building Container | ||
FROM gradle:7.5.0-jdk17 as SbkGradleBuilder | ||
MAINTAINER Keshava Munegowda <keshava.gowda@gmail.com> | ||
USER root | ||
|
||
ENV APP_NAME=sbk | ||
ENV SBK_PROJECT=syncq | ||
ENV APP_HOME=/opt/${APP_NAME} | ||
|
||
WORKDIR /opt/sbk | ||
|
||
COPY --chown=root:root gradle ${APP_HOME}/gradle | ||
COPY --chown=root:root build.gradle ${APP_HOME}/build.gradle | ||
COPY --chown=root:root build-drivers.gradle ${APP_HOME}/build-drivers.gradle | ||
COPY --chown=root:root gradle.properties ${APP_HOME}/gradle.properties | ||
COPY --chown=root:root settings.gradle ${APP_HOME}/settings.gradle | ||
COPY --chown=root:root settings-drivers.gradle ${APP_HOME}/settings-drivers.gradle | ||
COPY --chown=root:root gradlew ${APP_HOME}/gradlew | ||
COPY --chown=root:root checkstyle ${APP_HOME}/checkstyle | ||
COPY --chown=root:root perl ${APP_HOME}/perl | ||
COPY --chown=root:root sbk-api ${APP_HOME}/sbk-api | ||
COPY --chown=root:root sbk-yal ${APP_HOME}/sbk-yal | ||
COPY --chown=root:root sbm ${APP_HOME}/sbm | ||
COPY --chown=root:root sbk-gem ${APP_HOME}/sbk-gem | ||
COPY --chown=root:root sbk-gem-yal ${APP_HOME}/sbk-gem-yal | ||
|
||
RUN mkdir -p ${APP_HOME}/drivers | ||
|
||
# Copy the SBK storage drivers | ||
COPY --chown=root:root drivers/concurrentq ${APP_HOME}/drivers/concurrentq | ||
COPY --chown=root:root drivers/syncq ${APP_HOME}/drivers/syncq | ||
|
||
|
||
|
||
ENV GRADLE_USER_HOME=/opt/SBK | ||
RUN gradle :${SBK_PROJECT}:distTar --no-daemon --info --stacktrace | ||
|
||
# Runtime Container | ||
FROM openjdk:17-jdk-slim as SbkApp | ||
ENV APP_NAME=sbk | ||
ENV SBK_PROJECT=syncq | ||
ENV APP_HOME=/opt/${APP_NAME} | ||
|
||
COPY --from=SbkGradleBuilder ${APP_HOME}/${SBK_PROJECT}/build/distributions/${APP_NAME}-*.tar /opt/${APP_NAME}.tar | ||
|
||
RUN tar -xvf /opt/${APP_NAME}.tar -C /opt/. | ||
RUN mv /opt/${APP_NAME}-* /opt/${APP_NAME} | ||
|
||
EXPOSE 9718 | ||
|
||
ENTRYPOINT ["/opt/sbk/bin/sbk-syncq"] |
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,12 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
api project(":drivers:concurrentq") | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
drivers/syncq/src/main/java/io/sbk/driver/Syncq/Syncq.java
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,34 @@ | ||
/** | ||
* Copyright (c) KMG. All Rights Reserved.. | ||
* | ||
* 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 | ||
*/ | ||
package io.sbk.driver.Syncq; | ||
|
||
import io.perl.api.impl.SyncQueue; | ||
|
||
import io.sbk.driver.ConcurrentQ.ConcurrentQ; | ||
import io.sbk.params.ParameterOptions; | ||
import io.sbk.api.Storage; | ||
|
||
import java.io.IOException; | ||
|
||
|
||
/** | ||
* Class for Syncq storage driver. | ||
* | ||
* Incase if your data type in other than byte[] (Byte Array) | ||
* then change the datatype and getDataType. | ||
*/ | ||
public class Syncq extends ConcurrentQ implements Storage<byte[]> { | ||
|
||
@Override | ||
public void openStorage(final ParameterOptions params) throws IOException { | ||
this.queue = new SyncQueue<>(); | ||
} | ||
|
||
} |
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,9 @@ | ||
#Copyright (c) KMG. All Rights Reserved. | ||
# | ||
# 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 | ||
|
||
# Syncq storage driver default Properties/parameters |
Oops, something went wrong.