This document provides an introduction to concurrent programming with Akka Actors. It discusses concurrency and parallelism, how the end of Moore's Law necessitated a shift to concurrent programming, and introduces key concepts of actors including message passing concurrency, actor systems, actor operations like sending messages, and more advanced topics like routing, supervision, testing, configuration and remote actors.
Improving Mobile Payments With Real time Sparkdatamantra
Talk about real world spark streaming implementation for improving mobile payments experience. Presented at Target data meetup at Bangalore by Madhukara Phatak on 22/08/2015.
Anatomy of Data Source API : A deep dive into Spark Data source APIdatamantra
In this presentation, we discuss how to build a datasource from the scratch using spark data source API. All the code discussed in this presentation available at https://github.com/phatak-dev/anatomy_of_spark_datasource_api
Improving Mobile Payments With Real time Sparkdatamantra
Talk about real world spark streaming implementation for improving mobile payments experience. Presented at Target data meetup at Bangalore by Madhukara Phatak on 22/08/2015.
Anatomy of Data Source API : A deep dive into Spark Data source APIdatamantra
In this presentation, we discuss how to build a datasource from the scratch using spark data source API. All the code discussed in this presentation available at https://github.com/phatak-dev/anatomy_of_spark_datasource_api
my attempt to demystify datastores.
how to choose a store that fits your needs what are the questions you need to ask ?
hbase hadoop mysql cassandra vertica etc
Using the new extended Berkley Packet Filter capabilities in Linux to the improve performance of auditing security relevant kernel events around network, file and process actions.
INTEGRATED PLATFORM FOR DATA AND CONTAINERS
Mesosphere Enterprise DC/OS includes everything you need to elastically run containerized apps and data services in production.
Сергей Радзыняк ".NET Microservices in Real Life"Fwdays
На доповіді ми розглянемо на прикладі діючої фінансової системи наступні моменти:
- поточну архітектуру системи. Як і чому ми перейшли з моноліта на мікросервіси
- компоненти системи (MsSQL, MongoDB, RabbitMQ, Redis, Hangfire, AWS S3 Bucket, і деякі інші), критерії їх вибору і -
- труднощі, які виникли при роботі з ними
міжкомпонентну взаємодію
- бібліотеки і практики, які використовуються для побудови мікросервісів системи
- розглянемо декілька функціональних ланцюжків системи. -- Розповім про труднощі, які виникли при їх дизайні і впровадженні
A presentation about deploy, scaling and the coordination problem. We will focus on redis as a coordination system in order to simplify the migration to ETCd as coordination system
Data Pipelines in Hadoop - SAP Meetup in Tel Aviv larsgeorge
This talk is about showing the complexity in building a data pipeline in Hadoop, starting with the technology aspect, and the correlating to the skillsets of current Hadoop adopters.
Scalable caching in Drupal is broken. Once cache access saturates a network link, the main options are Memcache sharding (which has broken coherency during and after network splits) and Redis clustering (immature in multi-master and as complex as MySQL replication in master/replica modes).
We can do better. We can have better performance, scale, and operational simplicity. We just need to take a lesson from multicore processor architectures and their use of L1/L2 caches. Drupal doesn't even need full-scale coherency management; it just needs the cache writes on an earlier request to be guaranteed readable on a later request.
Building stateful systems with akka cluster shardingKnoldus Inc.
We’re at another juncture in enterprise computing where there is a large push behind a big vision of the future, the push towards serverless architectures—a world where less human oversight and participation is required in operations.
At this time, serverless computing is so hot right now. A promise of ‘Opsless’, cloud-native, pay-for-what-you-use functions does sound great, but the current incarnation of serverless that most people think of–Function as a Service (FaaS)–is limited to ephemeral, stateless, and short-lived functions. Amazon Lambda caps their lifespan to 15 minutes, for example.
This is not what we need out of a general platform for building modern real-time, data-centric applications and systems. What we do need are scalable, stateful services that can operate on cloud infrastructure as if they are stateless.
Explore how to make your next application stateful, providing a better understanding of the technology landscape, challenges and pitfalls, and successful methods with Akka Cluster Sharding
An actor is an object that receives messages and takes actions to handle them. It is decoupled from the source of the message and its only responsibility is to properly recognise the type of message it has received and take action accordingly.
In this video you are going to learn what is an operator in Apache Airflow. There are multiple kinds of operator such as Action Operator, Sensor Operator and Transfer Operator and it's important to know why and when to use one over another.
If you want to access to the entire course and support my work go to
https://www.udemy.com/the-complete-hands-on-course-to-master-apache-airflow/?couponCode=YOUTUBE-AIRFLOW
Thank you very much and have a good learning day :)
New abstractions for concurrency make writing programs easier by moving away from threads and locks, but debugging such programs becomes harder. The call-stack, an essential tool in understanding why and how control flow reached a certain point in the program, loses meaning when inspected in traditional debuggers. Futures, actors or iteratees make code easier to write and reason about, and in this talk I'll show a simple solution to make them easier to debug. The tool I present integrates well with the Eclipse plugin for Scala, and shows how a "reactive debugger" might look like.
Essa apresentação consiste em uma introdução à linguagem de programação Elixir desde a sintaxe ao ecossistema. Elixir é funcional, tem suporte a concorrência e paralelismo e tolerância a falhas, entre outras features.
This third part of Linux internals talks about Thread programming and using various synchronization mechanisms like mutex and semaphores. These constructs helps users to write efficient programs in Linux environment
Reactive mistakes - ScalaDays Chicago 2017Petr Zapletal
Reactive applications are becoming a de-facto industry standard and, if employed correctly, toolkits like Lightbend Reactive Platform make the implementation easier than ever. But design of these systems might be challenging as it requires particular mindset shift to tackle problems we might not be used to. In this talk we’re going to discuss the most common things I’ve seen in the field that prevented applications to work as expected. I’d like to talk about typical pitfalls that might cause troubles, about trade-offs that might not be fully understood or important choices that might be overlooked including persistent actors pitfalls, tackling of network partitions, proper implementations of graceful shutdown or distributed transactions, trade-offs of micro-services or actors and more.
This talk should be interesting for anyone who is thinking about, implementing, or have already deployed reactive application. My goal is to provide a comprehensive explanation of common problems to be sure they won’t be repeated by fellow developers. The talk is a little bit more focused on Lightbend platform but understanding of the concepts we are going to talk about should be beneficial for everyone interested in this field.
Concurrency Programming in Java - 01 - Introduction to Concurrency ProgrammingSachintha Gunasena
This session discusses a basic high-level introduction to concurrency programming with Java which include:
programming basics, OOP concepts, concurrency, concurrent programming, parallel computing, concurrent vs parallel, why concurrency, real world example, terms, Moore's Law, Amdahl's Law, types of parallel computation, MIMD Variants, shared memory model, distributed memory model, client server model, scoop mechanism, scoop preview - a sequential program, in a concurrent setting - using scoop, programming then & now, sequential programming, concurrent programming,
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
2. ● Shashank L
● Senior Software engineer at Tellius
● Part time big data consultant and trainer
at datamantra.io
● www.shashankgowda.com
3. Concurrency
● Concurrency is the decomposability property of a
program, algorithm, or problem into order-independent or
partially-ordered components or units
● Structure a program by breaking it into pieces that can be
executed independently
● Co ordinating the execution of independent pieces
4. Concurrency and parallelism
● Concurrency is dealing with more than one thing at once
● Parallelism is doing more than one thing at once
Given tasks T1 and T2
T1 may be executed and finished before T2 or vice versa
(serial and sequential)
T1 and T2 may be executed alternately
(serial and concurrent)
T1 and T2 may be executed simultaneously at the same instant of time
(parallel and concurrent)
5. Concurrency is not parallelism
● Queues can be thought of
processed/threads
● Vending machine is
processor core
6. Moore’s law
The number of transistors on a chip doubles approximately
every 2 years.
~ Gordon Moore, 1965
7. Free performance lunch
● Over 30 years till 2000, performance gains were in 3
areas
○ Clock speed
○ Execution optimization
○ Caching
Old applications have always run significantly faster
even without being recompiled
8. Moore’s law
● Early 2000
○ Chips got big, transistors were added aggressively
○ Clock cycle was almost unchanged
○ Heat dissipation issues
○ Power consumption
○ Current leakage
10. Birth of Multicore processors
● Multi-core processors
● Handle multiple operations in parallel
● CPU speeds are not increasing drastically anytime soon
● No free performance lunch without significant redesign
● Performance gains in new chips will be fueled by three main
approaches
○ Hyperthreading
○ Multicore
○ cache
11. Free performance lunch is over
● Concurrency revolution
● Build multi core aware applications
● Operate in concurrent fashion
● Scale horizontally
12. Types of Concurrency
● Shared state concurrency
● Software transactional concurrency
● Message passing concurrency
13. Shared state concurrency
● Shared mutability
● Memory blocks can be access simultaneously by multiple
programs
● Race condition
● Dead locks
● Blocking calls
com.shashank.akka.basic.ThreadUnsafeBuffer
14. Software transactional memory
● Shared, managed mutability
● Objects can be mutated only within a transaction
● STM keeps track of changes made in a particular
● Once transaction is completed, it validates and commits the
results
● Validation fails when others have committed the result
● Transaction will be repeated with the updated value.
15. Message passing concurrency
● Isolated mutability
● Mutable objects are isolated from the threads
● Threads will not be able to directly access the objects
● Access to the mutable objects is done through messages
● Sending message can be asynchronous and nonblocking
16. Joe Armstrong’s words
The world is concurrent. It is parallel. Pure message-passing
concurrency is what we do all the time.
Imagine a group of people. They have no shared state.
I have my private memory (in my head) and you have yours. It is NOT
shared. We communicate by passing messages (sound and light
waves). We update our private state based on the reception of these
messages.
That’s Concurrency Oriented Programming in a nutshell.
17. Actors
● From a 1973 paper, written by Carl Hewitt
● First major adoption was done by Ericsson in 80s
○ Invented Erlang and open sourced in 90s
○ Built a distributed, concurrent, and fault-tolerant telcom
system which has 99.9999999% uptime
● Implements Message-Passing or Isolated mutability based
concurrency
18. Actor model
● Share Nothing
○ No need to synchronize.
● Isolated. Lightweight event-based Processes
○ ~ 6.5m on 4GB RAM
● Communicate through Messages
○ Asynchronous and Nonblocking
○ Messages are immutable
● Each actor has a mailbox (message queue)
● Scalable and fast
19. When an Actor receives messages
● Creates new actors
● Send message to other actors/self
● Designate how it should handle the next
message
20. Akka
● Founded by Jonas Boner and now part of Typesafe stack
● Actor implementation on JVM - Scala
○ Java API and Scala API
● Provides a framework to create & manage actors
● Backed by JVM Thread model
● Akka provides a mailbox for each actor
○ in-memory queue to stage messages
● Clients can send messages synchronously or
asynchronously
● Actor receives messages and respond to clients
21.
22. Actor System
● Actors are created within this context
● Fundamental unit that embodies:
Processing, storage and communication
● Manage shared facilities:
scheduling, logging, configuration etc
● Can have many per JVM with different configs
● Can contain millions of actors
25. CREATE
val system = ActorSystem("LogSystem")
val loggerActor = system.actorOf(
Props[LoggerActor],
name = "loggeractor")
26. SEND
● Fire and forget
○ Async
○ No expected reply
○ ! or tell()
● Send and Receive
○ Async
○ Expects reply (Future)
○ ? or ask()
27. SEND - Fire and forget
//No need to return anything in the receive method
def receive = {
case x:Int => println(x)
}
//Send the message and don’t wait for the reply
actorRef ! (100)
com.shashank.akka.basic.SimpleActor
28. SEND - Send and receive
//Use the sender method to get the actorRef of the sender
def receive = {
case "hello" =>
sender() ! ("hello how are you?")
}
//Send the message and get a future back, we can wait for that future to be successful to get
the result
val responseFuture = bufferActor ? ("hello")
responseFuture onSuccess{
case response => println(response)
}
com.shashank.akka.basic.ThreadSafeBuffer
32. BECOME
● Dynamically redefines actor behaviour
● Reactively triggered by message
● Like changing an interface or implementation on-the-fly
com.shashank.akka.basic.ThreadSafeBufferWithLimit
33. How error handling is done in Java
● You are given a single thread of control
● If this thread blows up, you are screwed
● So you need to do all explicit error handling within this single
thread
● Errors do not propagate between threads
● This leads to Defensive programming with
○ Error handling tangled with business logic
○ Error handling scattered all over the code
34. SUPERVISE
● Manage another actor’s failure
● Supervisor receives notification
and it can react upon failure
● Every actor has a default
supervisor strategy
○ Can be overridden
35. SUPERVISE
● On Failure, Supervisor decides what happens next
○ Resume child and keep the internal state
○ Restart child and wipe the internal state
○ Stop child permanently
○ Stop itself and escalate the error
● OneForOneStrategy affects only failed child
● AllForOneStrategy affects all the children
com.shashank.akka.supervision.BasicSupervision
41. Stopping Actors
//Shutting down the Actor System
system.shutdown()
//Sending PoisonPill message
actorRef ? (PoisonPill)
//Shutting the actor from inside the actor
context.stop(self)
//Shutting another actor from inside the actor
context.stop(actorRef)
com.shashank.akka.basic.ShuttingDown
42. Message delivery
● At most once - No guaranteed delivery
● Cheapest
● Highest performance
● Least implementation overhead
● It can be done in a fire-and-forget fashion without keeping
state at the sending end or in the transport mechanism
● At least once - Akka persistence
44. Dispatcher
● Controls and coordinates the message dispatching to the
actors
● Make sure that the resources are optimized and messages
are processed as fast as possible
● Dispatch policies that can be customized(number of cores or
memory available)
48. ● Entity that directs the message from source to the destination actor
● Router is also a type of actor
● Does not make use of the store-and-forward mechanism
● Routers dispatch the incoming messages directly to the destination
actor’s mailboxes
system.actorOf(Props[MyActor].withRouter(RoundRobinRouter(nrOfInstances = 5)))
Routers
49. ● Round robin router
It routes the incoming messages in a circular order to all its routees
● Random router
It randomly selects a routee and routes the message to the same
● Smallest mailbox router
It identifies the actor with the least number of messages in its mailbox and routes the
message to the same
● Broadcast router
It forwards the same message to all the routees
● Scatter gather first completed router
It forwards the message to all its routees as a future, then whichever routee actor responds
back, it takes the results and sends them back to the caller
com.shashank.akka.basic.Router
Types of Routers
50. def preStart(): Unit = ()
def postStop(): Unit = ()
def preRestart(reason: Throwable, message: Option[Any]): Unit = {
context.children foreach { child ⇒
context.stop(child)
}
postStop()
}
def postRestart(reason: Throwable): Unit = {
preStart()
}
Actor API
51. ● A path is a place that can be occupied by a living actor
● When actorOf() is called it assigns an incarnation of the
actor described by the passed Props to the given path
● An ActorRef always represents an incarnation (path and
UID) not just a given path. Another actor created later with
the same name will have a different ActorRef
// will look up this absolute path
context.actorSelection("/user/serviceA/aggregator")
// will look up sibling beneath same supervisor
context.actorSelection("../joe")
Actor Path
53. ● Consists of 2 parts
○ A public interface
○ An implementation
● Similar to Interface and implements in Java, Traits in
Scala
● TypedActors have a static contract
● Some features like become is not available
● Bridging between actor systems (the “inside”) and
non-actor code (the “outside”)
Typed actors
54. def squareDontCare(i: Int): Unit //fire-forget
def square(i: Int): Future[Int] //non-blocking send-request-reply
def squareNowPlease(i: Int): Option[Int] //blocking send-request-reply
def squareNow(i: Int): Int //blocking send-request-reply
@throws(classOf[Exception]) //declare it or you will get an UndeclaredThrowableException
def squareTry(i: Int): Int //blocking send-request-reply with possible exception
//Creating an actorRef of a TypedActor
val mySquarer: Squarer = TypedActor(system).typedActorOf(TypedProps[SquarerImpl]())
com.shashank.akka.basic.TypedActorExample
Typed actors
55. ● Dedicated module akka-testkit for supporting tests
● Testing isolated pieces of code without involving the actor
model, meaning without multiple threads
● Testing (multiple) encapsulated actors including
multi-threaded scheduling
● Integration with ScalaTest to write more readable
assertions
com.shashank.akka.supervision.SupervisorTestSpec
Actor TestKit
56. ● All configuration for Akka is held within instances of ActorSystem
● ActorSystem is the only consumer of configuration information
● Parse the configuration file
val config =
ConfigFactory.parseFile(new File("src/main/resources/router/application.conf"))
val system = ActorSystem("NameOfActorSystem", config)
● Read the configuration files automatically from ClassLoader
val config = ConfigFactory.defaultReference()
val system = ActorSystem("NameOfActorSystem", config)
● Parse all application.conf, application.json and application.properties
● akka.log-config-on-start
Configuration - TypeSafe config
57. ● Distributed by default
● Messages should be and are serializable
● ActorRefs are serializable
● Probability of the message reaching is higher than local
JVM
● No separate remoting layer in Akka. Purely driven by
config
● Communication between involved system is symmetric
● Not possible to create pure client-server setups
Remote Actors
59. In different scenarios Actors can be alternatives for:
● A thread
● An object instance or component
● A callback or listener
● A singleton or service
● A router, load-balancer or pool
● An out-of-service process
● A Finite State machine (FSM)
What can I use Actors for?