Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okeuday/odroid_fish
Make service requests swim!
https://github.com/okeuday/odroid_fish
cloudi microservice python
Last synced: about 1 month ago
JSON representation
Make service requests swim!
- Host: GitHub
- URL: https://github.com/okeuday/odroid_fish
- Owner: okeuday
- Created: 2015-04-04T20:31:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T22:34:05.000Z (about 1 year ago)
- Last Synced: 2023-10-27T23:26:36.439Z (about 1 year ago)
- Topics: cloudi, microservice, python
- Language: Python
- Homepage:
- Size: 494 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Odroid-C1 Fish for [CloudI](http://cloudi.org)
==============================================Use [`odroid_display`](https://github.com/okeuday/odroid_display/) to
display CloudI service requests as UTF8-art fish on a 16x2 (blue) LCD display.
This is mainly for demonstration purposes and was inspired by
[https://github.com/lericson/fish](https://github.com/lericson/fish)
(which is also in Python).4 Odroid-C1 CloudI nodes are used to demonstrate both local and remote
service request communication, with the "lake" configuration
(Odroid-C1 node positions with 16x2 LCD displays) as:
(node 2) (node 0)
(node 3) (node 1)
The separate CloudI configuration files for each node are provided
along with the fish.py Python CloudI service.Details
-------Each UTF8 fish contains the node integer that created the fish, so the
node integer follows the fish in the LCD display as it swims to other nodes.
The types of fish are shown below (for node 0):>0)°> bass
>←0{{·> salmon
>←0[[[[θ> carpThe fish are JSON data sent within CloudI service requests, with a timeout
that determines the lifetime of the fish. Separate service requests
manage the hatchery and view updates with regular "tick" intervals.The 16x2 LCD display also provides 7 status LEDs below the LCD. These LEDs
are toggled whenever a view update comes from a specific node
(so a view update from node X toggles LED #X on the destination node Y).
Once a fish's position crosses a node boundary, the fish's service request
passes to the remote node (as shown at the end of `FishState.__render_move`).
The internal time kept within the fish's JSON data is reset before the send
to a remote node, since it is assumed that there is no clock synchronization
in-place.Running CloudI with the provided configurations on the 4 Odroid-C1s
(not including a Netgear GS108 Gigabit Switch) consumes a total of ~14 watts.Example
-------![](https://raw.githubusercontent.com/okeuday/odroid_fish/master/fishbowl.gif)
Install (Node 0)
----------------cd ~
mkdir src
cd src
git clone https://github.com/CloudI/CloudI.git
cd CloudI/src
./autogen.sh && CLOUDI_ARG_NODE_NAME_SHORT=odroid CLOUDI_ARG_NODE_COOKIE=odroid ./configure --with-cxx-backtrace --with-boost-libdir=/usr/lib/arm-linux-gnueabihf/ && ./make_dev
sudo ./make_dev install
cd ../../
git clone https://github.com/hardkernel/wiringPi.git
cd wiringPi
./build
cd ..
git clone https://github.com/okeuday/odroid_display.git
cd odroid_display/src
make
cd ../../
git clone https://github.com/okeuday/odroid_fish.git
sudo mv -f /usr/local/etc/cloudi/cloudi.conf /usr/local/etc/cloudi/cloudi.conf.old
sudo cp -f odroid_fish/odroid0_cloudi.conf /usr/local/etc/cloudi/cloudi.conf
# make sure /etc/hostname and /etc/hosts allow the nodes to find each other
# (i.e., change "odroid" to "odroid0" and add IP addresses for 1-3)
sudo cloudi startAuthor
------Michael Truog (mjtruog at protonmail dot com)
License
-------MIT License
Thematic Inspiration
--------------------
[![Find The Fish (1983)](http://img.youtube.com/vi/UGBZnfB46es/0.jpg)](https://www.youtube.com/watch?v=UGBZnfB46es "Find The Fish (1983)")