summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-11feat: Add helper methods for req-res patternFabian Mastenbroek
This change adds helper methods for simplifying the request-response pattern commonly used in models.
2020-02-11bug: Guarantee FIFO order of messages in the queueFabian Mastenbroek
This change fixes the issue where messages are not delivered in FIFO order due to the internal priority not guaranteeing insertion order. For now, we fix this issue by adding a unique increasing identifier to each event in the queue.
2020-02-11Merge branch 'chore/gitlab-ci' into 'feat/2.x'Georgios Andreadis
Add support for Gitlab CI See merge request opendc/opendc-simulator!22
2020-02-11chore: Add support for Gitlab CIFabian Mastenbroek
This change adds the configuration of Gitlab CI in order to test on our internal Gitlab instance.
2020-01-19feat: Add support for selecting on receive portsFabian Mastenbroek
This change adds experimental support for selecting on ports. This allows the user to receive messages from multiple channels at the same time.
2020-01-19feat: Add prototype reference implementation of revised APIFabian Mastenbroek
This change adds a prototype implementation of the revised version of the API of version 2.0 of the simulator.
2020-01-19refactor: Introduce revised API design for 2.xFabian Mastenbroek
This change introduces the revised API design for version 2.0 of the OpenDC simulator. This version drops built-in support for Java and instead opts to build on Kotlin coroutines to simplify the API surface. During development of and experimentation with the previous API for version 2.x, we found that the design based on Akka Typed was too limiting and caused too much boilerplate for the models we needed to implement. Essential patterns such as request-response were found to be hard to implement with only a single mailbox. Moveover, limiting each actor's mailbox to a single type hindered composition and often resulted in unchecked casts or the type being changed to `Any`, eliminating the type-safety of the API. In this revised API design, a simulation is now represented as the interplay of logical processes that communicate via multiple message passing channels. We use Kotlin coroutines to describe the behavior of the processes. The API has been design from the start to take into account distributed/parallel simulations by disallowing messages from arbitrary processes, which was possible in the previous design. Instead, the 'communication graph' is known during runtime as procsses must register themselves before being able to send/receive messages to/from channels. We are still figuring out process/channel identity and supervision. Currently, all logical processes run on a single level, instead of being hierachical. However, this might change in the future.
2019-11-29refactor: Rename odcsim-core to odcsim-apiFabian Mastenbroek
This change renames the main module of the odcsim library to odcsim-api, since it mainly contains the interfaces to be used by consumers of the API and implemented by the various frameworks.
2019-11-29chore: Update to Kotlin 1.3.61Fabian Mastenbroek
2019-11-29style: Fix Ktlint errorsFabian Mastenbroek
2019-11-21docs: Move odcsim docs to separate directoryFabian Mastenbroek
2019-11-21chore: Add .gitattributes for Gradle wrapperFabian Mastenbroek
This change ensures that the batch file for invoking the Gradle wrapper is treated as a file with Windows line endings.
2019-11-20chore: Tidy repositoryFabian Mastenbroek
2019-11-20refactor: Move build logic to buildSrcFabian Mastenbroek
2019-05-15docs: Rewrite README for 2.x releaseFabian Mastenbroek
This change gives an overhaul to the README for the release of version 2.x of the simulator.
2019-05-15feat: Add initial version of OpenDC simulation modelFabian Mastenbroek
This change adds the initial version of the port of the OpenDC simulation model to version 2.x of the simulator. The simulation model has been reworked to support immutability and event-driven simulation, with speed-ups up to 75x.
2019-05-15feat: Add unsafe helper method for casting ActorContextFabian Mastenbroek
This change adds a helper method for ActorContext to unsafely cast it to an ActorContext of different type.
2019-05-14bug: Replace initial behavior after starting coroutineFabian Mastenbroek
This change fixes the bug where suspending immediately after launching the coroutine, without replacing the current behavior causes a failure in the BehaviorInterpreter. This is because the initial behavior was not properly set.
2019-05-14feat: Add support for Async Stacktraces in IntelliJFabian Mastenbroek
2019-05-14feat: Add support for stashing messagesFabian Mastenbroek
This change adds a StashBuffer to stash messages temporarily for processing at a later moment.
2019-05-14refactor: Make actor spawning and stopping behavior consistentFabian Mastenbroek
This change makes the behavior for spawning and stopping a child actor more consistent and better specified in the documentation.
2019-05-14feat: Add support for spawning anonymous childrenFabian Mastenbroek
This change adds support for spawning anonymous children in an ActorContext. This means a name does not have to be specified when spawning an actor.
2019-05-14feat: Add behavior constructor for timeoutFabian Mastenbroek
This change adds a Behavior constructor for delaying the construction of another Behavior instance.
2019-05-14feat: Add support for watching actor terminationFabian Mastenbroek
This change adds support for tracking termination of actors in the system.
2019-05-14style: Format code according to Ktlint style guideFabian Mastenbroek
This change formats the code according to the style guide of Ktlint.
2019-05-14feat: Add support for timersFabian Mastenbroek
This change adds support for timers in Behavior, in order to simplify sending messages to the `self` actor.
2019-05-14feat: Improve DSL for building BehaviorsFabian Mastenbroek
This change adds methods to improve the composability of multiple Behaviors, such as joining together two behaviors. Furthermore, this change adds methods for juggling with Behavior message types.
2019-05-14feat: Add testkit for testing behaviorFabian Mastenbroek
This change adds a testkit for synchronously testking Behavior implementations.
2019-05-14feat: Provide per-actor loggingFabian Mastenbroek
This change adds an actor-specific logging instance to ActorContext, which allows consumers to log messages via the SLF4J API.
2019-05-13feat: Add proper identify implementation for ActorRefFabian Mastenbroek
2019-05-13feat: Add support for ActorSystem terminationFabian Mastenbroek
This change adds support for terminating an ActorSystem.
2019-05-13chore: Migrate to Kotlin DSL for GradleFabian Mastenbroek
This change migrates the build configuration for Gradle in Groovy to Kotlin, where possible. The scripts in the `gradle/` directory have not been migrated to extensive use of dynamicism.
2019-05-13test: Move implementation test suite into separate packageFabian Mastenbroek
This change moves the implementation conformance test suite from the test sources of `odcsim-core` to a new `odcsim-engine-tests` module in order to simplify Gradle configuration.
2019-05-13chore: Update build dependenciesFabian Mastenbroek
This change updates the build dependencies Kotlin, Dokka, Ktlint and JUnit to more recent versions.
2019-05-13refactor: Require ActorContext for sending messagesFabian Mastenbroek
This change makes it mandatory to send messages to an actor via the sender's ActorContext in order for the engine to maintain consistency in time between actors.
2019-05-13feat: Add initial interface for parallel simulationsFabian Mastenbroek
This change adds the initial interface design for parallel simulations, which requires explicit synchronization between actors in order to establish consistent virtual time between them.
2019-05-13feat: Expose actor context in coroutineFabian Mastenbroek
This change makes a `SuspendingBehavior` instance expose its `SuspendingActorContext` in the coroutine context, so suspending methods inside the coroutine can access the actor context.
2019-05-13feat: Add conversion methods between number and time typesFabian Mastenbroek
This change adds conversion methods from `Number` types into `Instant` and `Duration` instances.
2019-05-13chore: Update build dependenciesFabian Mastenbroek
This change updates the build dependencies to recent released version. These include Kotlin 1.3.21 and ktlint Gradle plugin 7.1.0.
2019-05-13feat: Add consistent exception handling in actor systemsFabian Mastenbroek
This change makes exception handling in actor systems consistent. Implementors should not propagate unhandled exceptions in actors to the (one of the) threads running the engine, but instead should stop the offending actor and continue running. Supervision of actors should be implemented within actor behavior instead. Since BehaviorInterpreter will propagate exceptions thrown by an actor, consumers of that API can use it to catch unhandled exceptions in an actor.
2019-05-13chore: Update JUnit version to 5.3.2Fabian Mastenbroek
This change updates JUnit dependency to version 5.3.2.
2019-05-13chore: Update to Gradle 5.1Fabian Mastenbroek
This change updates the Gradle wrapper that is shipped with the repository to version 5.1.
2019-05-13chore: Add support for project wide documentation generationFabian Mastenbroek
This change adds support for generating documentation for all modules of the repository using Dokka.
2019-05-13feat: Add support for suspending behaviorFabian Mastenbroek
This change adds support for suspending behavior via Kotlin's coroutine feature officially introduced in Kotlin 1.3. The syntax is similar to the 1.x version of the simulator to allow for easier porting to 2.x.
2019-05-13chore: Add linting via KtlintFabian Mastenbroek
This change adds support for linting the code base using ktlint and the excellent ktlint-gradle plugin.
2019-05-13refactor: Add support for deferred and special behaviorFabian Mastenbroek
This change adds support for deferred and special behavior in the Behavior API. Additionally, the new Behavior DSL is implemented using the new primitives to make the tests cleaner.
2019-05-06chore: Move to Kotlin 1.3 official releaseFabian Mastenbroek
This change updates the code base to use the official Kotlin 1.3 release.
2019-05-06test: Create initial test suite for APIFabian Mastenbroek
This change creates the initial conformance test suite for the API design and tries to specify most of the requirements and assumptions made for implementors.
2019-05-06refactor: Introduce initial API design for 2.xFabian Mastenbroek
This change introduces the new API design that will be introduced in the 2.x versions of the OpenDC Simulator. This changes focuses on simplifying simulation primitives provided by the simulator and introduces a new concept of actors based on the model designed by the Akka Typed project. For now, the old simulation models have been removed from the branch, but will be ported back as this branch is being finalized.
2018-07-19refactor: Improve exception handling in processes (#29)Fabian Mastenbroek
This change will improve exception handling of processes. At the moment, when a process throws an uncaught exception, the kernel will catch and log the exception, stop the offending process and then continue. This approach however might cause the user to overlook possible exceptions in processes and does not give any ability to the user for handling these exception. This change modifies the kernel implementation and specification such that the `step()` method (and consequently `run()`) must propagate uncaught exceptions that occur in processes. This allows the caller to control the way exceptions are handled.