Skip to content

Commit

Permalink
Add extended architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Andryss committed May 22, 2024
1 parent cc1c209 commit a86775f
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 27 deletions.
99 changes: 72 additions & 27 deletions doc/SWAGGER.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,67 @@

[ConnectionTask](../common/src/main/kotlin/org/vivlaniv/nexohub/ConnectionTask.kt)

## $user/fetch/devices
## $user/signin

### /in FetchSavedDevicesTask
### /in AuthUserTask

```json lines
{
"id": String
"id": String,
"username": String,
"password": String
}
```

### /out FetchSavedDevicesTaskResult
### /out AuthUserTaskResult

```json lines
{
"tid": String,
"id": String,
"code": Int,
"errorMessage": String?,
"devices": List<SavedDevice>?
"token": String
}
```

## $user/property
## $user/signup

### /in PutDevicePropertyTask
### /in RegisterUserTask

```json lines
{
"id": String,
"device": String,
"property": String,
"value": Int
"username": String,
"password": String
}
```

### /out PutDevicePropertyTaskResult
### /out RegisterUserTaskResult

```json lines
{
"tid": String,
"id": String,
"code": Int,
"errorMessage": String?,
"device": String,
"errorMessage": String?
}
```

## $user/fetch/props
## $user/search

### /in FetchDevicesPropertiesTask
### /in SearchDevicesTask

```json lines
{
"id": String,
"include": List<String>?,
"id": String
}
```

### /out FetchDevicesPropertiesTaskResult
### /out SearchDevicesTaskResult

```json lines
{
"tid": String,
"code": Int,
"errorMessage": String?,
"properties": Map<String, List<PropertyInfo>>?
"devices": List<DeviceInfo>
}
```

Expand All @@ -92,21 +89,69 @@
}
```

## $user/search
## $user/fetch/devices

### /in SearchDevicesTask
### /in FetchSavedDevicesTask

```json lines
{
"id": String
}
```

### /out SearchDevicesTaskResult
### /out FetchSavedDevicesTaskResult

```json lines
{
"tid": String,
"devices": List<DeviceInfo>
"code": Int,
"errorMessage": String?,
"devices": List<SavedDevice>?
}
```

## $user/fetch/props

### /in FetchDevicesPropertiesTask

```json lines
{
"id": String,
"include": List<String>?,
}
```

### /out FetchDevicesPropertiesTaskResult

```json lines
{
"tid": String,
"code": Int,
"errorMessage": String?,
"properties": Map<String, List<PropertyInfo>>?
}
```

## $user/property

### /in PutDevicePropertyTask

```json lines
{
"id": String,
"device": String,
"property": String,
"value": Int
}
```

### /out PutDevicePropertyTaskResult

```json lines
{
"tid": String,
"code": Int,
"errorMessage": String?,
"device": String,
}
```
Binary file added doc/arch_ext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ suspend fun Application.startScenario() = coroutineScope {
val start = System.nanoTime()
val completed = AtomicInteger(0)

val createDelay = props.getProperty("load.user.delay", "500").toLong()

repeat(count) {
launch {
startUserScenario {
Expand All @@ -33,6 +35,7 @@ suspend fun Application.startScenario() = coroutineScope {
}
}
}
delay(createDelay)
}

log.info("Generation finished")
Expand Down

0 comments on commit a86775f

Please sign in to comment.