Skip to content

Commit 2966bfc

Browse files
committed
readme is updated
1 parent b5f7cc0 commit 2966bfc

File tree

1 file changed

+8
-47
lines changed

1 file changed

+8
-47
lines changed

README.md

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
# global-input-node
2-
This is a Global Input App(GIA) WebSocket server, responsible for routing encrypted messages between device applications, and is one of the constituent parts of [the GIA mobile integration solution](https://globalinput.co.uk/). The [Global Input App(GIA)](https://globalinput.co.uk/) with its extensions provides a universal mobile integration solution for web and device applications, allowing users to use mobiles to operate on those applications, and provides the following functionalities:
3-
- [Mobile Authentication](https://globalinput.co.uk/global-input-app/mobile-authentication)
4-
- [Mobile Input & Control](https://globalinput.co.uk/global-input-app/mobile-input-control)
5-
- [Second Screen Experience](https://globalinput.co.uk/global-input-app/second-screen-experience)
6-
- [Mobile Personal Storage](https://globalinput.co.uk/global-input-app/mobile-personal-storage)
7-
- [Mobile Encryption & Signing](https://globalinput.co.uk/global-input-app/mobile-content-encryption)
8-
- [Mobile Content Transfer](https://globalinput.co.uk/global-input-app/mobile-content-transfer)
1+
# Global Input App WebSocket Server
2+
This is a WebSocket server responsible for relaying encrypted messages between devices. Being as part of the Mobile Integration Platform powered by [Global Input App](https://globalinput.co.uk/), which secures data using end-to-end encryption at the device-to-device level, it can run on an unsecured infrastructure.
93

104
### Download
11-
Download the Node.JS application and its dependencies :
5+
Download the application:
126
```shell
137
git clone https://github.com/global-input/global-input-node.git
148
cd global-input-node
@@ -17,53 +11,20 @@ Download the Node.JS application and its dependencies :
1711
```
1812

1913
### Modify the Configuration
20-
Open the configuration file [/app/config/config.json](https://github.com/global-input/global-input-node/blob/master/app/config/config.json), locate the url attribute:
14+
The configuration file [/app/config/config.json](https://github.com/global-input/global-input-node/blob/master/app/config/config.json) contains the information to inform the devices how to connect to the WebSocket server:
2115
```
2216
....
2317
"name":"default",
2418
"apikey":"k7jc3QcMPKEXGW5UC",
2519
"url":"https://node3.globalinput.co.uk"
2620
...
2721
```
28-
and modify its value to point to your own GIA WebSocket server instance. The URL is going to be used by both the application running on your device and the Global Input App running on your mobile, to connect to your WebSocket server instance. Hence, the URL should be reachable from the network that your devices are connected to. For example, if you use a URL with an internal network address, the device and your mobile should be connected to the same network.
22+
The value of the ```apikey``` parameter is used to control which device applications can use the resource represented by the Web Socket server, and it does not have any data security implication. You can modify the value of the ```url``` parameter to reflect the infrastructure that is set up to run your WebSocket server. The ```url``` should be reachable to both the device application and the mobile app (Global Input App) in order to communicate with each other.
2923

30-
### Run the WebSock server
31-
run the Node application:
32-
```
33-
nodejs server.js
34-
```
35-
This repository also contains the scripts for building the docker images for [the WebSocket Server Container](https://cloud.docker.com/u/dilshat/repository/docker/dilshat/global_input_node) and [the Nginx Reverse Proxy Container](https://cloud.docker.com/repository/docker/dilshat/global_input_nginx) .
36-
37-
### Configuring the GIA Extensions
38-
39-
The details of the communication between the WebSocket server are encapsulated within the GIA extensions so that applications can just provide mobile user interfaces and callbacks to process mobile events. The GIA extensions are:
40-
41-
- [GIA Chrome Extension](https://github.com/global-input/chrome-extension)
42-
- [GIA WordPress Plugin](https://github.com/global-input/wordpress-login))
43-
- [GIA React Extension](https://github.com/global-input/global-input-react))
44-
- [GIA JS Extension](https://github.com/global-input/global-input-message)
24+
### Run an instance.
4525

46-
A GIA extension library connects to a GIA WebSocket server and displays an Encrypted QR Code to tell GIA how to connect to it. The URL of the WebSocket server and the APIKey value required connecting to the WebSocket server
47-
are contained in the Encrypted QR Code contains
48-
If you are using [the GIA Chrome Extension](https://github.com/global-input/chrome-extension), click on ```Communication Settings``` in the extension window. You can modify the WebSocket URL and the API key values that are used by the GIA Chrome extension to connect to the WebSocket server.
49-
50-
If you are using the [GIA React Extension]([https://github.com/global-input/global-input-react](https://github.com/global-input/global-input-react)) or [the GIA JS Extension](https://github.com/global-input/global-input-message), you can set the URL and APIKey value of your WebSocket server in the mobile config:
5126
```
52-
let mobileConfig={
53-
url:<url to your websocket server>,
54-
apikey:<apikey required for connection>,
55-
initData:{
56-
form:{
57-
...
58-
}
59-
60-
}
27+
nodejs server.js
6128
```
29+
Alternative, you can build a docker image, or download and run from [docker hub](https://cloud.docker.com/u/dilshat/repository/docker/dilshat/global_input_node). You may place a [the Nginx load balancer](https://cloud.docker.com/repository/docker/dilshat/global_input_nginx) in front to manage multiple instances.
6230

63-
64-
### GIA WebSocket Load Balancing Strategy
65-
66-
Websockets are persistent contrary to those on the RestAPI calls. This means that a large number of connections needs to be kept open simultaneously. Although the workloads of processes are distributed across the nodes, the long-running WebSocket connections themselves will be increasing burden on the load balancer itself.
67-
68-
In the GIA WebSocket Loadbalancing Strategy, in order to resolve this limitation, every WebSocket session is started with an initial RestAPI call on the LoadBalancer to obtain the URL of a WebSocket Server node, so that the application will connect to the WebSocket node directly without going through the load balancer. The sequence of actions in the process for starting a WebSocket connection is shown in the following diagram:
69-
![WebSocket Server Loadbalancing](https://media.iterativesolution.co.uk/images/websocket-server.png)

0 commit comments

Comments
 (0)