Git Product home page Git Product logo

akka-quickstart-scala.g8's Introduction

Akka Quickstart with Scala

Quickstart guide

This example is described in the Akka Quickstart with Scala guide

The Hello World example illustrates Akka basics. Within 30 minutes, you should be able to download and run the example and use this guide to understand how the example is constructed. This will get your feet wet, and hopefully inspire you to dive deeper into the wonderful sea of Akka!

Giter8 template

It can also be used as a Giter8 template for Akka with Scala.

Prerequisites:

Open a console and run the following command to apply this template:

sbt new akka/akka-quickstart-scala.g8

This template will prompt for the name of the project. Press Enter if the default values suit you.

Once inside the project folder, run the application with:

sbt run

Template license

Written in 2019 by Lightbend, Inc.

To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this template to the public domain worldwide. This template is distributed without any warranty. See http://creativecommons.org/publicdomain/zero/1.0/.

The Akka family of projects is managed by teams at Lightbend with help from the community.


License

Akka is licensed under the Business Source License 1.1, please see the Akka License FAQ.

akka-quickstart-scala.g8's People

Contributors

2m avatar aludwiko avatar beritou avatar chbatey avatar corruptmemory avatar eed3si9n avatar ennru avatar fvkluck avatar gavinbaumanis avatar havocp avatar henrikengstrom avatar ignasi35 avatar iref avatar jiminhsieh avatar jlprat avatar johanandren avatar jsuereth avatar kelvin-trambadiya avatar ktoso avatar marcoderama avatar octonato avatar patriknw avatar pawanaraballi avatar raboof avatar rstento avatar ryanhanks avatar sebastian-alfers avatar thothmoses avatar warry avatar yuuri111 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

akka-quickstart-scala.g8's Issues

Update to Tech Hub guide content and this README

Project Kickstarter homepage will be changed. Please replace the links in the README and in the doc index page to the location of the zipped files. https://developer.lightbend.com/guides/akka-quickstart-scala/

Change this:

"Download and unzip the example:

