0

I get sensor data(with XML format) from URL, and i must process(get some parts of XML - filter) this XML data, then must save to db. But, i dont know which "processing way" to use.

I know a few solution. One of these is XMLTextReader. XMlTextReader so fast to process XML data. Another solution is Azure IoT streaming tool. But I dont know any information about this tool.

Which solution is best way for this scenario?

1 Answers1

0

There's no best way here, everything has pros and cons.

If you use XMLTextReader, you need to focus on the code logic and write your own program to read the xml file and store it into database. However, it has no limitation,you could use XMLTextReader to process xml data as you want.

Also, you could use Azure Stream Analytics service.

1.You could get the data from the url and store them into Azure Blob Storage via sdk code.Or you could use Azure Data Factory to copy data from Http request into Azure Blob Storage.

2.Then make the azure blob storage as input in azure stream analytics.Please refer to this doc.

3.You could make many services as output such as cosmos db, sql database.

Hope it helps you.Any concern,please let me know.

Jay Gong
  • 23,163
  • 2
  • 27
  • 32
  • I'll save data to mongodb. Code logic is no problem for me. Also, this code will not so huge. As far as i know Azure streams provides cosmos DB for mongodb. But which one is efficient? This operations(get data from URL and filter and save it) must very fast. – a-better-world Aug 29 '18 at 08:08
  • @a-better-world sorry, it's difficult to answer your performance question.It's affected by many factors.You could try to test azure stream analytics to check if it is suitable for you. Generally, the data process on azure is fast. – Jay Gong Aug 29 '18 at 09:37
  • Okey, i'll try Azure Stream analystics. I'll edit this post after test it. Thank you for your answer. – a-better-world Aug 29 '18 at 09:48
  • @a-better-world Sure,waiting for your reply. – Jay Gong Aug 29 '18 at 09:57