diff --git a/.run/IgniteOrderLoaderMain.run.xml b/.run/IgniteOrderLoaderMain.run.xml new file mode 100644 index 000000000..47f60fe41 --- /dev/null +++ b/.run/IgniteOrderLoaderMain.run.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/.run/IgniteVuuMain.run.xml b/.run/IgniteVuuMain.run.xml new file mode 100644 index 000000000..feb07b82e --- /dev/null +++ b/.run/IgniteVuuMain.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/.run/StartIgniteMain.run.xml b/.run/StartIgniteMain.run.xml new file mode 100644 index 000000000..5ba4f4551 --- /dev/null +++ b/.run/StartIgniteMain.run.xml @@ -0,0 +1,17 @@ + + + + \ No newline at end of file diff --git a/example/apache-ignite/README.md b/example/apache-ignite/README.md new file mode 100644 index 000000000..fd2e08097 --- /dev/null +++ b/example/apache-ignite/README.md @@ -0,0 +1,33 @@ +[![FINOS - Incubating](https://cdn.jsdelivr.net/gh/finos/contrib-toolbox@master/images/badge-incubating.svg)](https://community.finos.org/docs/governance/Software-Projects/stages/incubating) + +# Apache Ignite Sample + +How to run: + +1. Run Ignite Cluster Application (run config for IntelliJ checked in): + +```scala +org.finos.vuu.example.ignite.StartIgniteMain +``` + +2. Run loader process to populate orders... + +```scala +org.finos.vuu.example.ignite.loader.IgniteOrderLoaderMain +``` + +3. Run the static main + +```scala +org.finos.vuu.example.ignite.IgniteVuuMain + +# required jdk 17 JVM args + --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/jdk.internal.access=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-opens=java.base/sun.reflect.generics.reflectiveObjects=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED +``` +## License + +Copyright 2022 finos + +Distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). + +SPDX-License-Identifier: [Apache-2.0](https://spdx.org/licenses/Apache-2.0) diff --git a/example/apache-ignite/pom.xml b/example/apache-ignite/pom.xml new file mode 100644 index 000000000..130bc64d2 --- /dev/null +++ b/example/apache-ignite/pom.xml @@ -0,0 +1,117 @@ + + + 4.0.0 + + org.finos.vuu + example + 0.9.61-SNAPSHOT + + + apache-ignite + + + + + org.finos.vuu + order + 0.9.61-SNAPSHOT + + + + org.finos.vuu.plugin + virtualized-table-plugin + 0.9.61-SNAPSHOT + + + + org.finos.vuu.plugin + ignite-plugin + 0.9.61-SNAPSHOT + + + + org.finos.vuu + vuu + 0.9.61-SNAPSHOT + + + org.apache.ignite + ignite-core + 2.16.0 + + + org.apache.ignite + ignite-calcite + 2.16.0 + + + org.apache.ignite + ignite-slf4j + 2.16.0 + + + org.scala-lang + scala-library + ${scala.version} + + + + org.scala-lang + scala-reflect + ${scala.version} + + + + junit + junit + 4.13.2 + test + + + + org.scalatest + scalatest_2.13 + ${scalatest.version} + test + + + org.scala-lang + scala-library + + + org.scala-lang + scala-reflect + + + + + + + + + + org.scala-tools + maven-scala-plugin + ${maven.scala.plugin} + + + + compile + testCompile + + + + + src/main/scala + src/test/scala + + -Xms64m + -Xmx1024m + + + + + + \ No newline at end of file diff --git a/example/apache-ignite/src/main/resources/application.conf b/example/apache-ignite/src/main/resources/application.conf new file mode 100644 index 000000000..ae9f4e088 --- /dev/null +++ b/example/apache-ignite/src/main/resources/application.conf @@ -0,0 +1,3 @@ +vuu.webroot="vuu-ui/deployed_apps/app-vuu-example" +vuu.certPath="example/main/src/main/resources/certs/cert.pem" +vuu.keyPath="example/main/src/main/resources/certs/key.pem" \ No newline at end of file diff --git a/example/apache-ignite/src/main/resources/certs/cert.pem b/example/apache-ignite/src/main/resources/certs/cert.pem new file mode 100644 index 000000000..50aac0b4e --- /dev/null +++ b/example/apache-ignite/src/main/resources/certs/cert.pem @@ -0,0 +1,18 @@ +-----BEGIN CERTIFICATE----- +MIIC3jCCAcYCCQDluS1n11toPDANBgkqhkiG9w0BAQsFADAxMQswCQYDVQQGEwJH +QjEOMAwGA1UECgwFVmVudXUxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0yMTAzMTgw +OTUzMzVaFw0zMTAzMTYwOTUzMzVaMDExCzAJBgNVBAYTAkdCMQ4wDAYDVQQKDAVW +ZW51dTESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAoXS+P4cOprmMIByOOD4+O69Qfnjmrh2Raq5DBHmEDObqF6mA2E+o +SSRvPTdTsufK0tIKQM7iH8ot5P0+ydaVmaHHML7Bys3WYQNfCBm+MZRl79O7yiHX +tZYtIiJoagiQ4IX19Q00tkaNPqsj5ANBfKVtzokRzXzw+BjZtZpBXWUeETJE4wGB +5fSQCHMdA8pnblucqsMsmDhGYloH5sBPLIyu9wV/h6AunxhZ37cKlV3U6R8np1ov +T2fW3fHj6LtrUceMiZKWWgM9NrcJyeSZrqtwWe4lS3VeGZbGG1EZ+oc0m4cbv9FI +3pz47cK+NTRQq43JQERmA3Yb9G2xRNFTxQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB +AQB5mMt5eJuwnttcIfv7CKpb9icdYQUsQwN76n33EBetwoBj4r0F2gvxVCUo+9p9 +QTWET7K/nnCxB5ToP031baKZBOU8vIwhAU4WT1Y04ydYLu7vWBCVS7Cp1cygeJ5Z +3WufvWo8EEqRhAKYFKIj0bj9XP6yOOBSNlmQk5VRRMKLp9aqmT1rV6+IgS6RJQim +heZVnEUuKkHo6HZygv3Pl6DMXzD+pawcfYh7HYf+70qzmKvfBZkDE8x74KvdQ21V +7bYRiL+yglzpkYPcAdpUAoHEUwh4DuCcaDUdGgGCBzjh7QJNvel5HccpXSGbrezY +wYfUHIkVCMlDIRYJJArHJChO +-----END CERTIFICATE----- diff --git a/example/apache-ignite/src/main/resources/certs/key.pem b/example/apache-ignite/src/main/resources/certs/key.pem new file mode 100644 index 000000000..ff9c9ab03 --- /dev/null +++ b/example/apache-ignite/src/main/resources/certs/key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQChdL4/hw6muYwg +HI44Pj47r1B+eOauHZFqrkMEeYQM5uoXqYDYT6hJJG89N1Oy58rS0gpAzuIfyi3k +/T7J1pWZoccwvsHKzdZhA18IGb4xlGXv07vKIde1li0iImhqCJDghfX1DTS2Ro0+ +qyPkA0F8pW3OiRHNfPD4GNm1mkFdZR4RMkTjAYHl9JAIcx0DymduW5yqwyyYOEZi +WgfmwE8sjK73BX+HoC6fGFnftwqVXdTpHyenWi9PZ9bd8ePou2tRx4yJkpZaAz02 +twnJ5Jmuq3BZ7iVLdV4ZlsYbURn6hzSbhxu/0UjenPjtwr41NFCrjclARGYDdhv0 +bbFE0VPFAgMBAAECggEBAIa5QZ8E9YbNwU1yRoJL/eYTzhkajXKwnYzlSGrNcxDJ +BoEkIa1eGtCdpGzyY9cfb7EnLwMRHsLkFBPF9cS6WC7QPcRBCLhPthlRlNTPllMM +v1q11Tc/sh2F6LdY+sOvziRr4+bNVDTc/jNS3yn+RYDbEZuL6N0M6o47Pj85Ll3d +FNHQf/4JHm8H2CpKzumnBeSQoo+gVgd/cY/WL52SuMYwjOWmEsSR1TTn/mp2128u +0f4CcZ+OlqqI1u3T05V1wCHVkqZiuK4Uz7kjo4TPtNb7QKd8G2MhRxAhu8zoQflY +T6TEwjw0vCicJAmDuNO6b8MsPpfyfpjH5Ne985bGPwECgYEA1g1SHbnKNSzfa+o2 +2ZuTBNgb0gueRpMH4SkvfrMTmPXbArWiRt0YYJp5D6/1ZTT/cnBtC4ob9bkk2Gi7 +QSsVYkFvn9kwHoF/dNPGG7NALf8uld6izMYuWsaZXGJFv7wV57gqsD13bLyrOypp +c6xRkMgvlU68g/HYa1jwj8gG0iUCgYEAwRjB21ACWjHqDI+yDD2nj1K0kLHDFI2J +yLQk8vZWzKknftFs/m/+OSZxh2MpBxV1MhdhIol0T7Iu4FqqxX0RobQMhDGgzIka +pG8/Gqu3Xz+y0iLaKG3GOI/24zoWhvrhkkJvjWNA42ank9k9UtnpoieQkKtQ5PJO +Kov9dPquOSECgYEAiZQ4QmjnAfScidUZehZXkZaBkyjqizv3pY3+O/ZH01m6cexi +qB91iqnew+l51ZoR0fFW9ULIo9BjUUFHkiRp8yRR5bEID6N2U5XGUImO58GLpMJb +azi6FJhvfASiBhGTFsO1lF99ggNmH3osGzAXoPI6O0JHQptQWfbpb9DGKY0CgYBU +sA39qNaPRkr3HWKiWbwOcOB+gWgksHrYiqGV6ZJiCmInDaS25tlhqUmrbkMFN1UC +Fhzk79ISTfyfK0Swfszn1baTl8yFSDBmI+BSSzOOU7qSzPRPPO3tyr4mJEjTBF9A +LWENapV/5nririlmF+qO0rllqa097EN6B5Gu527X4QKBgGuqnOeiy8UVpTRcN6OL +h5RRS10utpQcpU1nJHx1Us23As0LJXV+CZuFGNWVnR0GLFABKNBZMV7ZqPHxwmr0 +WBhvxP1xOwCUsla1Cg/dEG+J1q7dPyVfXFK0813Rb5S9omnrQolTczbEh2LnF3RE +JJmkkwWfm/jOTEl8F3iJQLQN +-----END PRIVATE KEY----- diff --git a/example/apache-ignite/src/main/resources/logback.xml b/example/apache-ignite/src/main/resources/logback.xml new file mode 100644 index 000000000..47f08b84d --- /dev/null +++ b/example/apache-ignite/src/main/resources/logback.xml @@ -0,0 +1,80 @@ + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteCacheQueryApplication.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteCacheQueryExampleMain.scala similarity index 75% rename from example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteCacheQueryApplication.scala rename to example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteCacheQueryExampleMain.scala index a2d348fea..fed138b9e 100644 --- a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteCacheQueryApplication.scala +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteCacheQueryExampleMain.scala @@ -1,17 +1,14 @@ -package org.finos.vuu.data.order.ignite - -import org.apache.ignite.{IgniteCache, Ignition} -import org.finos.vuu.data.order.{ChildOrder, ParentOrder} +package org.finos.vuu.example.ignite import java.time.{Duration, Instant} /** * An App that belongs to the suite of the following :
- * 1. [[CacheNodeApplication]] - an app that starts Ignite cluster storage node
+ * 1. [[StartIgniteMain]] - an app that starts Ignite cluster storage node
* 2. [[IgniteOrderLoader]] - an app that loads random orders and child orders into ignite cache
- * 3. [[IgniteCacheQueryApplication]] - a showcase class that queries Ignite for slices of ChildOrders
+ * 3. [[IgniteCacheQueryExampleMain]] - a showcase class that queries Ignite for slices of ChildOrders
*/ -object IgniteCacheQueryApplication extends App { +object IgniteCacheQueryExampleMain extends App { //private val clientConfig = IgniteLocalConfig.create(true) //val ignite = Ignition.getOrStart(clientConfig) diff --git a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteLocalConfig.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteLocalConfig.scala similarity index 96% rename from example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteLocalConfig.scala rename to example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteLocalConfig.scala index ccd5d7ed7..34338ea6e 100644 --- a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteLocalConfig.scala +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteLocalConfig.scala @@ -1,8 +1,8 @@ -package org.finos.vuu.data.order.ignite +package org.finos.vuu.example.ignite import org.apache.ignite.cache.{QueryEntity, QueryIndex, QueryIndexType} import org.apache.ignite.configuration.{CacheConfiguration, DataStorageConfiguration, IgniteConfiguration} -import org.finos.vuu.data.order.ChildOrder +import org.finos.vuu.core.module.simul.model.ChildOrder import java.nio.file.Paths import java.util.concurrent.atomic.AtomicBoolean diff --git a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteOrderStore.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteOrderStore.scala similarity index 97% rename from example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteOrderStore.scala rename to example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteOrderStore.scala index f472b3509..b2941b100 100644 --- a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/IgniteOrderStore.scala +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteOrderStore.scala @@ -1,11 +1,11 @@ -package org.finos.vuu.data.order.ignite +package org.finos.vuu.example.ignite import com.typesafe.scalalogging.StrictLogging import org.apache.ignite.cache.CachePeekMode import org.apache.ignite.cache.query.{IndexQuery, IndexQueryCriteriaBuilder, IndexQueryCriterion, SqlFieldsQuery} import org.apache.ignite.cluster.ClusterState import org.apache.ignite.{IgniteCache, Ignition} -import org.finos.vuu.data.order.{ChildOrder, OrderStore, ParentOrder} +import org.finos.vuu.core.module.simul.model.{ChildOrder, OrderStore, ParentOrder} import scala.collection.mutable import scala.jdk.CollectionConverters._ diff --git a/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteVuuMain.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteVuuMain.scala new file mode 100644 index 000000000..59ad56a56 --- /dev/null +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/IgniteVuuMain.scala @@ -0,0 +1,89 @@ +package org.finos.vuu.example.ignite + +import com.typesafe.config.ConfigFactory +import com.typesafe.scalalogging.StrictLogging +import org.finos.toolbox.jmx.{JmxInfra, MetricsProvider, MetricsProviderImpl} +import org.finos.toolbox.lifecycle.LifecycleContainer +import org.finos.toolbox.time.{Clock, DefaultClock} +import org.finos.vuu.core._ +import org.finos.vuu.core.module.TableDefContainer +import org.finos.vuu.core.module.authn.AuthNModule +import org.finos.vuu.core.module.auths.PermissionModule +import org.finos.vuu.core.module.metrics.MetricsModule +import org.finos.vuu.core.module.price.PriceModule +import org.finos.vuu.core.module.simul.SimulationModule +import org.finos.vuu.core.module.typeahead.TypeAheadModule +import org.finos.vuu.core.module.vui.VuiStateModule +import org.finos.vuu.example.ignite.module.IgniteOrderDataModule +import org.finos.vuu.net.auth.AlwaysHappyAuthenticator +import org.finos.vuu.net.http.VuuHttp2ServerOptions +import org.finos.vuu.net.{AlwaysHappyLoginValidator, Authenticator, LoggedInTokenValidator} +import org.finos.vuu.order.oms.OmsApi +import org.finos.vuu.plugin.virtualized.VirtualizedTablePlugin +import org.finos.vuu.state.MemoryBackedVuiStateStore + +/* +//to allow self signed certs +chrome://flags/#allow-insecure-localhost + */ + +object IgniteVuuMain extends App with StrictLogging { + + JmxInfra.enableJmx() + + implicit val metrics: MetricsProvider = new MetricsProviderImpl + implicit val clock: Clock = new DefaultClock + implicit val lifecycle: LifecycleContainer = new LifecycleContainer + implicit val tableDefContainer: TableDefContainer = new TableDefContainer(Map()) + + logger.info("[VUU] Starting...") + + val store = new MemoryBackedVuiStateStore() + + //store.add(VuiState(VuiHeader("chris", "latest", "chris.latest", clock.now()), VuiJsonState("{ uiState : ['chris','foo'] }"))) + + lifecycle.autoShutdownHook() + + val authenticator: Authenticator = new AlwaysHappyAuthenticator + val loginTokenValidator: LoggedInTokenValidator = new LoggedInTokenValidator + + val defaultConfig = ConfigFactory.load() + + //look in application.conf for default values + val webRoot = defaultConfig.getString("vuu.webroot") + val certPath = defaultConfig.getString("vuu.certPath") + val keyPath = defaultConfig.getString("vuu.keyPath") + + val config = VuuServerConfig( + VuuHttp2ServerOptions() + //only specify webroot if we want to load the source locally, we'll load it from the jar + //otherwise + .withWebRoot(webRoot) + .withSsl(certPath, keyPath) + //don't leave me on in prod pls.... + .withDirectoryListings(true) + .withBindAddress("0.0.0.0") + .withPort(8443), + VuuWebSocketOptions() + .withUri("websocket") + .withWsPort(8090) + .withWss(certPath, keyPath) + .withBindAddress("0.0.0.0"), + VuuSecurityOptions() + .withAuthenticator(authenticator) + .withLoginValidator(new AlwaysHappyLoginValidator), + VuuThreadingOptions() + .withViewPortThreads(4) + .withTreeThreads(4) + ).withModule(MetricsModule()) + .withModule(IgniteOrderDataModule(IgniteOrderStore())) + .withPlugin(VirtualizedTablePlugin) + + val vuuServer = new VuuServer(config) + + lifecycle.start() + + logger.info("[VUU] Ready.") + + vuuServer.join() +} diff --git a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/CacheNodeApplication.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/StartIgniteMain.scala similarity index 69% rename from example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/CacheNodeApplication.scala rename to example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/StartIgniteMain.scala index 95ca68939..3520f3b92 100644 --- a/example/data-ignite/src/main/scala/org/finos/vuu/data/order/ignite/CacheNodeApplication.scala +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/StartIgniteMain.scala @@ -1,10 +1,9 @@ -package org.finos.vuu.data.order.ignite +package org.finos.vuu.example.ignite import org.apache.ignite.Ignition -object CacheNodeApplication extends App { +object StartIgniteMain extends App { IgniteLocalConfig.setPersistenceEnabled(false) val configuration = IgniteLocalConfig.create(false) - val ignite = Ignition.getOrStart(configuration) } diff --git a/example/order/src/main/scala/org/finos/vuu/core/module/simul/ignite/IgniteOrderLoader.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/loader/IgniteOrderLoaderMain.scala similarity index 84% rename from example/order/src/main/scala/org/finos/vuu/core/module/simul/ignite/IgniteOrderLoader.scala rename to example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/loader/IgniteOrderLoaderMain.scala index f56b9499a..fda103ba8 100644 --- a/example/order/src/main/scala/org/finos/vuu/core/module/simul/ignite/IgniteOrderLoader.scala +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/loader/IgniteOrderLoaderMain.scala @@ -1,15 +1,15 @@ -package org.finos.vuu.core.module.simul.ignite +package org.finos.vuu.example.ignite.loader import org.finos.toolbox.lifecycle.LifecycleContainer import org.finos.toolbox.time.{Clock, DefaultClock} +import org.finos.vuu.core.module.simul.model.{ChildOrder, OrderStore} import org.finos.vuu.core.module.simul.provider.{ParentChildOrdersModel, SeededRandomNumbers} -import org.finos.vuu.data.order.{ChildOrder, OrderStore} -import org.finos.vuu.data.order.ignite.IgniteOrderStore +import org.finos.vuu.example.ignite.IgniteOrderStore import java.util.concurrent.Executors import java.util.concurrent.atomic.LongAdder -object IgniteOrderLoader extends App { +object IgniteOrderLoaderMain extends App { implicit val clock: Clock = new DefaultClock() implicit val lifecycleContainer = new LifecycleContainer() implicit val randomNumbers: SeededRandomNumbers = new SeededRandomNumbers(clock.now()) @@ -19,7 +19,7 @@ object IgniteOrderLoader extends App { private val childOrderCounter = new LongAdder() private val executor = Executors.newWorkStealingPool() - (0 until (5_000)).foreach(i => + (0 until 40_000).foreach(i => executor.execute { () => val parent = ordersModel.createParent() val childrenToCreate = randomNumbers.seededRand(100, 250) diff --git a/example/virtualized-table/src/main/scala/org/finos/vuu/example/virtualtable/module/IgniteOrderDataModule.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/module/IgniteOrderDataModule.scala similarity index 74% rename from example/virtualized-table/src/main/scala/org/finos/vuu/example/virtualtable/module/IgniteOrderDataModule.scala rename to example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/module/IgniteOrderDataModule.scala index 6ff2e2297..72558c0f8 100644 --- a/example/virtualized-table/src/main/scala/org/finos/vuu/example/virtualtable/module/IgniteOrderDataModule.scala +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/module/IgniteOrderDataModule.scala @@ -1,30 +1,32 @@ -package org.finos.vuu.example.virtualtable.module +package org.finos.vuu.example.ignite.module import org.finos.toolbox.lifecycle.LifecycleContainer import org.finos.toolbox.time.Clock import org.finos.vuu.api.ViewPortDef import org.finos.vuu.core.module.{DefaultModule, ModuleFactory, TableDefContainer, ViewServerModule} import org.finos.vuu.core.table.Columns -import org.finos.vuu.data.order.ignite.IgniteOrderStore -import org.finos.vuu.example.virtualtable.provider.IgniteOrderDataProvider +import org.finos.vuu.example.ignite.IgniteOrderStore +import org.finos.vuu.example.ignite.provider.IgniteOrderDataProvider +import org.finos.vuu.net.rpc.RpcHandler import org.finos.vuu.plugin.virtualized.api.VirtualizedSessionTableDef +class NoOpIgniteService extends RpcHandler object IgniteOrderDataModule extends DefaultModule { - final val NAME = "IGNITE_ORDER_VIRTUAL" + final val NAME = "IGNITE" def apply(igniteOrderStore: IgniteOrderStore)(implicit clock: Clock, lifecycle: LifecycleContainer, tableDefContainer: TableDefContainer): ViewServerModule = { ModuleFactory.withNamespace(NAME) .addSessionTable( VirtualizedSessionTableDef( - name = "bigOrders", + name = "bigOrders2", keyField = "orderId", Columns.fromNames("orderId".int(), "ric".string(), "quantity".int(), "price".double(), "side".string(), "strategy".string(), "parentOrderId".int()) ), (table, _) => new IgniteOrderDataProvider(igniteOrderStore), (table, _, _, _) => ViewPortDef( columns = table.getTableDef.columns, - service = new VirtualService() + service = new NoOpIgniteService() ) ).asModule() } diff --git a/example/virtualized-table/src/main/scala/org/finos/vuu/example/virtualtable/provider/IgniteOrderDataProvider.scala b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/provider/IgniteOrderDataProvider.scala similarity index 79% rename from example/virtualized-table/src/main/scala/org/finos/vuu/example/virtualtable/provider/IgniteOrderDataProvider.scala rename to example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/provider/IgniteOrderDataProvider.scala index fc1c0d2ed..6ddd40247 100644 --- a/example/virtualized-table/src/main/scala/org/finos/vuu/example/virtualtable/provider/IgniteOrderDataProvider.scala +++ b/example/apache-ignite/src/main/scala/org/finos/vuu/example/ignite/provider/IgniteOrderDataProvider.scala @@ -1,9 +1,10 @@ -package org.finos.vuu.example.virtualtable.provider +package org.finos.vuu.example.ignite.provider +import com.typesafe.scalalogging.StrictLogging import org.finos.toolbox.time.Clock import org.finos.vuu.core.filter.FilterSpecParser import org.finos.vuu.core.table.RowWithData -import org.finos.vuu.data.order.ignite.IgniteOrderStore +import org.finos.vuu.example.ignite.IgniteOrderStore import org.finos.vuu.feature.ignite.filter.{IgniteSqlFilterClause, IgniteSqlFilterTreeVisitor} import org.finos.vuu.plugin.virtualized.table.{VirtualizedRange, VirtualizedSessionTable, VirtualizedViewPortKeys} import org.finos.vuu.provider.VirtualizedProvider @@ -11,7 +12,7 @@ import org.finos.vuu.viewport.ViewPort import java.util.concurrent.atomic.AtomicInteger -class IgniteOrderDataProvider(final val igniteStore: IgniteOrderStore)(implicit clock: Clock) extends VirtualizedProvider { +class IgniteOrderDataProvider(final val igniteStore: IgniteOrderStore)(implicit clock: Clock) extends VirtualizedProvider with StrictLogging { override def runOnce(viewPort: ViewPort): Unit = { @@ -37,9 +38,15 @@ class IgniteOrderDataProvider(final val igniteStore: IgniteOrderStore)(implicit // val sqlFilterClause = "" val rowCount = if(range.to > range.from) range.to - range.from else 1 - val iterator = igniteStore.findChildOrder(sqlFilterClause = sqlFilterClause, startIndex = range.from, rowCount = rowCount) - // val iterator = igniteStore.findWindow(range.from, rowCount) + val startIndex = Math.max(range.from - 5000, 0) + val endIndex = range.to + 5000 + + logger.info(s"Loading data between $startIndex and $endIndex") + + val iterator = igniteStore.findChildOrder(sqlFilterClause = sqlFilterClause, startIndex = startIndex, rowCount = endIndex) + + logger.info(s"Loaded data between $startIndex and $endIndex") val index = new AtomicInteger(range.from) // todo: get rid of working assumption here that the dataset is fairly immutable. iterator.foreach(childOrder => { @@ -68,5 +75,5 @@ class IgniteOrderDataProvider(final val igniteStore: IgniteOrderStore)(implicit override def doDestroy(): Unit = {} - override val lifecycleId: String = "org.finos.vuu.example.virtualtable.provider.IgniteOrderDataProvider" + override val lifecycleId: String = "org.finos.vuu.example.ignite.provider.IgniteOrderDataProvider" } diff --git a/example/data-ignite/src/test/scala/org/finos/vuu/data/order/ignite/IgniteOrderStoreTest.scala b/example/apache-ignite/src/test/scala/org/finos/vuu/example/ignite/IgniteOrderStoreTest.scala similarity index 98% rename from example/data-ignite/src/test/scala/org/finos/vuu/data/order/ignite/IgniteOrderStoreTest.scala rename to example/apache-ignite/src/test/scala/org/finos/vuu/example/ignite/IgniteOrderStoreTest.scala index 04efad2ea..70e3a2a71 100644 --- a/example/data-ignite/src/test/scala/org/finos/vuu/data/order/ignite/IgniteOrderStoreTest.scala +++ b/example/apache-ignite/src/test/scala/org/finos/vuu/example/ignite/IgniteOrderStoreTest.scala @@ -1,8 +1,8 @@ -package org.finos.vuu.data.order.ignite +package org.finos.vuu.example.ignite import org.apache.ignite.cache.query.IndexQueryCriteriaBuilder import org.apache.ignite.{Ignite, IgniteCache} -import org.finos.vuu.data.order.{ChildOrder, ParentOrder} +import org.finos.vuu.core.module.simul.model.{ChildOrder, ParentOrder} import org.scalatest.BeforeAndAfter import org.scalatest.funsuite.AnyFunSuiteLike diff --git a/example/data-ignite/src/test/scala/org/finos/vuu/data/order/ignite/TestUtils.scala b/example/apache-ignite/src/test/scala/org/finos/vuu/example/ignite/TestUtils.scala similarity index 96% rename from example/data-ignite/src/test/scala/org/finos/vuu/data/order/ignite/TestUtils.scala rename to example/apache-ignite/src/test/scala/org/finos/vuu/example/ignite/TestUtils.scala index ba851f66e..66cd554b4 100644 --- a/example/data-ignite/src/test/scala/org/finos/vuu/data/order/ignite/TestUtils.scala +++ b/example/apache-ignite/src/test/scala/org/finos/vuu/example/ignite/TestUtils.scala @@ -1,10 +1,10 @@ -package org.finos.vuu.data.order.ignite +package org.finos.vuu.example.ignite import org.apache.ignite.cache.{QueryEntity, QueryIndex, QueryIndexType} import org.apache.ignite.calcite.CalciteQueryEngineConfiguration import org.apache.ignite.configuration.{IgniteConfiguration, SqlConfiguration} import org.apache.ignite.{Ignite, Ignition} -import org.finos.vuu.data.order.{ChildOrder, ParentOrder} +import org.finos.vuu.core.module.simul.model.{ChildOrder, ParentOrder} import java.util import scala.jdk.CollectionConverters.IterableHasAsJava diff --git a/example/main/src/main/scala/org/finos/vuu/IgniteCacheQueryApplication.scala b/example/main/src/main/scala/org/finos/vuu/IgniteCacheQueryApplication.scala deleted file mode 100644 index e0f4d1389..000000000 --- a/example/main/src/main/scala/org/finos/vuu/IgniteCacheQueryApplication.scala +++ /dev/null @@ -1,29 +0,0 @@ -package org.finos.vuu - -import org.finos.vuu.data.order.ignite.IgniteOrderStore - -import java.time.{Duration, Instant} - -/** - * An App that belongs to the suite of the following :
- * 1. [[CacheNodeApplication]] - an app that starts Ignite cluster storage node
- * 2. [[IgniteOrderLoader]] - an app that loads random orders and child orders into ignite cache
- * 3. [[IgniteCacheQueryApplication]] - a showcase class that queries Ignite for slices of ChildOrders
- */ -object IgniteCacheQueryApplication extends App { - val orderStore = IgniteOrderStore() - - private val windowSize = 100 - private var offset = 500 - //private var remaining = orderStore.childOrderCount() - - //while (remaining > 0) { - // val nextWindow = Math.min(windowSize, remaining) - - val startTime = Instant.now() - val orders = orderStore.findWindow(offset, 400) - println(s"Size : ${orders.size} in ${Duration.between(startTime, Instant.now())}") - //offset += nextWindow.toInt - //remaining -= nextWindow - //} -} diff --git a/example/main/src/main/scala/org/finos/vuu/SimulMain.scala b/example/main/src/main/scala/org/finos/vuu/SimulMain.scala index 328f4e6ff..7008ff8df 100644 --- a/example/main/src/main/scala/org/finos/vuu/SimulMain.scala +++ b/example/main/src/main/scala/org/finos/vuu/SimulMain.scala @@ -16,8 +16,7 @@ import org.finos.vuu.core.module.price.PriceModule import org.finos.vuu.core.module.simul.SimulationModule import org.finos.vuu.core.module.typeahead.TypeAheadModule import org.finos.vuu.core.module.vui.VuiStateModule -import org.finos.vuu.data.order.ignite.IgniteOrderStore -import org.finos.vuu.example.virtualtable.module.{IgniteOrderDataModule, VirtualTableModule} +import org.finos.vuu.example.virtualtable.module.VirtualTableModule import org.finos.vuu.net.auth.AlwaysHappyAuthenticator import org.finos.vuu.net.http.VuuHttp2ServerOptions import org.finos.vuu.net.{AlwaysHappyLoginValidator, Authenticator, LoggedInTokenValidator} diff --git a/example/order/pom.xml b/example/order/pom.xml index 55550d696..fcb5503de 100644 --- a/example/order/pom.xml +++ b/example/order/pom.xml @@ -38,11 +38,6 @@ price 0.9.61-SNAPSHOT - - org.finos.vuu - data-ignite - 0.9.61-SNAPSHOT - org.scala-lang diff --git a/example/order/src/main/scala/org/finos/vuu/core/module/simul/SimulationModule.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/SimulationModule.scala index 1e2356cc9..f10327243 100644 --- a/example/order/src/main/scala/org/finos/vuu/core/module/simul/SimulationModule.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/SimulationModule.scala @@ -11,8 +11,6 @@ import org.finos.vuu.core.module.simul.provider._ import org.finos.vuu.core.module.simul.service.ParentOrdersService import org.finos.vuu.core.module.{DefaultModule, ModuleFactory, TableDefContainer, ViewServerModule} import org.finos.vuu.core.table.{Columns, DataTable, TableContainer} -import org.finos.vuu.data.order.ignite.IgniteOrderStore -import org.finos.vuu.data.order.{MapOrderStore, OrderStore} import org.finos.vuu.net.rpc.RpcHandler import org.finos.vuu.net.{ClientSessionId, RequestContext} import org.finos.vuu.provider.simulation.SimulatedBigInstrumentsProvider diff --git a/example/data-order/src/main/scala/org/finos/vuu/data/order/ChildOrder.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/ChildOrder.scala similarity index 93% rename from example/data-order/src/main/scala/org/finos/vuu/data/order/ChildOrder.scala rename to example/order/src/main/scala/org/finos/vuu/core/module/simul/model/ChildOrder.scala index 6c7035ef2..b33774f30 100644 --- a/example/data-order/src/main/scala/org/finos/vuu/data/order/ChildOrder.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/ChildOrder.scala @@ -1,4 +1,4 @@ -package org.finos.vuu.data.order +package org.finos.vuu.core.module.simul.model case class ChildOrder( parentId: Int, diff --git a/example/data-order/src/main/scala/org/finos/vuu/data/order/MapOrderStore.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/MapOrderStore.scala similarity index 96% rename from example/data-order/src/main/scala/org/finos/vuu/data/order/MapOrderStore.scala rename to example/order/src/main/scala/org/finos/vuu/core/module/simul/model/MapOrderStore.scala index 73d50be46..a373f8126 100644 --- a/example/data-order/src/main/scala/org/finos/vuu/data/order/MapOrderStore.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/MapOrderStore.scala @@ -1,4 +1,4 @@ -package org.finos.vuu.data.order +package org.finos.vuu.core.module.simul.model import java.util.concurrent.ConcurrentHashMap diff --git a/example/data-order/src/main/scala/org/finos/vuu/data/order/OrderStore.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/OrderStore.scala similarity index 88% rename from example/data-order/src/main/scala/org/finos/vuu/data/order/OrderStore.scala rename to example/order/src/main/scala/org/finos/vuu/core/module/simul/model/OrderStore.scala index 3d6282cf0..6714944ef 100644 --- a/example/data-order/src/main/scala/org/finos/vuu/data/order/OrderStore.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/OrderStore.scala @@ -1,10 +1,13 @@ -package org.finos.vuu.data.order +package org.finos.vuu.core.module.simul.model trait OrderStore { def storeParentOrder(order: ParentOrder): Unit + def storeChildOrder(parentOrder: ParentOrder, childOrder: ChildOrder): Unit + def storeParentOrderWithChildren(parentOrder: ParentOrder, childOrders: Iterable[ChildOrder]): Unit def findParentOrderById(id: Int): ParentOrder + def findChildOrderByParentId(parentId: Int): Iterable[ChildOrder] } diff --git a/example/data-order/src/main/scala/org/finos/vuu/data/order/ParentOrder.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/ParentOrder.scala similarity index 91% rename from example/data-order/src/main/scala/org/finos/vuu/data/order/ParentOrder.scala rename to example/order/src/main/scala/org/finos/vuu/core/module/simul/model/ParentOrder.scala index c069ca748..b98239401 100644 --- a/example/data-order/src/main/scala/org/finos/vuu/data/order/ParentOrder.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/model/ParentOrder.scala @@ -1,4 +1,4 @@ -package org.finos.vuu.data.order +package org.finos.vuu.core.module.simul.model case class ParentOrder( id: Int, @@ -19,4 +19,4 @@ case class ParentOrder( activeChildren: Int, owner: String = "", permissionMask: Int = 0 - ) + ) diff --git a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ChildOrdersProvider.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ChildOrdersProvider.scala index b6f788ba1..62e4d87e7 100644 --- a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ChildOrdersProvider.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ChildOrdersProvider.scala @@ -2,8 +2,8 @@ package org.finos.vuu.core.module.simul.provider import org.finos.toolbox.lifecycle.LifecycleContainer import org.finos.toolbox.time.Clock +import org.finos.vuu.core.module.simul.model.{ChildOrder, ParentOrder} import org.finos.vuu.core.table.{DataTable, RowWithData} -import org.finos.vuu.data.order.{ChildOrder, ParentOrder} import org.finos.vuu.provider.Provider class ChildOrdersProvider(val table: DataTable, model: ParentChildOrdersModel)(implicit clock: Clock, lifecycleContainer: LifecycleContainer) extends Provider { @@ -32,11 +32,11 @@ class ChildOrdersProvider(val table: DataTable, model: ParentChildOrdersModel)(i } }) - def processDelete(po: ChildOrder) = { + def processDelete(po: ChildOrder): Unit = { table.processDelete(po.id.toString) } - def processUpsert(co: ChildOrder) = { + def processUpsert(co: ChildOrder): Unit = { //id: Int, ric: String, price: Double, quantity: Int, side: String, account: String, exchange: String, ccy: String, algo: String, volLimit: Double, filledQty: Int, openQty: Int, averagePrice: Double, status: String table.processUpdate(co.id.toString, RowWithData(co.id.toString, Map("id" -> co.id.toString, "idAsInt" -> co.id, "ric" -> co.ric, "price" -> co.price, "quantity" -> co.quantity, "side" -> co.side, "parentOrderId" -> co.parentId, "exchange" -> co.exchange, "ccy" -> co.ccy, diff --git a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentChildOrdersModel.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentChildOrdersModel.scala index 927eafe77..6978d1b96 100644 --- a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentChildOrdersModel.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentChildOrdersModel.scala @@ -3,7 +3,7 @@ package org.finos.vuu.core.module.simul.provider import org.finos.toolbox.lifecycle.LifecycleContainer import org.finos.toolbox.time.Clock import org.finos.vuu.core.module.auths.PermissionSet -import org.finos.vuu.data.order.{ChildOrder, OrderStore, ParentOrder} +import org.finos.vuu.core.module.simul.model.{ChildOrder, ParentOrder} import java.util.concurrent.{ConcurrentHashMap, DelayQueue, Delayed, TimeUnit} @@ -12,19 +12,19 @@ import java.util.concurrent.{ConcurrentHashMap, DelayQueue, Delayed, TimeUnit} //case class ChildOrder(parentId: Int, id: Int, ric: String, price: Double, quantity: Int, side: String, account: String, strategy: String, exchange: String, ccy: String, volLimit: Double, filledQty: Int, openQty: Int, averagePrice: Double, status: String) trait OrderListener { - def onNewParentOrder(parentOrder: ParentOrder) + def onNewParentOrder(parentOrder: ParentOrder): Unit - def onAmendParentOrder(parentOrder: ParentOrder) + def onAmendParentOrder(parentOrder: ParentOrder): Unit - def onCancelParentOrder(parentOrder: ParentOrder) + def onCancelParentOrder(parentOrder: ParentOrder): Unit - def onDeleteParentOrder(parentOrder: ParentOrder) + def onDeleteParentOrder(parentOrder: ParentOrder): Unit - def onNewChildOrder(child: ChildOrder) + def onNewChildOrder(child: ChildOrder): Unit - def onAmendChildOrder(child: ChildOrder) + def onAmendChildOrder(child: ChildOrder): Unit - def onCancelChildOrder(child: ChildOrder) + def onCancelChildOrder(child: ChildOrder): Unit } trait DelayQueueAction extends Delayed { @@ -137,35 +137,35 @@ class ParentChildOrdersModel(implicit clock: Clock, OrderPermission("HT", PermissionSet.HighTouchPermission) ) - def registerOrderListener(listener: OrderListener) = { + def registerOrderListener(listener: OrderListener): Unit = { listeners = listeners ++ List(listener) } - def notifyOnParentInsert(parentOrder: ParentOrder) = { + def notifyOnParentInsert(parentOrder: ParentOrder): Unit = { listeners.foreach(l => l.onNewParentOrder(parentOrder)) } - def notifyOnChildInsert(childOrder: ChildOrder) = { + def notifyOnChildInsert(childOrder: ChildOrder): Unit = { listeners.foreach(l => l.onNewChildOrder(childOrder)) } - def notifyOnChildAmend(childOrder: ChildOrder) = { + def notifyOnChildAmend(childOrder: ChildOrder): Unit = { listeners.foreach(l => l.onAmendChildOrder(childOrder)) } - def notifyOnChildCancel(childOrder: ChildOrder) = { + def notifyOnChildCancel(childOrder: ChildOrder): Unit = { listeners.foreach(l => l.onCancelChildOrder(childOrder)) } - def notifyOnParentAmend(parentOrder: ParentOrder) = { + def notifyOnParentAmend(parentOrder: ParentOrder): Unit = { listeners.foreach(l => l.onAmendParentOrder(parentOrder)) } - def notifyOnParentCancel(parentOrder: ParentOrder) = { + def notifyOnParentCancel(parentOrder: ParentOrder): Unit = { listeners.foreach(l => l.onCancelParentOrder(parentOrder)) } - def notifyOnParentDelete(parentOrder: ParentOrder) = { + def notifyOnParentDelete(parentOrder: ParentOrder): Unit = { listeners.foreach(l => l.onDeleteParentOrder(parentOrder)) } @@ -193,7 +193,7 @@ class ParentChildOrdersModel(implicit clock: Clock, } } - def processOneAction(action: DelayQueueAction) = { + def processOneAction(action: DelayQueueAction): Unit = { action match { case InsertParent(parent, _, _, childCount) => notifyOnParentInsert(parent) diff --git a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentOrdersProvider.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentOrdersProvider.scala index dbc3df289..c024440cc 100644 --- a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentOrdersProvider.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/ParentOrdersProvider.scala @@ -3,8 +3,8 @@ package org.finos.vuu.core.module.simul.provider import org.finos.toolbox.lifecycle.LifecycleContainer import org.finos.toolbox.thread.LifeCycleRunner import org.finos.toolbox.time.Clock +import org.finos.vuu.core.module.simul.model.{ChildOrder, ParentOrder} import org.finos.vuu.core.table.{DataTable, RowWithData} -import org.finos.vuu.data.order.{ChildOrder, ParentOrder} import org.finos.vuu.provider.Provider class ParentOrdersProvider(val table: DataTable, val model: ParentChildOrdersModel)(implicit clock: Clock, lifecycleContainer: LifecycleContainer) extends Provider { @@ -31,11 +31,11 @@ class ParentOrdersProvider(val table: DataTable, val model: ParentChildOrdersMod override def onCancelChildOrder(child: ChildOrder): Unit = {} }) - def processDelete(po: ParentOrder) = { + def processDelete(po: ParentOrder): Unit = { table.processDelete(po.id.toString) } - def processUpsert(po: ParentOrder) = { + def processUpsert(po: ParentOrder): Unit = { //id: Int, ric: String, price: Double, quantity: Int, side: String, account: String, exchange: String, ccy: String, algo: String, volLimit: Double, filledQty: Int, openQty: Int, averagePrice: Double, status: String table.processUpdate(po.id.toString, RowWithData(po.id.toString, Map("id" -> po.id.toString, "idAsInt" -> po.id, "ric" -> po.ric, "price" -> po.price, "quantity" -> po.quantity, "side" -> po.side, "account" -> po.account, "exchange" -> po.exchange, "ccy" -> po.ccy, diff --git a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/PermissionedOrdersProvider.scala b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/PermissionedOrdersProvider.scala index d041f72c2..960e410ef 100644 --- a/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/PermissionedOrdersProvider.scala +++ b/example/order/src/main/scala/org/finos/vuu/core/module/simul/provider/PermissionedOrdersProvider.scala @@ -3,8 +3,8 @@ package org.finos.vuu.core.module.simul.provider import org.finos.toolbox.lifecycle.LifecycleContainer import org.finos.toolbox.thread.LifeCycleRunner import org.finos.toolbox.time.Clock +import org.finos.vuu.core.module.simul.model.{ChildOrder, ParentOrder} import org.finos.vuu.core.table.{DataTable, RowWithData} -import org.finos.vuu.data.order.{ChildOrder, ParentOrder} import org.finos.vuu.provider.Provider class PermissionedOrdersProvider(val table: DataTable, val model: ParentChildOrdersModel)(implicit clock: Clock, lifecycleContainer: LifecycleContainer) extends Provider { @@ -31,11 +31,11 @@ class PermissionedOrdersProvider(val table: DataTable, val model: ParentChildOrd override def onCancelChildOrder(child: ChildOrder): Unit = {} }) - def processDelete(po: ParentOrder) = { + def processDelete(po: ParentOrder): Unit = { table.processDelete(po.id.toString) } - def processUpsert(po: ParentOrder) = { + def processUpsert(po: ParentOrder): Unit = { //id: Int, ric: String, price: Double, quantity: Int, side: String, account: String, exchange: String, ccy: String, algo: String, volLimit: Double, filledQty: Int, openQty: Int, averagePrice: Double, status: String table.processUpdate(po.id.toString, RowWithData(po.id.toString, Map("id" -> po.id.toString, "idAsInt" -> po.id, "ric" -> po.ric, "price" -> po.price, "quantity" -> po.quantity, "side" -> po.side, "account" -> po.account, "exchange" -> po.exchange, "ccy" -> po.ccy, diff --git a/example/pom.xml b/example/pom.xml index f8c9f9860..1b186edf6 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -20,9 +20,8 @@ price basket main-java - data-order - data-ignite virtualized-table + apache-ignite diff --git a/plugin/ignite-plugin/pom.xml b/plugin/ignite-plugin/pom.xml index b848a199f..9758a6a2d 100644 --- a/plugin/ignite-plugin/pom.xml +++ b/plugin/ignite-plugin/pom.xml @@ -20,6 +20,24 @@ 0.9.61-SNAPSHOT + + org.apache.ignite + ignite-core + 2.16.0 + + + + org.apache.ignite + ignite-calcite + 2.16.0 + + + + org.apache.ignite + ignite-slf4j + 2.16.0 + + org.finos.vuu vuu diff --git a/plugin/ignite-plugin/src/test/scala/org/finos/vuu/feature/ignite/IgniteTestStore.scala b/plugin/ignite-plugin/src/test/scala/org/finos/vuu/feature/ignite/IgniteTestStore.scala index 741a52067..2a0380cb9 100644 --- a/plugin/ignite-plugin/src/test/scala/org/finos/vuu/feature/ignite/IgniteTestStore.scala +++ b/plugin/ignite-plugin/src/test/scala/org/finos/vuu/feature/ignite/IgniteTestStore.scala @@ -7,7 +7,6 @@ import org.apache.ignite.cache.query.{IndexQuery, IndexQueryCriteriaBuilder, Ind import org.apache.ignite.cluster.ClusterState import org.apache.ignite.configuration.{CacheConfiguration, IgniteConfiguration} import org.apache.ignite.lang.IgniteBiPredicate -import org.finos.vuu.data.order.ChildOrder import java.util import scala.collection.mutable diff --git a/vuu/src/main/resources/runconfigurations/Run All Tests.run.xml b/vuu/src/main/resources/runconfigurations/Run All Tests.run.xml index c6c8fd08f..89ce4cc59 100644 --- a/vuu/src/main/resources/runconfigurations/Run All Tests.run.xml +++ b/vuu/src/main/resources/runconfigurations/Run All Tests.run.xml @@ -7,92 +7,6 @@