This is an excerpt from my book, Hello, Scala. In this lesson I’ll show two examples of applications that use Akka actors, both of which can help you get started with my larger “Alexa written with Akka” = Aleka application.Back to top
An Akka “Hello, world” example
First, let’s look at an example of how to write a “Hello, world” application using Akka.
Writing a “Hello” actor
An actor is an instance of the
akka.actor.Actor class, and once it’s created it starts running on a parallel thread, and all it does is respond to messages that are sent to it. For this “Hello, world” example I want an actor that responds to “hello” messages, so I start with code like this:
I wrote the Scala Cookbook for programmers looking for solutions to common Scala problems, and then wrote Functional Programming, Simplified for programmers looking for a simple way to learn functional programming. A few months ago I decided to finish my Scala trilogy and write a book for programmers who don’t know Scala and want a quick introduction to it. With that, Hello, Scala was born:
It’s still a work in progress, but I’m creating a Hello, Scala website as a simple, quick introduction for those interested in learning Scala.
To create a new book in Drupal 8:
This is a page from my book, “A Survival Guide for New Consultants”
“Grasshopper, know yourself, and never fear thus
to be naked to the eyes of others.
Yet know that man so often masks himself.”
I’m a technical person. I was trained as an Aerospace Engineer, and taught myself to be a computer programmer and systems architect. I don’t really like small talk. I’m an introvert, not a networker. I don’t like networking at all. I don’t even like the word “networking.”
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is the introduction to Chapter 19, Types.
As you can tell from one look at the Scaladoc for the collections classes, Scala has a powerful type system. However, unless you’re the creator of a library, you can go a long way in Scala without having to go too far down into the depths of Scala types. But once you start creating collections-style APIs for other users, you will need to learn them.
Yesterday I created a video tutorial on the Scala REPL and var & val variable types, and today I took a little time to create a new "Hello, world" Scala video tutorial. Without any further ado, here's the video:
If you're in the market for a Scala "Hello, world" tutorial, I hope you like it.
I didn't feel like going out in the rain and snow yesterday here in the Boulder, Colorado area, so I decided to stay indoors and create a video introduction to the Scala REPL and the Scala variable types, var and val. Without any further ado, here's the video:
This OpenSSO tutorial is probably the best "getting started with OpenSSO" tutorial around, but I'll add one caveat to it: Until you know what you're doing, just follow this tutorial to the letter, and I mean to the letter. Specifically, when they say "use Glassfish", you want to use Glassfish, and not something else, like Tomcat.