Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
anyflow committed Sep 11, 2016
2 parents 8576375 + c9e794f commit 82ae2a8
Show file tree
Hide file tree
Showing 88 changed files with 1,757 additions and 1,016 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
**/.settings
**/.classpath
**/.project
**/.pmd

#buildinfo
**/buildinfo.properties
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ language: java
script: mvn clean install
jdk:
- oraclejdk8
git:
depth: 500
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM anyflow/javaserver
MAINTAINER Park Hyunjeong <anyflow@gmail.com>

RUN mkdir /opt/lannister/
RUN mkdir /opt/lannister/logs
RUN touch /opt/lannister/logs/application.log
RUN touch /opt/lannister/logs/output.log

ADD server/target/*.jar /opt/lannister/
ADD server/target/bin/* /opt/lannister/bin/
ADD server/target/conf/* /opt/lannister/conf/
ADD server/target/lib/* /opt/lannister/lib/


RUN chmod 700 /opt/lannister/bin/startup.sh
RUN chmod 700 /opt/lannister/bin/shutdown.sh

RUN ln -s /opt/lannister/bin/startup.sh startup
RUN ln -s /opt/lannister/bin/shutdown.sh shutdown
RUN ln -s /opt/lannister/logs/application.log application.log
RUN ln -s /opt/lannister/logs/output.log output.log

EXPOSE 1883
EXPOSE 8883
EXPOSE 9001
EXPOSE 9002
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ High performance MQTT broker w/ full specifications support, Clustering, WebSock
3. Clustering
* Topic / Message / Message Status / Session redundant
* No SPOF(peer-to-peer based : No master and slave)
* Easy Scaling out
* Easy Scaling out
4. WebSocket
5. SSL (TCP / WebSocket both)
6. $SYS
Expand All @@ -38,17 +38,31 @@ Lannister is **under CONSTRUCTION**. But the most of features above are implemen
# Clone lannister source
git clone https://github.com/anyflow/lannister.git
# Change directory to lannister
cd lannister
# Build all(interface, server, plugin-example) projects
mvn install
# Change directory to lannister server
cd server
# Run lannister server directed by lannister.cfg/log4j.xml files in conf directory
mvn exec:java
# Run lannister server directed by lannister.cfg/hazelcast.config.xml/log4j.xml files in conf directory
mvn exec:java -pl server
```
## Version History
##### version 0.9.5.1 / Sep 11, 2016
- Externalize Hazelcast config - Add hazelcast.config.xml
- Add docker file and docker property - Run maven with profile (mvn install -Plannister.docker)
- Add null checker in hazelcast serialization logics
- Change WebSocket(ssl) ports to 9001(9002)
- Update Hazelcast version to 3.7.1
- Update Netty version to 4.1.5
- Add PMD / Findbugs / Jacoco / surefire reports
- Start clustering TEST/FIX
- Fix subscription failing on existing topic in clustered state
- Fix subscriptions remaining on disposing (clean) session
- Fix reconnect failing persisted session
- Fix remaining no subscriber topic

##### version 0.9.5.0 / May 21, 2016
- Code Review, Test based on chapter 3.2 of Spec v3.1.1 Mandatory normative statements
- Add $SYS Required Topics
Expand All @@ -66,4 +80,4 @@ mvn exec:java
Park Hyunjeong / <anyflow@gmail.com>

## License
Lannister is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0).
Lannister is released under version 2.0 of the [Apache License](http://www.apache.org/licenses/LICENSE-2.0).
2 changes: 1 addition & 1 deletion interface/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>net.anyflow</groupId>
<artifactId>lannister</artifactId>
<version>0.9.5.0-SNAPSHOT</version>
<version>0.9.5.1-SNAPSHOT</version>
</parent>
<packaging>jar</packaging>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

package net.anyflow.lannister.plugin;

public interface Plugin {
public interface Plugin extends Cloneable {
Plugin clone();
}
4 changes: 3 additions & 1 deletion plugin-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
<parent>
<groupId>net.anyflow</groupId>
<artifactId>lannister</artifactId>
<version>0.9.5.0-SNAPSHOT</version>
<version>0.9.5.1-SNAPSHOT</version>
</parent>

<artifactId>lannister-plugin-example</artifactId>
<name>lannister plugin example</name>

<packaging>jar</packaging>

<repositories>
Expand Down
70 changes: 65 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>net.anyflow</groupId>
<artifactId>lannister</artifactId>
<version>0.9.5.0-SNAPSHOT</version>
<version>0.9.5.1-SNAPSHOT</version>
<name>lannister</name>
<description>MQTT broker with full spec support and Clustering/WebSocket/SSL based on Java - Netty/Hazelcast</description>
<packaging>pom</packaging>
Expand Down Expand Up @@ -38,9 +38,8 @@


<profiles>
<!-- Just for fixing compile time error on pom.xml -->
<profile>
<id>dummy.profile</id>
<id>lannister.local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
Expand All @@ -49,6 +48,13 @@
<github.global.server>github</github.global.server>
</properties>
</profile>
<profile>
<id>lannister.docker</id>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<github.global.server>github</github.global.server>
</properties>
</profile>
</profiles>

<dependencies>
Expand Down Expand Up @@ -79,7 +85,7 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.1.0.CR7</version>
<version>4.1.5.Final</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -131,7 +137,7 @@
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.1.7</version>
<version>2.2.1</version>
<executions>
<execution>
<goals>
Expand All @@ -140,6 +146,7 @@
</execution>
</executions>
<configuration>
<failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
Expand All @@ -160,6 +167,59 @@
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.6</version>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.3</version>
<configuration>
<xmlOutput>true</xmlOutput>
<xmlOutputDirectory>target/site</xmlOutputDirectory>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
</project>
43 changes: 37 additions & 6 deletions server/pom.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>lannister-server</artifactId>
<name>lannister server</name>

<parent>
<groupId>net.anyflow</groupId>
<artifactId>lannister</artifactId>
<version>0.9.5.0-SNAPSHOT</version>
<version>0.9.5.1-SNAPSHOT</version>
</parent>

<profiles>
<profile>
<id>lannister.local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<env>local</env>
<lannister.home>${project.build.directory}</lannister.home>
<log.path>${project.build.directory}/logs</log.path>
</properties>
</profile>

<profile>
<id>lannister.docker</id>
<properties>
<env>docker</env>
</properties>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>net.anyflow</groupId>
Expand All @@ -19,7 +42,7 @@
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
<version>3.6.2</version>
<version>3.7.1</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -53,13 +76,13 @@
<artifactId>jackson-dataformat-smile</artifactId>
<version>2.7.4</version>
</dependency>
<!-- for menton -->
<!-- for lannister.web -->
<dependency>
<groupId>net.sf.jtidy</groupId>
<artifactId>jtidy</artifactId>
<version>r938</version>
</dependency>
<!-- for menton -->
<!-- for lannister.web -->
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
Expand All @@ -69,14 +92,20 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>1.1.33.Fork15</version>
<version>1.1.33.Fork22</version>
</dependency>

<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.19.0-GA</version>
</dependency>

<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>2.2.0</version>
</dependency>
</dependencies>

<build>
Expand All @@ -91,6 +120,7 @@
<targetPath>../conf/</targetPath>
<includes>
<include>lannister.cfg</include>
<include>hazelcast.config.xml</include>
<include>log4j.xml</include>
</includes>
</resource>
Expand All @@ -112,6 +142,7 @@
<directory>src/test/resources</directory>
<includes>
<include>lannister.cfg</include>
<include>hazelcast.config.xml</include>
<include>log4j.xml</include>
</includes>
</testResource>
Expand Down
17 changes: 17 additions & 0 deletions server/src/main/filters/docker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
log.level=DEBUG

lannister.home=/opt/lannister
log.path=/opt/lannister/logs

hazelcast.port=5701
hazelcast.port-count=1

hazelcast.multicast.enabled=false
hazelcast.multicast-group=224.2.2.3
hazelcast.multicast-port=54327

hazelcast.tcp-ip.enabled=true
hazelcast.member1=172.20.0.2
hazelcast.member2=172.20.0.3

project.build.startOption=
14 changes: 12 additions & 2 deletions server/src/main/filters/local.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
log.level=DEBUG

project.build.startOption=
#log.path=/Users/anyflow/SourceCodes/lannister/logs
hazelcast.port=5701
hazelcast.port-count=1

hazelcast.multicast.enabled=true
hazelcast.multicast-group=224.2.2.3
hazelcast.multicast-port=54327

hazelcast.tcp-ip.enabled=false
hazelcast.member1=127.0.0.1
hazelcast.member2=127.0.0.1

project.build.startOption=
Loading

0 comments on commit 82ae2a8

Please sign in to comment.