Download the zip file from Lightbend Tech Hub(https://developer.lightbend.com/start/?group=akka&project=akka-quickstart-scala) by clicking CREATE A PROJECT FOR ME.
Extract the zip file to a convenient location:"

To this:

"Download and extract the zip file(https://example.lightbend.com/v1/download/akka-quickstart-scala?name=akka-quickstart-scala) to a convenient location:"

use string interpolation

Because our scala files are being run through the g8 templating engine now (to set the package name correctly), using $ signs in the code is now problematic.

While the $ signs can be escaped as \$, paradox does not pick up on this.

Should we find a way to post-process the snippet in paradox?

Clean up Hello World references in quickstart

Documentation with issue

Akka Quickstart Scala docs:
https://developer.lightbend.com/guides/akka-quickstart-scala/define-actors.html

Expected Behavior

The documentation should largely correspond to the example code, e.g. "Akka Quick Start" actors or Greeter actors, especially where specific object names from the code are concerned.

Actual Behavior

The documentation contains references to Hello, "Hello World", HelloWorld etc, which seem to be from a prior incarnation of a quick start Hello World example. (References to the example as being "Hello World"-like are probably natural enough, it's more the specific object names in the documentation that should be in synch with the example.)

I am intending to read / work through these docs myself, so would be happy to fork and make some proposed updates in the process, if that'd be welcome.

Creating new sbt project and compile error Caught java.io.IOException: Server returned HTTP response code: 400 for URL: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_2.13/maven

I just downloaded the latest version of this template and I am getting this error when trying to compile the akka quickstart:

sbt:akka-quickstart-scala> compile
[info] Updating 
[info] Resolved  dependencies
[warn] 
[warn] 	Note: Unresolved dependencies path:
[error] stack trace is suppressed; run last update for the full output
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.typesafe.akka:akka-actor-typed_2.13:maven(com.typesafe.akka, akka-actor_2.13, stable)
[error]   Not found
[error]   Not found
[error]   not found: /Users/blah/.ivy2/local/com.typesafe.akka/akka-actor-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/ivys/ivy.xml
[error]   download error: Caught java.io.IOException: Server returned HTTP response code: 400 for URL: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/akka-actor-typed_2.13-maven(com.typesafe.akka, akka-actor_2.13, stable).pom (Server returned HTTP response code: 400 for URL: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/akka-actor-typed_2.13-maven(com.typesafe.akka, akka-actor_2.13, stable).pom) while downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/akka-actor-typed_2.13-maven(com.typesafe.akka, akka-actor_2.13, stable).pom
[error] Error downloading com.typesafe.akka:akka-actor-testkit-typed_2.13:maven(com.typesafe.akka, akka-actor_2.13, stable)
[error]   Not found
[error]   Not found
[error]   not found: /Users/blah/.ivy2/local/com.typesafe.akka/akka-actor-testkit-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/ivys/ivy.xml
[error]   download error: Caught java.io.IOException: Server returned HTTP response code: 400 for URL: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-testkit-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/akka-actor-testkit-typed_2.13-maven(com.typesafe.akka, akka-actor_2.13, stable).pom (Server returned HTTP response code: 400 for URL: https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-testkit-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/akka-actor-testkit-typed_2.13-maven(com.typesafe.akka, akka-actor_2.13, stable).pom) while downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor-testkit-typed_2.13/maven(com.typesafe.akka, akka-actor_2.13, stable)/akka-actor-testkit-typed_2.13-maven(com.typesafe.akka, akka-actor_2.13, stable).pom
[error] Total time: 0 s, completed 5-Mar-2020 8:30:34 PM

Update sbt version to 1.3.6

The current readme shows

sbt -Dsbt.version=0.13.17 new akka/akka-quickstart-scala.g8

and the build.properties, has;

sbt.version=1.1.6

These two versions are not the same and a lagging behind the latest release, 1.3.6

Attribute name undefined

Can't get this working. Breaks with the following error.

Exiting due to error in the template
File: /var/....../src/main/g8/build.sbt, context [anonymous] 9:14 internal error:
org.stringtemplate.v4.compiler.STException: context [anonymous] 9:14 attribute name isn't defined

Bug in new QuickStart Guide

Reported by Ruth in akka/akka#23149

In the section that describes how to run Hello World, it says:
To run Hello World:

In a console, change directories to the top level of the unzipped project.

For example, if you extracted the project to your root directory, from the root directory, enter: cd akka-scala-seed

The default name is now akka-quickstart-scala, so the previous text should be changed to:

For example, if you used the default project name, akka-quickstart-scala, and extracted the project to your root directory, from the root directory, enter: cd akka-quickstart-scala

I assume the same is true for the Java example but I haven't tested it yet.

Won't run with OpenJDK 11.0.8

Per build.sbt:
scalaVersion := "2.13.1"
akkaVersion = "2.6.10"

This was run on Xubuntu 18.04 with OpenJDK 11.0.8.

To get a quickstart zip, I followed the directions at the Lightbend Tech Hub

When I tried to run sbt, there was an error message that at least Java 1.6+ was required. Somehow 11.0.8 was seen as less than 1.6 . I commented out the version check and everything ran fine.

Perhaps this is actually an issue with sbt, but the end result is that without poking around in sbt-dist/bin/sbt-launch-lib.bash, I wouldn't have been able to run the quickstart example.

CC0 license

I am currently working on a backend component (still WIP) based on this template that I would like to release under the MIT license. However, I have had trouble finding information whether this is possible. In other words: can I release a project under the MIT license even if it is a derived work from a template released under the CC0?

I tried to find some information related to this, but did not find anything conclusive. Below are some comments/links I found.

  • It seems CC0 is not approved by the OSI. They also recommend At this time, we do not recommend releasing software using the the CC0 public domain dedication.
  • I probably do not understand all the issues related to this correctly (and IANAL). However, the MIT license specifically grant the right to sublicense the code. However, part 3 (Public License Fallback) in the CC0 text mentions that the fallback license is "non sublicensable". However, according to gnu.org, the CC0 (and the Public License Fallback) are compatible with the GNU GPL. Related discussion.

Changed Packages not updated in tests

When running the template you are asked for an organisational name / package path.
E.g. com.example.

if you change this to something else, the "package" declarations are updated as expected.
However the imports in the test are not;

I,.e. if change the package to "com.bob"

The test looks like this;

package com.bob

import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit
import com.example.Greeter.Greet
import com.example.Greeter.Greeted
import org.scalatest.WordSpecLike

import com.example.Greeter.Greet
import com.example.Greeter.Greeted

have both NOT been updated to reflect the changed package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.