Skip to content

Commit

Permalink
Openshift scalability experiment 2 (#528)
Browse files Browse the repository at this point in the history
* Updated to have support for multiple approaches to running executors:
 - Embedded MDB (executor and API in the Java EE container - Using a local storage path for everything)
 - External MDB
	- Pluggable to serialize data via A-MQ large messages
	- Also supports shared storage via a system property
 - Consolidated the code into an executor Forge Add-on, and also switched to JSON serialization (instead of Java serialization)

* Fixed comments and cleaned up some duplicated code

* Fixed test bugs

* Added some more logging for now

* Allow multiple progress bars again

* Updated to use the default timezone. Note: We still need to ensure that this gets sent to the client as well

* Updated to no longer use system.out.println and system.err.println
  • Loading branch information
jsight authored Oct 26, 2017
1 parent 8df366a commit 9a4e685
Show file tree
Hide file tree
Showing 86 changed files with 2,807 additions and 296 deletions.
124 changes: 124 additions & 0 deletions addons/messaging-executor/addon/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>

<parent>
<groupId>org.jboss.windup.web.addons</groupId>
<artifactId>windup-web-messaging-executor-parent</artifactId>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>windup-web-messaging-executor</artifactId>
<name>Windup Web - Messaging Executor Addon</name>

<dependencies>
<!-- Local Dependencies -->
<dependency>
<groupId>org.jboss.windup.web.addons</groupId>
<artifactId>windup-web-messaging-executor-api</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.windup.web.addons</groupId>
<artifactId>windup-web-messaging-executor-impl</artifactId>
<optional>true</optional>
</dependency>

<!-- Addon Dependencies -->
<dependency>
<groupId>org.jboss.windup</groupId>
<artifactId>windup-server-provider-spi</artifactId>
<version>${project.version}</version>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.web.addons</groupId>
<artifactId>windup-web-support</artifactId>
<version>${project.version}</version>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.graph</groupId>
<artifactId>windup-graph</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.config</groupId>
<artifactId>windup-config</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.exec</groupId>
<artifactId>windup-exec</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.reporting</groupId>
<artifactId>windup-reporting</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.rules.apps</groupId>
<artifactId>windup-rules-java</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.rules.apps</groupId>
<artifactId>windup-rules-java-ee</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.rules.apps</groupId>
<artifactId>windup-rules-java-archives</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.utils</groupId>
<artifactId>windup-utils</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>


<!-- Furnace Container -->
<dependency>
<groupId>org.jboss.forge.furnace.container</groupId>
<artifactId>cdi</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>

<!-- Test Dependencies -->


</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>create-forge-addon</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>forge-addon</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
167 changes: 167 additions & 0 deletions addons/messaging-executor/api/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>

<parent>
<groupId>org.jboss.windup.web.addons</groupId>
<artifactId>windup-web-messaging-executor-parent</artifactId>
<version>4.1.0-SNAPSHOT</version>
</parent>

<artifactId>windup-web-messaging-executor-api</artifactId>
<name>Windup Web - Messaging Executor Addon API</name>

<dependencies>
<!-- Local Dependencies -->
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-7.0</artifactId>
<version>${version.jboss.javaee}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-jms-client-bom</artifactId>
<version>10.1.0.Final</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
<exclusion>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.windup.web</groupId>
<artifactId>windup-web-jpa-model</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-ext-api</artifactId>
<version>2.2.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.kamranzafar</groupId>
<artifactId>jtar</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.5</version>
</dependency>

<!-- Addon Dependencies -->
<dependency>
<groupId>org.jboss.windup</groupId>
<artifactId>windup-server-provider-spi</artifactId>
<version>${project.version}</version>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.web.addons</groupId>
<artifactId>windup-web-support</artifactId>
<version>${project.version}</version>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.graph</groupId>
<artifactId>windup-graph</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.config</groupId>
<artifactId>windup-config</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.exec</groupId>
<artifactId>windup-exec</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.reporting</groupId>
<artifactId>windup-reporting</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.rules.apps</groupId>
<artifactId>windup-rules-java</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.rules.apps</groupId>
<artifactId>windup-rules-java-ee</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.rules.apps</groupId>
<artifactId>windup-rules-java-archives</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.windup.utils</groupId>
<artifactId>windup-utils</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>


<!-- Furnace Container -->
<dependency>
<groupId>org.jboss.forge.furnace.container</groupId>
<artifactId>cdi</artifactId>
<classifier>forge-addon</classifier>
<scope>provided</scope>
</dependency>

<!-- Test Dependencies -->


</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>create-forge-addon</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>forge-addon</classifier>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package org.jboss.windup.web.messaging.executor;

/**
* Contains messaging related constants (for example, queue names, jndi names, etc).
*
* @author <a href="mailto:[email protected]">Jesse Sightler</a>
*/
public abstract class AMQConstants
{
/**
* This queue contains requests to start an analysis session.
*/
public static final String EXECUTOR_QUEUE = "executorQueue";

/**
* This topic contains WindupExecution requests that should be cancelled.
*/
public static final String CANCELLATION_TOPIC = "executorCancellation";

/**
* This queue contains status updates for existing executions.
*/
public static final String STATUS_UPDATE_QUEUE = "statusUpdateQueue";

/**
* This queue contains requests for package discovery runs.
*/
public static final String PACKAGE_DISCOVERY_QUEUE = "packageDiscoveryQueue";

/**
* The name of the delivery group for MDBs that receive execution and cancellation
* requests.
*/
public static final String DELIVERY_GROUP_EXECUTOR = "dg_executors";

/**
* The delivery group that receives status updates (for example, recording the progress
* of active analyses).
*/
public static final String DELIVERY_GROUP_SERVICES = "dg_services";

/**
* This property is used by A-MQ/Artemis to indicate that a large file is available at the
* given input stream. Just call streamMessage.setProperty() with the InputStream as
* the value to include the contents of the stream in the message.
*/
public static final String AMQ_LARGE_MESSAGE_INPUTSTREAM_PROPERTY = "JMS_AMQ_InputStream";

/**
* This tells A-MQ/Artemis to save the data to the provided OutputStream. As soon as this is called,
* the message will be saved synchronously to this stream.
*/
public static final String AMQ_LARGE_MESSAGE_SAVESTREAM_PROPERTY = "JMS_AMQ_SaveStream";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package org.jboss.windup.web.messaging.executor;

import org.jboss.windup.config.ConfigurationOption;

import java.util.List;

/**
* Contains methods for querying options, validating data against options, and converting data to the correct format that Windup expects.
*
* @author <a href="mailto:[email protected]">Jesse Sightler</a>
*/
public interface ConfigurationOptionsService
{
/**
* Gets all options supported by Windup.
*/
List<ConfigurationOption> getAllOptions();

/**
* Finds the Windup core option with the given name.
*/
ConfigurationOption findConfigurationOption(String name);

/**
* Converts the given String into the type required by Windup core.
*/
Object convertType(ConfigurationOption option, String value);
}
Loading

0 comments on commit 9a4e685

Please sign in to comment.