eloots / Pi-Akka-Cluster

Apache License 2.0
124 stars 33 forks source link

Added initial display labs #130

Closed agolubev closed 4 years ago

agolubev commented 4 years ago

Not sure if this is ready to be merged as is so waiting for feedback. Added three exercises with display: cluster only, sharding and CRDT. Added as 101-103 exercises. Put together a simple description with wire connection schemas. Perhaps need to add step by step instructions Display control software is on Java using Pi4J. It uses a simple image to font logic

agolubev commented 4 years ago

checked on Pi installation with

eloots commented 4 years ago

@agolubev Totally missed your review request. Will look into this asap.

agolubev commented 4 years ago

Thank you. Let me check. Maybe I forgot to commit something

Sent from my iPhone

On Dec 16, 2019, at 9:13 AM, Eric Loots notifications@github.com wrote:

 @eloots commented on this pull request.

@agolubev I will review the PR in detail, but I did a quick test on one of my clusters:

built and copied exercise 101 using universal:packageBin ran exercise 101 on node-1 and got the following: Dec 16, 2019 2:08:21 PM com.pi4j.util.NativeLibraryLoader load SEVERE: Unable to load [libpi4j.so] using path: [/lib/raspberrypi/dynamic/libpi4j.so] java.lang.UnsatisfiedLinkError: /tmp/libpi4j3291842511742865533.so: libwiringPi.so: cannot open shared object file: No such file or directory at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method) at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430) at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487) at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617) at java.base/java.lang.Runtime.load0(Runtime.java:767) at java.base/java.lang.System.load(System.java:1834) at com.pi4j.util.NativeLibraryLoader.loadLibraryFromClasspath(NativeLibraryLoader.java:159) at com.pi4j.util.NativeLibraryLoader.load(NativeLibraryLoader.java:105) at com.pi4j.wiringpi.Gpio.(Gpio.java:189) at com.pi4j.io.gpio.RaspiGpioProvider.(RaspiGpioProvider.java:64) at eroled.BasicOLED.(BasicOLED.java:37) at eroled.SmartOLED.(SmartOLED.java:29) at com.lightbend.akka_oled.ClusterNodeStatus.(ClusterNodeStatus.scala:44) at com.lightbend.akka_oled.ClusterNodeStatus$.$anonfun$props$1(ClusterNodeStatus.scala:38) at akka.actor.TypedCreatorFunctionConsumer.produce(IndirectActorProducer.scala:91) at akka.actor.Props.newActor(Props.scala:212) at akka.actor.ActorCell.newActor(ActorCell.scala:648) at akka.actor.ActorCell.create(ActorCell.scala:674) at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:547) at akka.actor.ActorCell.systemInvoke(ActorCell.scala:569) at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:293) at akka.dispatch.Mailbox.run(Mailbox.scala:228) at akka.dispatch.Mailbox.exec(Mailbox.scala:241) at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) Seems there's a shared library missing (libpi4j.so)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

eloots commented 4 years ago

Thank you. Let me check. Maybe I forgot to commit something

@agolubev Got exercise 101 running. Updated comment above.

agolubev commented 4 years ago

@eloots updated this branch. Please check when you have time.

agolubev commented 4 years ago

@eloots I was not aware of course management restrictions. Thanks for the explanation

agolubev commented 4 years ago

@eloots add changes per your feedback regarding eliminating commonDisplay

eloots commented 4 years ago

@agolubev I can't verify the display based exercises as I don't have access to the OLED display you're using. Looks good though, but wouldn't it be a good idea to migrate the status tracker to Akka Typed? The base exercise (base_cluster) has been migrated and merged on master (exercise 60 at the time of writing). It has a generic ClusterStatusTracker that allows for a specific visualiser to subscribe to cluster status updates. I wrote a specific visualiser for the LED strips - you could do the same for the OLED visualiser. There's also PR #136 which has versions of all but two exercises moved to Akka Typed. If you can do this, we can phase out Akka Classic on this repo. It's ready for review.

eloots commented 4 years ago

@agolubev I propose to merge this when you resolve the merge conflicts on build.sbt. I would move the version of akka-pi-os.yml for the OLED display to akka-pi-os-display.yml. Moving to an Akka Typed version can then be done in a separate step.

agolubev commented 4 years ago

@eloots I rebased and resolved all conflicts. Also created akka-pi-os-display.yml. Can you approve it so I can go forward with merge?