Skip to content

big computation task can be divided to small tasks and distribute to mulitple mobiles to compute and collect the results back

Notifications You must be signed in to change notification settings

disney007/parallel-mobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is project is to run small tasks on mobile and collect results. The messaging system is using https://github.com/disney007/WebSocketaaS

Example:

Request:

{
   "type":"MESSAGE",
   "data":{
      "to":"ANZ-123223",
      "content":"{\"type\":\"CAL_REQ\",\"data\":{\"script\":\"var a=[1+1];return a;\",\"id\": \"xxx\"}}"
   }
}

Response:

{
   "type":"MESSAGE",
   "data":{
      "from":"ANZ-123223",
      "content":"{\"type\":\"CAL_RES\",\"data\":{\"id\":\"xxx\",\"result\":[2],\"state\":\"OK\"}}"
   }
}

Live Demo

  • Open https://pm.gl-world.de/agent-index.html and serve as agent device to provide computation power
  • Open https://pm.gl-world.de/consumer-index.html to simulate computation consumer
  • You can write javascript code in left panel of consumer page.
  • Click Calculate button and the script will be sent to agent device to compute.
  • The computation result will be sent back and display on the right panel of consumer page.

Note:

  • The result value is given by return keyword in javascript.
  • You can open console log of agent device page to view the computation process, where the script gets executed in webworker

About

big computation task can be divided to small tasks and distribute to mulitple mobiles to compute and collect the results back

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published