Abstract:
A method and apparatus for implementing a massively distributed cloud-based platform providing features as a service to support mobile and web applications via native client SDKs. Functionality is fully featured hosted remotely but called natively allowing a consistent logic across a plurality of devices and applications. The platform is a highly distributed process based computational and data systems cluster whereby each node manages a set of messaging channels supporting multiple concurrent endpoints.

Description:
BACKGROUND 
       [0001]    This invention provides a software solution to enable mobile devices as well as web applications with limited compute power the ability to execute complex functionality on considerably more powerful resources in the cloud, as if they were processed locally by the mobile or web application. 
         [0002]    The present invention is in the technical field of distributed computing, as well as mobile and web services, or more specifically, methods and systems for distributed messaging via a channel architecture, process based services with multiple channel end points, and the feature of seamlessly moving a channel process between nodes anywhere in the world. 
         [0003]    The advent of smartphone systems such as those running iOS and Android operating systems has transformed not only the way people communicate, but also more fundamentally how they live. With over one million mobile apps and counting as of this writing, the pace of new app development dwarfs the release of other kinds of media. 
         [0004]    Initially, there was a rush of native app development, which quickly proved problematic with the arrival of Android requiring the development and maintenance of multiple code bases for each mobile OS. This, coupled with the need for rapid deployment of functionality, resulted in a shift from pure native apps to HTML5-based mobile apps delivered by a web server running in an HTML container or browser. Unfortunately it quickly became apparent that this circumvented much of the functionality native to the device and OS specifically designed to gracefully manage the very limited resources of the mobile device. Today, the move is to a hybrid solution where the applications have moved back to being fully native with the attempt to keep some functionality as web based. This solution does not scale well and is disjointed to the fragile nature of mobile networking. 
       SUMMARY 
       [0005]    Considered broadly, the present invention discloses a novel solution whereby through a set of computational and programmatic electronic methods, specific features are executed remotely as a service through a procedural call while having the effect of being local in the native application for mobile and web applications. The invention allows a mobile or web application to open one or more channels as a message bus from one or more devices, which may include one or more other devices, to a node in a distributed cluster for the purpose of performing logic necessary for the function of the native application. Each channel is formally a process whose state is persisted to a distributed data store, and is able to be relocated or restored on demand to any node in the cloud, regardless of physicality. 
         [0006]    Other principal features and advantages of the invention will become apparent to those skilled in the art upon review of the following drawings, the detailed description, and the appended claims. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0007]    Example embodiments will hereafter be described with reference to the accompanying drawings, wherein like numerals denote like elements. The drawings depict example embodiments in accordance with the disclosure and are, therefore, not to be considered limiting of its scope. 
           [0008]      FIG. 1  is a high-level diagram of the present invention in accordance with an example embodiment. 
           [0009]      FIG. 2  depicts another high-level functional diagram detailing the distributed channel architecture of the platform. 
           [0010]      FIG. 3  depicts a flow diagram illustrating the execution of a remote procedure call. 
           [0011]      FIG. 4  depicts a functional diagram of how a given channel can be relocated or restored to a different node. 
       
    
    
     DETAILED DESCRIPTION 
       [0012]    Referring now to the invention in more detail, in  FIG. 1 , a high level diagram of the invention is shown in accordance with an example embodiment. The invention includes device management, a distributed message channel and communication system for mobile devices with Global Position System  104  and wireless networking technologies  102 , which is composed of a plurality of devices  100  running applications with the need to establish a network and perform remote functions. The invention includes mobile application SDK  200 , a data processing system  400 , and a network  103 . Network  103  may include one or more networks of the same or different types. Network  103  can be any type of wireless public or private network including a cellular network, a local area network, a wide area network such as the Internet, etc. Network  103  further may be comprised of sub-networks and consist of any number of devices. 
         [0013]    The data processing system  400  includes a server computing device  401  and a HTTP or socket connection. Server computing device  401  may be a computer of any form factor. The data processing system accepts HTTP or socket connections from any plurality of mobile device  102 . Mobile device may include any device supporting OPS  104  and wireless networking not limited to those devices running iOS, Android, WebOS or Windows. A web application may include any application running in any HTML container or browser on any mobile or non-mobile computing device. 
         [0014]    In more detail, still referring to the invention,  FIG. 2  depicts another high-level functional diagram detailing the distributed channel architecture of the platform where by a plurality of devices  101  each with the same application written and employing the platforms SDK  102  to establish a channel  103  for the purpose of performing functions  105  such as group chat, photo sharing, or any other function currently deployed or deployed at anytime in the future. Each channel is a fine-grained process  104  that embodies an omni-directional message bus. The state of each channel is persisted by the node to a distributed data store  106 . 
         [0015]      FIG. 3  depicts a flow diagram illustrating the execution of a remote procedure call. The process starts with the accepting of a network request, either of an HTTP protocol, or from a native socket. The caller executes one of many supported remote procedural calls where the arguments of the remote function are passed either as a JSON blob in the request payload for HTTP, or in a binary object when executing over a socket. Whatever result the function generates is returned in the response of the request for HTTP, or via the socket. 
         [0016]    At decision point A 2 , if the caller SDK OAuth is not valid; a 401 Unauthorized response is returned R 1 . 
         [0017]    If it is valid, the process flow continues to decision A 3  to determine if the calling device is registered. If no, process flow passes to decision point B 3  to determine if the call being executed is a Session Command. If the result of B 3  is no, a 200 Unregistered Device message is returned R 2 . If the result of B 3  is yes, a 200 Device Registered is returned to the caller R 3 . 
         [0018]    If the result of decision point A 3  is yes, process flow passes to A 4  to determine if the device is authenticated. If the result of A 4  is no, process flow passes to B 4  to determine if authentication is required. If the result of B 4  is yes, process flow passes to decision point C 4  to determine if the call being executed is an Auth Command. If the result of C 4  is no, a 200 Unauthorized response is returned R 4 . If the result of C 4  is yes, the process flow passes to C 5  to determine if the system can authenticate the device and user. If the result of C 5  is no, a 200 Unauthorized response is returned R 5 . If the result of C 5  is yes, then a 200 Authenticated response is returned R 6 . If the result of B 4  is no, process flow passes to continuation A 5  and continues to decision A 6 . If the result of A 4  is yes, process flow passes to continuation A 5  and then continues to decision A 6 . 
         [0019]    At decision point A 6 ; the requested channel is determined to be valid. If the result of A 6  is no, process flow passes to B 6  to determine if the call being executed is either a Create, Join, or Find channel command. If the result of B 6  is no, a 200 Invalid Channel response is returned R 7 . If the result of B 6  is yes, then a 200 Channel Created or Channel Joined response is returned R 8 . If the result of A 6  is yes, then process flow passes to A 7 . 
         [0020]    At decision point A 7 ; the requested channel is determined to be alive. If the result of A 7  is no, process flow is passed to B 7  to determine if the channel can be restored. If the result of B 7  is no, a 200 Invalid Channel response is returned R 9 . If the result of B 7  is yes, the channel is restored R 10  and process flow passes to B 8  to determine if the channel was restored. If the result is no, a 200 Restore Failed is returned R 11 . If the result of B 8  is yes, process flow passes to continuation A 8  and continues on to A 9 . If the result of A 7  is yes, process flow passes to continuation A 8  and continues on to A 9 . 
         [0021]    At decision point A 9 ; the requested remote procedure is determined to be allowed. If the result of A 9  is no, then a 200 Call Not Allowed is returned R 12 . If the result of A 9  is yes, process flow is passed to A 10 . 
         [0022]    At decision point A 10 ; the requested remote procedure is determined to be available. If the result of A 10  is no, then a 200 Service Unavailable is returned R 13 . If the result of A 10  is yes, the process flow is passed to A 11 . 
         [0023]    At decision point A 11 ; the requested remote procedure is determined to have valid arguments. If the result of A 11  is no, then 200 Bad Arguments is returned R 14 . If the result of A 11  is yes, then the remote procedure call is performed and the result is returned on the requested channel to the caller. 
         [0024]    In more detail, still referring to the invention,  FIG. 4  depicts a functional diagram of how a given channel can be relocated or restored to a different node. When a channel process is created  102 , it is located in the memory of node of the cluster  100 . All state changes  104  are persisted to a distributed cluster  103 . If a channel is requested to be moved, or restored to either the same or different node, the state  104  is read and restored as a channel process  102  in the new node  101 . 
         [0025]    The word “example” is used herein to mean serving as an example, instance, or illustration. Any aspect or design described herein as “example” is not necessarily to be construed as preferred or advantageous over other aspects or designs. Further, for the purposes of this disclosure and unless otherwise specified. “a” or “an” means “one or more”. Still further, the use of “and” or “or” is intended to include “and/or” unless specifically indicated otherwise. The example embodiments may be implemented as a method, apparatus, or article of manufacture using standard programming and/or engineering techniques to produce software, firmware, hardware, or any combination thereof to control a computer to implement the disclosed embodiments. 
         [0026]    While the foregoing written description of the invention enables one of ordinary skill to make and use what is considered presently to be the best mode thereof, those of ordinary skill will understand and appreciate the existence of variations, combinations, and equivalents of the specific embodiment, method, and examples herein. The invention should therefore not be limited by the above described embodiment, method, and examples, but by all embodiments and methods within the scope and spirit of the invention.