API ParGarCom: how some problems have been solved

In a technological project, nothing is perfect and the programmer’s task, besides having to get used to new platforms and applications, is faced with a time limitation that forces him/her to look for a solution to the problem, either rethinking the task, asking for help or ignoring the initial approach because it is unfeasible.

One of the objectives of the experiments that are carried out within the Organicity project is to report on their evolution, and within this information report, to know the problems that have been had and how they have been resolved is key to report to the rest of the community and that it has knowledge of how the problem has been resolved.

Below Ida, who is responsible for the development of the ParGarCom API, lists some of the problems she has had with its development and how she has solved them:

1. Task: Learning OC API usage for retrieving and pushing assets.

a) Issue: Usage documentation is not clear, and not sufficient usage examples.

b) Solution: investigation in different web pages, including the “FIWARE-NGSI v2 Specification” web page which has good examples, and many of trial and error helped to understand the correct way to perform the requests.

2. Task: Installing SensiNact tool.

a) Issue: After installing the newest version of linux 17 on a virtual machine using virtual box, trying to install SensiNact following the installation documentation in OC website, resulted with error.

b) Solution: An email describing the issue was sent to our project coordinador, and he replied with a suggestion how to alter the deb command in the beginning of the installation, which resolved the issue.

3. Task: Usage learning and using SensiNact tool.

a) Issue: After installing the SensiNact tool, I launched it and tried to learn how to use it. It wasn’t so clear how to use it, and how get any benefits from this tool.

b) Solution: None. There was not direct need to use the SensiNact tool to our, and therefore I didn’t further investigate how to use it.

4. Task: Pushing assets repeatedly during developing and testing of the relevant script.

a) Issue: Sometimes the request to push asset returned error number 502 (Proxy error), and the asset was not created.

b) Solution: Running the request again resulted with success response and the asset was created.

5. Task: Pushing assets with real url to videos in Youtube or images in Google Drive.

a) Issue: Trying to push and asset to the project experiment with real url results with error, and the assets was not created. When trying to push the same asset, but with fake url, the asset was created successfully.

b) Solution: The video/image id is stored with a place holder in the asset, which is replaced with the real url when the asset is retrieved.

6. Task: Uploading images to be stored in Instagram.

a) Issue: When looking the correct way to upload images from the server to Instagram using Instagram API for developers it was found that Instagram not supply such API, and moreover, it is forbidden.

b) Solution: Images are uploaded to public folder in Google Drive.

7. Task: Get Santander parks list from OC observatory.

a) Issue: The request results with a long list of all parking and parks with long response time and unnecessary data.

b) Solution: The parking is filter out from the results, which further increase the total time for retrieving the results. There was no solution for the long response time.

8. Task: Get full data for assets when retrieving data for list of assets by type or by geo search.

a) Issue: When list of assets is retrieved, only part of the data is returned, in comparison with data retrieved for a specific asset by its id, or in comparison with the data in the Santander data web page. For example of missing data: name, image url and description.


a) After retrieving the list of assets, secondary requests were sent to retrieve each asset by its id to get the missing required data. This resulted with many requests and increased significantly the total time to get the required data. Therefore, the following approached was implemented.

b). When retrieving a list of assets, the request is done in parallel both to OC observatory and to Santander data web page. Then the missing data is taken from the Santander data and added to the OC output.

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *