summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 876e80c99f23b9390bc8b9895e0be8bc7315c75e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Cloud Proxy Service

## Overview

*Cloud proxy service* provides possibility to send and receive data to/from clouds.

It is allowed to use *Cloud proxy service* from several application.
The messages/events separtion between application is done within service.

## Verbs

```
| Name               | Description                             | Data                                                |
| ------------------ |:----------------------------------------|:----------------------------------------------------|
| sendMessage        | send data to the cloud                  | application ID, JSON {"data":"message content"}     |
| subscribe          | subs. for particular application id     | application ID extracted from msg                   |
| unsubscribe        | unsubs. for particular application id   | application ID extracted from msg                   |
| ping               | verify connectivity to service          | N/A                                                 |
```
## Events

```
| Name                         | Description                                             |
| ---------------------------- |:--------------------------------------------------------|
| sendMessageConfirmation      | confirmation from cloud for previously sent message     |
| receivedMessage              | message from cloud to be propagated to the application  |
```

## Configuration

Cloud proxy service requires configuration of the cloud to be used. Configuration is stored in the **config.ini** file.

By default the configuration file **config.ini** is searched stored in

* $AFM_APP_INSTALL_DIR/etc/config.ini  - **default one**
* /etc/cloudproxy-service/etc/config.ini

At the moment only Azure cloud is supported.

### Azure configuration
The configuration has to contain the connection string for device: **DeviceConnectionString** in
section **[AzureCloudConnection]**

```
[AzureCloudConnection]
DeviceConnectionString=My=Azure=Device=Connection=String
```