We are surrounded by computing power but never really been able to utilize it.
I got this idea when I was lining up out side the gate when the hackathon began, I was so bored that I ran my own BLE logging and debuging app, which I used it to debug micro-controllers.
I was surprised by the amount of BLE devices around me, in less than 10 sec I've logged over 20 BLE devices. And than I start to think about how to make a cool project than allow me to make use of these computing devices.
The idea is to make use of any devices, include phones, tablets, laptops, and even micro-controllers which have BLE capability. This project allows these computing power been utilize by contributing them to a wireless parallel computing platform.
What it does
Each device could be a client or server for parallel computing,
Server, or Host is the device who has algorithms which compile to or written in "YSInstruction Set" (The ultra light weight programming language / instruction set created by me during this hackathon. );
Client, of cause is the device which is running those algorithms and returning their outputs back to host.
Each BLE devices which have a service with UUID "D0839ACE-698E-4728-BA3A-A3616ACE979E", in this service there are two characteristic, a program-in write-only characteristic with UUID "E69AEA26-F70A-4AC0-BA3E-4596DE081FDA", and another read-only notifiable characteristic for returning values, UUID: "E1C0C6CA-0DE6-4353-A87C-7DCBD4567FAA"
during runtime, the host will search for free clients available, once it discovered devices that have the service "D0839ACE-698E-4728-BA3A-A3616ACE979E", it will automatically notify to the returning-value characteristic and listen for returning value, than the host will write the program to the program-in characteristic.
Once the client has handled the functions once, It cached the function in memory, start from the second cycle only params were required inside payload, therefore It can run the same function over and over with different params.
on the client side, once it received a full instructions (aka program), it will start executing it and return the returning values to the "returning-value characteristic" for the host to listen.
if the host does not get a response in certain amount of time, It's a timeout, the host will stop listen to that client and resend the same data to other client to complete the algorithm.
Since each client is not really very important for the host, that means the number of clients can be dynamic changed during runtime without giving any problems to the host.
Since all instructions were converted to local cpu instructions by executor, cpu architecture is not a problem. Since the host is "listening" to the returning values, unlike common parallel computing, each client can have different spec different clock rate.
How I built it
-Start with creating my own lanuage -Create an executor for specific platform ,(e.g. swift for iOS/OSX, C for micro controllers" -Programming the host to sent instruction thur ble to test if it work -IT WORKS!!!!
Challenges I ran into
- ultra-light programming language, which ends up a pure binary and hex programming language.
- Managing BLE services and central.
Accomplishments that I'm proud of
- I just made a new super-light weight programming language (a 20byte program contains variable declaration, a for-loop, a couple of if and else if control flow)
- I also made a way to allow micro-controller and other devices can be programmed remotely.
What I learned
- Write new language
What's next for BLE Parallel Computing
- micro-controller based "Computing power" hotspot - a rack of micro controller providing remote computing power to devices nearby.
- Linear algebra libraries and instructions