Skip to content

Commit

Permalink
Replace akka with pekko
Browse files Browse the repository at this point in the history
  • Loading branch information
hmiguim committed Jun 21, 2024
1 parent 743d52f commit 1a25254
Show file tree
Hide file tree
Showing 20 changed files with 142 additions and 127 deletions.
51 changes: 26 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@
<swagger.version>2.2.21</swagger.version>
<jackson.version>2.17.0</jackson.version>
<spring.version>6.1.6</spring.version>
<solr.version>9.6.0</solr.version>
<pekko.version>1.0.2</pekko.version>
<solr.version>9.5.0</solr.version>
<akka.version>2.8.5</akka.version>
<apacheds.version>2.0.0.AM27</apacheds.version>
<httpcomponents.version>4.5.14</httpcomponents.version>
<commons_ip2.version>2.6.2</commons_ip2.version>
Expand Down Expand Up @@ -925,7 +926,7 @@
<dependency>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring6</artifactId>
<version>3.1.5</version>
<version>3.1.6</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -993,41 +994,41 @@
</dependency>
<!-- REST API related dependencies - end -->

<!-- Akka related dependencies - start -->
<!-- Pekko related dependencies - start -->
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.12</artifactId>
<version>${akka.version}</version>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-actor_2.13</artifactId>
<version>${pekko.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster_2.12</artifactId>
<version>${akka.version}</version>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-cluster_2.13</artifactId>
<version>${pekko.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster-tools_2.12</artifactId>
<version>${akka.version}</version>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-cluster-tools_2.13</artifactId>
<version>${pekko.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.12</artifactId>
<version>${akka.version}</version>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-testkit_2.13</artifactId>
<version>${pekko.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-persistence_2.12</artifactId>
<version>${akka.version}</version>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-persistence_2.13</artifactId>
<version>${pekko.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.12</artifactId>
<version>${akka.version}</version>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-slf4j_2.13</artifactId>
<version>${pekko.version}</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-distributed-data_2.12</artifactId>
<version>${akka.version}</version>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-distributed-data_2.13</artifactId>
<version>${pekko.version}</version>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
Expand Down Expand Up @@ -1084,7 +1085,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.19.0</version>
<version>4.19.1</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
Expand Down
4 changes: 2 additions & 2 deletions roda-core/roda-core-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
<artifactId>hamcrest-all</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.12</artifactId>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-testkit_2.13</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,20 @@ core.tools.mimetype.image/png = png
core.tools.mimetype.image/tiff = tiff tif dng
core.tools.mimetype.image/jpeg = jpg jpeg jpe spf

##########################################################################
# LDAP settings
##########################################################################
core.ldap.startServer = false
#core.ldap.adminDN = uid=admin,ou=system
core.ldap.adminDN = cn=admin,dc=roda,dc=org
core.ldap.adminPassword = roda
core.ldap.passwordDigestAlgorithm = PKCS5S2
core.ldap.baseDN = dc=roda,dc=org
core.ldap.peopleDN = ou=users,dc=roda,dc=org
core.ldap.groupsDN = ou=groups,dc=roda,dc=org
core.ldap.rolesDN = ou=roles,dc=roda,dc=org
core.ldap.rodaGuestDN = uid=guest,ou=users,dc=roda,dc=org
core.ldap.rodaAdminDN = uid=admin,ou=users,dc=roda,dc=org
core.ldap.rodaAdministratorsDN = cn=administrators,ou=groups,dc=roda,dc=org


24 changes: 12 additions & 12 deletions roda-core/roda-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -324,28 +324,28 @@

<!-- Akka related dependencies - start -->
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.12</artifactId>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-actor_2.13</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster_2.12</artifactId>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-cluster_2.13</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-cluster-tools_2.12</artifactId>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-cluster-tools_2.13</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-persistence_2.12</artifactId>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-persistence_2.13</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-slf4j_2.12</artifactId>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-slf4j_2.13</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-distributed-data_2.12</artifactId>
<groupId>org.apache.pekko</groupId>
<artifactId>pekko-distributed-data_2.13</artifactId>
</dependency>
<dependency>
<groupId>com.github.jknack</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import com.codahale.metrics.MetricRegistry;

import akka.actor.UntypedAbstractActor;
import org.apache.pekko.actor.UntypedAbstractActor;

public abstract class AkkaBaseActor extends UntypedAbstractActor {

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

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;

import org.apache.commons.io.IOUtils;
import org.roda.core.RodaCoreFactory;
Expand All @@ -31,7 +32,7 @@ public static Config getAkkaConfiguration(String configFilename) {

try (InputStream originStream = RodaCoreFactory
.getConfigurationFileAsStream(RodaConstants.CORE_ORCHESTRATOR_FOLDER + "/" + configFilename)) {
String configAsString = IOUtils.toString(originStream, RodaConstants.DEFAULT_ENCODING);
String configAsString = IOUtils.toString(originStream, StandardCharsets.UTF_8);
akkaConfig = ConfigFactory.parseString(configAsString);
} catch (IOException e) {
LOGGER.error("Could not load Akka configuration '{}'", configFilename, e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import akka.actor.DeadLetter;
import akka.actor.UntypedAbstractActor;
import org.apache.pekko.actor.DeadLetter;
import org.apache.pekko.actor.UntypedAbstractActor;

public class DeadLetterActor extends UntypedAbstractActor {
private static final Logger LOGGER = LoggerFactory.getLogger(DeadLetterActor.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.Map;
import java.util.Optional;

import org.apache.pekko.actor.ActorRef;
import org.roda.core.data.v2.IsRODAObject;
import org.roda.core.data.v2.LiteOptionalWithCause;
import org.roda.core.data.v2.SerializableOptional;
Expand All @@ -29,8 +30,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import akka.actor.ActorRef;

public class Messages {
private static final Logger LOGGER = LoggerFactory.getLogger(Messages.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@
package org.roda.core.events.akka;

import java.io.IOException;
import java.io.Serial;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeoutException;

import org.apache.commons.lang3.StringUtils;
import org.apache.pekko.actor.ActorRef;
import org.apache.pekko.actor.ActorSystem;
import org.apache.pekko.actor.Address;
import org.apache.pekko.actor.Props;
import org.apache.pekko.actor.Terminated;
import org.apache.pekko.cluster.Cluster;
import org.apache.pekko.dispatch.OnComplete;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooDefs;
Expand All @@ -34,18 +42,12 @@

import com.typesafe.config.Config;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Address;
import akka.actor.Props;
import akka.actor.Terminated;
import akka.cluster.Cluster;
import akka.dispatch.OnComplete;
import scala.concurrent.Await;
import scala.concurrent.Future;
import scala.concurrent.duration.Duration;

public class AkkaEventsHandlerAndNotifier extends AbstractEventsHandler implements EventsNotifier {
@Serial
private static final long serialVersionUID = 919188071375009042L;
private static final Logger LOGGER = LoggerFactory.getLogger(AkkaEventsHandlerAndNotifier.class);

Expand Down
Loading

0 comments on commit 1a25254

Please sign in to comment.