Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-5625

FIWARE.Question.Tech.Data.OrionContextBroker.QueryByLocationWithNoElements

    Details

      Description

      Created question in FIWARE Q/A platform on 05-01-2016 at 16:01
      Please, ANSWER this question AT http://stackoverflow.com/questions/34615737/orion-context-broker-query-by-location-with-no-elements

      Question:
      Orion Context Broker - Query by location with no elements

      Description:
      I'm working with version 0.25.0 of Orion Context Broker.

      If I load the context broker only with context entities and I search for entities into a specific area, everything seems to work fine:

      (curl localhost:1026/v1/queryContext?limit=100 s -S --header 'Content-Type: application/json' --header 'Accept: application/json' -d @ | python -mjson.tool) <<EOF
      {
      "entities":[

      { "type":"Dispositivo_tmp", "isPattern":"true", "id":".*" }

      ],
      "restriction": {
      "scopes": [
      {
      "type": "FIWARE::Location",
      "value": {
      "circle":

      { "centerLatitude": "43.322361", "centerLongitude": "-1.983222", "radius": "1500" }

      }
      }
      ]
      }
      }
      EOF

      I get a response with the context entities located into that area:

      ...
      {
      "contextElement": {
      "attributes": [
      {
      "metadatas": [

      { "name": "location", "type": "string", "value": "WGS84" }

      ],
      "name": "position",
      "type": "coords",
      "value": "43.3221, -1.9831"
      },

      { "name": "pressure", "type": "integer", "value": "1" }

      ,

      { "name": "temperature", "type": "float", "value": "25" }

      ],
      "id": "CE_5.1",
      "isPattern": "false",
      "type": "Dispositivo_tmp"
      },
      "statusCode":

      { "code": "200", "reasonPhrase": "OK" }

      }
      ]
      }

      And if there are no elements into the defined area, I get the expected response:

      {
      "errorCode":

      { "code": "404", "reasonPhrase": "No context element found" }

      }

      The problem arises if I load the context broker with context registrations too. If I have both context entities and context registrations on the context broker and I check for context entities into an area I know is empty, I won't get any response or I will get this one:

      {
      "errorCode":

      { "code": "200", "reasonPhrase": "OK" }

      }

      And seems that the larger is the amount of context registrations loaded in the context broker, more time takes to get a (negative) response from the system.

      On the same scenario, there is no problem if I look for context entities into an area with elements. In this case I will get the correct response.

      Is there any sense on all that?

      EDIT:

      I have seem that this behaviour is due to the URL defined when creating the context registrations. Due to a misspelling on it, the system was trying to contact with a device using a non-existing URL.

      Thanks

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2016-01-05 18:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-01-05 18:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-01-07 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2016-01-07 18:05|UPDATED status: transition Answer| # answers= 1, accepted answer= False
        Hide
        backlogmanager Backlog Manager added a comment -

        2016-01-07 21:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2016-01-07 21:05|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            fermin Fermín Galán
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: