A comparison from 2 weeks using Go.
Akka's central principle is that there you have an ActorSystem which runs Actors. An Actor is defined as a class and it has a method to receive messages.
| import { ChangeDetectorRef } from '@angular/core'; | |
| import { ComponentFixture } from '@angular/core/testing'; | |
| export async function runOnPushChangeDetection<T>(cf: ComponentFixture<T>) { | |
| const cd = cf.debugElement.injector.get<ChangeDetectorRef>( | |
| // tslint:disable-next-line:no-any | |
| ChangeDetectorRef as any | |
| ); | |
| cd.detectChanges(); | |
| await cf.whenStable(); |
| import org.sonatype.nexus.repository.storage.StorageFacet; | |
| import org.sonatype.nexus.repository.storage.Query; | |
| import org.joda.time.DateTime; | |
| import org.joda.time.format.DateTimeFormat; | |
| def fmt = DateTimeFormat.forPattern('yyyy-MM-dd HH:mm:ss'); | |
| // Get a repository | |
| def repo = repository.repositoryManager.get('nuget-releases'); | |
| // Get a database transaction | |
| def tx = repo.facet(StorageFacet).txSupplier().get(); |
| import org.sonatype.nexus.common.entity.* | |
| import org.sonatype.nexus.security.* | |
| import org.sonatype.nexus.security.authz.* | |
| import org.sonatype.nexus.selector.* | |
| import com.google.common.collect.ImmutableMap | |
| // use container.lookup to fetch internal APIs we need to use | |
| def selectorManager = container.lookup(SelectorManager.class.name) | |
| def securitySystem = container.lookup(SecuritySystem.class.name) |
| enum PatchLevel { | |
| MAJOR, MINOR, PATCH | |
| } | |
| class SemVer implements Serializable { | |
| private int major, minor, patch | |
| SemVer(String version) { | |
| def versionParts = version.tokenize('.') |
| import groovy.json.JsonSlurper | |
| import org.sonatype.nexus.repository.storage.Asset | |
| import org.sonatype.nexus.repository.storage.StorageFacet | |
| def DOCKER_REPOSITORY_NAME = 'docker-hosted' | |
| def dockerRepository = repository.repositoryManager.get(DOCKER_REPOSITORY_NAME) | |
| def dockerBlobStore = blobStore.blobStoreManager.get(dockerRepository.configuration.attributes.storage.blobStoreName) | |
| def storageTx = dockerRepository.facet(StorageFacet.class).txSupplier().get() | |
| try { |
| package main | |
| import ( | |
| "io/ioutil" | |
| "log" | |
| "os" | |
| "os/user" | |
| "strconv" | |
| ) |
curl -X<REST Verb> <Node>:<Port>/<Index>/<Type>/<ID>| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "syscall" | |
| ) | |
| func main() { |
| #!/usr/bin/env python | |
| import json | |
| import os | |
| import requests | |
| def main(): | |
| module = AnsibleModule( | |
| argument_spec=dict( | |
| cert_path=dict(required=True), |