Feature horizontal scalability (#305)
Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
committed by
Kai Zimmermann
parent
07cb62a3dd
commit
866bc72114
@@ -33,3 +33,45 @@ The Management API can be accessed via http://localhost:8080/rest/v1
|
||||
- **manifest-simple.yml** for a standalone hawkBit installation with embedded H2.
|
||||
- **manifest.yml** for a standalone hawkBit installation with embedded H2 and RabbitMQ service binding for DMF integration (note: this manifest is used for the sandbox above).
|
||||
- Run ```cf push``` against you cloud foundry environment.
|
||||
|
||||
# Enable Clustering (experimental)
|
||||
|
||||
Clustering in hawkBit is based on _Spring Cloud Bus_. It is not enabled in the example app by default.
|
||||
|
||||
Add to your `application.properties` :
|
||||
|
||||
```
|
||||
spring.cloud.bus.enabled=true
|
||||
```
|
||||
|
||||
Add to your `pom.xml` :
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
Optional as well is the addition of [Protostuff](https://github.com/protostuff/protostuff) based message payload serialization for improved performance.
|
||||
|
||||
|
||||
Add to your `application.properties` :
|
||||
|
||||
```
|
||||
spring.cloud.stream.bindings.springCloudBusInput.content-type=application/binary+protostuff
|
||||
spring.cloud.stream.bindings.springCloudBusOutput.content-type=application/binary+protostuff
|
||||
```
|
||||
|
||||
Add to your `pom.xml` :
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>io.protostuff</groupId>
|
||||
<artifactId>protostuff-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.protostuff</groupId>
|
||||
<artifactId>protostuff-runtime</artifactId>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
<artifactId>hawkbit-repository-jpa</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
||||
@@ -8,14 +8,10 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.app;
|
||||
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
import org.eclipse.hawkbit.ui.HawkbitUI;
|
||||
import org.eclipse.hawkbit.ui.push.DelayedEventBusPushStrategy;
|
||||
import org.eclipse.hawkbit.ui.push.UIEventProvider;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.eclipse.hawkbit.ui.push.EventPushStrategy;
|
||||
import org.vaadin.spring.events.EventBus.SessionEventBus;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.vaadin.annotations.Push;
|
||||
import com.vaadin.shared.communication.PushMode;
|
||||
import com.vaadin.shared.ui.ui.Transport;
|
||||
@@ -35,12 +31,18 @@ import com.vaadin.spring.annotation.SpringUI;
|
||||
// Vaadin.
|
||||
@SuppressWarnings({ "squid:MaximumInheritanceDepth" })
|
||||
public class MyUI extends HawkbitUI {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Autowired
|
||||
public MyUI(final ScheduledExecutorService scheduledExecutorService, final EventBus systemEventBus,
|
||||
final org.vaadin.spring.events.EventBus.SessionEventBus eventBus, final UIEventProvider provider) {
|
||||
super(new DelayedEventBusPushStrategy(scheduledExecutorService, eventBus, systemEventBus, provider));
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param pushStrategy
|
||||
* the push strategy
|
||||
* @param eventBus
|
||||
* the event bus
|
||||
*/
|
||||
public MyUI(final EventPushStrategy pushStrategy, final SessionEventBus eventBus) {
|
||||
super(pushStrategy, eventBus);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user