0

I have some Position(GPS),time and event datas about a project(Data Provider part.This part is implemented in another platform like C# and I am not responsible for this part.) and I need to process those datas on javascript in real-time.

Currently i am getting data as local .JSON file and i can parse and process data easily.

{
  "LOG": [

        {
           "GPS": {"latitude": "20.32123123", "longitude": "40.6323231"}, 
           "Data": "some-data",  
           "time": "18-03-2019 16:53:32.12"
        },
        {
           "GPS": {"latitude": "21.32323231", "longitude": "40.6321323123"}, 
           "Data": "some-data",  
           "time": "18-03-2019 16:54:33.15"
        },
        .
        .
        .


        ]


}

But the data provider part needs to firstly parse .JSON data, then append the new data, then re-write to .JSON in order to add new datas on our .JSON format log file.

Is this a proper way of doing this logging-reading works? or is there any other handy methods to write and read real-time log data simultaneously?

MS.
  • 145
  • 1
  • 10
  • 1
    Use a database instead? –  Jul 12 '19 at 06:36
  • Why can't the data provider send you this fresh data directly? Can it only communicate through this file? Also, this file is going to become unmanageable... at least use NDJSON. – Brad Jul 12 '19 at 06:37
  • @Brad It can communicate via other ways.I just wanted to know what is the convention about this problem – MS. Jul 12 '19 at 06:50

0 Answers0