My Akka.Net Examples that I have created within this solution.
- How to monitor your Akka cluster.
- How to control windows services.
- How to create a job, subscribe to that job and report the status.
- Why you need more than 1 lighthouse to keep cluster intact.
- MORE EXAMPLES TO COME!
I created a recording of the Cluster Monitor and Service Monitor in action. [Example in action!](https://github.com/cgstevens/Akka.Cluster.Monitor/raw/master/Help/ControlAkkaServices.mp4) The example demonstrates the following: * When the windows service stops when you can see the member to leave the cluster. * When the windows service starts you can see the member join the cluster. * When you ask the member to leave you can see the windows service stops.
Remember to start all of the projects up to see the full effect!
Shows the state of the cluster from its point of view.
#####This project has 4 endpoints:
Reports the state of the cluster from its point of view.
The state is scheduled to be sent from the SignalRClusterStatusActor -> SignalR.ClusterStateHub -> Webpage
Get the cluster state from a specific cluster member.
Currently the only member that you can query is the WorkerWebApi.
Demonstrates that you don't need to be part of the cluster to get the information as well as send commands.
Currently the Leave and Down button are not fully wired up and will hopefully be soon.
Displays current jobs running and the status of the work being performed.
This page allows you to see the status of the services and the option to start or stop the services.
Schedules a set of jobs and have those jobs repeat every x seconds.
Create the "Job" which is then deployed onto the Worker node.
Allows other cluster members to subscribe to all Jobs running for status updates.
Plain cluster member ready for the tasker to task work off to.
Demonstrates clean exit when itself is removed from the cluster.
The worker will get a set of records and then process those records.
Report back what the status of the work back to the Tasker.
You can only run one instance of this as the website port is hardcoded.
You must also run it as an adminstrator.
Creating your services similar to this will allow you to view that members current state.
This will allow you to access the ClusterEvent.CurrentClusterState by hitting the endpoint.
Opens the door to be able to send a Leave/Down message to that member through that api.
With having this access to the member my ClusterMonitor has no need to actually be part of
the cluster to view just its state but instead can just request the state from a specific member.
This will disconnect this client to avoid any interuptions with in the cluster perhaps.
Start all of the projects up, then open up your favorite browser and navigate to
http://localhost:8080/api/ClusterStatus/1 This will give you the JSON results of the worker member.
###Lighthouse Added for easy setup of a cluster. You should always run 2 or more.
Contains the messages, shared paths and actors used in the above projects.
###Common Akka Links to help you along with your Akka adventure!
Main Site: http://getakka.net/
The Code (includes basic examples): https://github.com/akkadotnet/getakka.net
Need to ask a question: https://gitter.im/akkadotnet/akka.net
Where do you begin: https://github.com/petabridge/akka-bootcamp
Where do you begin Part2: https://github.com/petabridge/akkadotnet-code-samples
Persistent Actors: https://petabridge.com/blog/intro-to-persistent-actors/