Design of Scalable Iot architecture Based on aws for Smart Livestock


Download 1.89 Mb.
bet12/13
Sana19.04.2023
Hajmi1.89 Mb.
#1366355
1   ...   5   6   7   8   9   10   11   12   13
Bog'liq
animals-11-02697

Author Contributions: Conceptualisation, K.D. and T.A.; Methodology, K.D. and T.A.; Software, K.D.; Validation, K.D. and T.A.; Writing—original draft preparation, K.D. and T.A.; Writing—review and editing, K.D. and T.A; Visualisation, K.D.; Supervision, T.A. All authors have read and agreed to the published version of the manuscript.
Funding: The research leading to these results received funding from the Ministry of Education and Science of the Republic Bulgaria under the National Science Program INTELLIGENT ANIMAL HUSBANDRY, grant agreement No. Д01-62/18.03.2021/.
Institutional Review Board Statement: Not applicable.
Conflicts of Interest: The authors declare no conflict of interest.

Appendix A


The code for the AWS Lambda (Figure A1). The programming language is Python.

Figure A1. Lambda Function. Lines 1–6: Importing required packages. Line 9: function definition responsible for AWS Lambda invocations. Line 16: Accessing DynamoDB resources using AWS Boto Client. Line 19: Accessing DynamoDB table. Lines 21–31: Loop to iterate through all records in the function payload and push the decoded data to the DynamoDB table.

Appendix B


The user interface of the AWS Data Generator (Figure A2). It allows for controlling various settings for data pipeline load tests. The JSON payload is defined in the text-box area. The AWS Data Generator can be used only for AWS services.

Figure A2. Amazon Kinesis Data Generator Settings.

Appendix C


JSON payload
{
“id”: “81ca2385-3f88-4e9d-87e9-bff8022337d3”,
“devId”: “625dc569-fc9d-49f5-87f9-52ad792c2ca3”,
“farm”: “troyan”,
“bat”: 4.76876,
“isActive”: true,
“tags”: [
“cow”,
“troyan”,
“proto”,
“test”
],
“dtIn”: “2021-04-23T19:16:37+03:00”,
“dt1st”: “2021-04-23T19:16:37+03:00”,
“dtLst”: “2021-04-23T19:16:37+03:00”,
“sens”: [
Array of 200 Single IoT Measurements
]
}
Single IoT Measurement
{
“dt”: “2021-04-23T19:16:37+03:00”,
“tin”: float,
“tout”: float,
“hum”: float,
“bar”: float,
“gyr”: {
“x”: float,
“y”: float,
“z”: float
},
“loc”: {
“lat”: float,
“lon”: float
}
}

Download 1.89 Mb.

Do'stlaringiz bilan baham:
1   ...   5   6   7   8   9   10   11   12   13




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling