Coder Social home page Coder Social logo

lf-edge / edge-home-orchestration-android Goto Github PK

View Code? Open in Web Editor NEW
1.0 6.0 1.0 135 KB

Java implementation of Home Edge project with sub set of features for Android support

Home Page: https://www.lfedge.org/projects/homeedge/

License: Apache License 2.0

Java 100.00%
android edgecomputing home-iot homeedge iot lfedge offloading orchestration

edge-home-orchestration-android's Introduction

Home-Edge-Android

RepoSize LICENSE

As a continous process to support Home Edge (Linux) to multiple platforms, this project caters to support Home Edge for Android. There are various smart home devices and Android has been making its presence in many of these devices. The most essential part of the ecosystem has been Smart phone and specifically Android based smart phones. There are large number of applications developed to support user needs across various domains. Some of the service applications would need compute intensive or containerized applications which are not available on the Android phones. This project helps the service applications on the android phones to leverage on the service offered by devices in the same network.

Home Edge helps the Android phone to discover the other nearby devices on same network and there capabilities/services offered. It is REST based peer to peer communication between all the devices. Every device in the network is a Home Edge node. Based on the CPU capability, memory, network bandwidth a score would be calculated by all the devices. The service application on Android requests to Home Edge for a service in nearby devices. Home Edge in turn communicates with other Linux based devices running Home Edge to check on the availability of the service. When there are more than one device offering the same service, the score helps in electing the device to offload the service.

Note : Currently the Android can consume the services offered by other Linux based Home Edge devices. But in turn services offered by Android would not be discoverable by Linux Home Edge. This has been constraint version and would be worked upon as the project matures.

Roadmap and Release Notes

You can see our project roadmap and details about release notes since our root project edge-home-orchestration-go launch in 2019 from our official Wiki

How to work

Request to execute a service container on Linux Home Edge :

  • Android application requests to Android HE :
    • POST
    • IP:56001/api/v1/orchestration/services
    • Body:
      {
          "ServiceName": "hello-world",
          "ServiceInfo": [
          {
              "ExecutionType": "container",
              "ExecCmd": [
                  "docker",
                  "run",
                  "-v", "/var/run:/var/run:rw",
                  "hello-world"
              ]
          }]
      }
      

License

The Edge Orchestration source code is distributed under the Apache License, Version 2.0 open source license.

Contributing

If you want to contribute to the Edge Orchestration project and make it better, your help is very welcome. Contributing is also a great way to learn more about social coding on GitHub, new technologies and their ecosystems.

edge-home-orchestration-android's People

Contributors

nitu-s-gupta avatar suresh-lc avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

nitu-s-gupta

edge-home-orchestration-android's Issues

Crash

It was tested with lfedge/edge-home-orchestration-go v1.2.0(latest) image from docker hub.
You may reproduce it as the sequence below.

  1. Run edge-home-orchestration-android app on the android mobile
  2. Run lfedge/edge-home-orchestration-go on the linux
D/NsdHelper: Service discovery successname: edge-orchestration-54bfe678-1b0a-435c-8815-c376ceec2df0, type: _orchestration._tcp., host: null, port: 0, txtRecord: 
D/NsdHelper: Resolving the service
D/NsdHelper: Resolve Succeeded. name: edge-orchestration-54bfe678-1b0a-435c-8815-c376ceec2df0, type: ._orchestration._tcp, host: /192.168.0.6, port: 42425, txtRecord: �Platform=docker�ExecType=container
D/NsdHelper: Exectype:container
D/NsdHelper: Platform:docker
D/NsdHelper: Creating a device to insert in DB
D/NsdHelper: Calling Orchestration API
D/APIImpl: getOrchestrationInfo is getting called at http://192.168.0.6:56002/api/v1/discoverymgr/orchestrationinfo
W/lfedge.homeedg: Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V (unsupported, reflection, allowed)
W/lfedge.homeedg: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (unsupported,core-platform-api, reflection, allowed)
W/lfedge.homeedg: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (unsupported,core-platform-api, reflection, allowed)
W/lfedge.homeedg: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (unsupported,core-platform-api, reflection, allowed)
D/APIImpl: OnResponse is calledhttp://192.168.0.6:56002/api/v1/discoverymgr/orchestrationinfo?id=edge-orchestration-54bfe678-1b0a-435c-8815-c376ceec2df0
D/APIImpl: Device Platform: docker ExecutionType:container
D/AndroidRuntime: Shutting down VM
    
    
    --------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.lfedge.homeedge, PID: 8692
    java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.isEmpty()' on a null object reference
        at org.lfedge.homeedge.client.APIImpl$1.onResponse(APIImpl.java:61)
        at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$retrofit2-DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:89)
        at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1$$ExternalSyntheticLambda1.run(Unknown Source:6)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at android.app.ActivityThread.main(ActivityThread.java:8663)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
I/Process: Sending signal. PID: 8692 SIG: 9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.