fiware-orion | Context Broker and CEF building block
kandi X-RAY | fiware-orion Summary
kandi X-RAY | fiware-orion Summary
Orion is a C++ implementation of the NGSIv2 REST API binding developed as a part of the FIWARE platform. Orion Context Broker allows you to manage the entire lifecycle of context information including updates, queries, registrations and subscriptions. It is an NGSIv2 server implementation to manage context information and its availability. Context information consists on entities (e.g. a car) and their attributes (e.g. the speed or location of the car). Using the Orion Context Broker, you are able to create context elements and manage them through updates and queries. In addition, you can subscribe to context information so when some condition occurs (e.g. the context elements have changed) you receive a notification. These usage scenarios and the Orion Context Broker features are described in this documentation. If this is your first contact with the Orion Context Broker, it is highly recommended to have a look to the brief Quick Start guide.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fiware-orion
fiware-orion Key Features
fiware-orion Examples and Code Snippets
Community Discussions
Trending Discussions on fiware-orion
QUESTION
I am using Orion Context Broker (in docker container) and I need it to connect with MongoDB (which is in its own docker container). At the same time I must deny all incoming traffic to 27017 from external sources, because after running the docker-compose the port 27017 is "exposed" to public.
All of the above using Ubuntu 20.04.
This is my docker-compose.yml
file
ANSWER
Answered 2022-Jan-12 at 13:53The Compose ports:
setting is what makes a container accessible from outside Docker space. It's not necessary (or used) for connections between containers. Deleting this should meet your needs.
QUESTION
I'm using GitAction to run a workflow using a matrix strategy, as follows (simplified):
...ANSWER
Answered 2021-Dec-01 at 12:59I had a similar use case, found a simple solution:
- Change matrix range to a list of objects, containing
order
andrange
. - Concatenate
order
with the job'sname
key. - Use
range
key as before.
Hopefully, Github Actions will add an index to the matrix jobs, simplifying the way we distinguish between them.
QUESTION
Context Broker with Context Provider
Queries (e.g. GET /v2/entities?q=temperature>40
) from the ContextConsumers aren't sent to the ContextProvider: https://github.com/telefonicaid/fiware-orion/issues/2282
I am examining the following alternative:
- Create a web application and place it between the ContextBroker and the ContextProvider.
- The payload of
POST /v2/registrations
contains the lines below:
ANSWER
Answered 2021-Nov-04 at 14:39I'd say that the request headers that are being forwarded are:
- fiware-correlator
- fiware-service
- fiware-servicepath
- x-auth-token
For more detail, I'd recommend to have a look to the httpSendRequest()
function implementation in the Orion Context Broker code.
QUESTION
I'm using QtCreator to develop a "plain" C++ based software (in particular, this one). By "plain" I mean my software is not using Qt libraries or any other Qt stuff appart from the IDE.
QtCreator version is 4.14.1.
Everything goes fine (building, running application, debugging, etc.) but the editor is reporting problems finding header files (i.e. .h
files) belonging to my project, as shown in the screenshoot below:
Interesting to note that system headers (e.g. stdio.h
) are correctly found.
So maybe I'm missing some piece of configuration in my project. First thing I thougth was the .includes
added by QtCreator at project creation time (fiware-orion.includes
in my case), which is like that:
ANSWER
Answered 2021-Aug-31 at 13:29I think I found the answer myself just after publishing the question (use to happen :)
Adding to the .includes
file this line:
QUESTION
I have a pool of threads (QueueWorkers
class) in my program that are released using this logic:
ANSWER
Answered 2021-Jun-07 at 13:52Are sure the thread is in a cancelation or your thread cancelation_type
is asynchronous?
From man
of pthread_cancel
:
A thread's cancellation type, determined by pthread_setcanceltype(3), may be either asynchronous or deferred (the default for new threads). Asynchronous cancelability means that the thread can be canceled at any time (usually immediately, but the system does not guarantee this). Deferred cancelability means that cancellation will be delayed until the thread next calls a function that is a cancellation point. A list of functions that are or may be cancellation points is provided in pthreads(7).
I don't think canceling threads is the best ways to make sure that a thread will finish. Perhaps you can send the thread a message that it should stop and make sure the thread does receive the message and will handle it.
QUESTION
Tax information system contains all Tax information regarding every citizen in the city.
Following FIWARE principles, seems it might make sense Consumers query Orion about entity(citizen) tax information, and the request being forwarded to Context Provider (ie:TaxInformationSystem).
Query citizen X tax information -> Orion -> TaxInformationSystem_CP
According to documentation, Context Providers can register themselves as source for specific attributes. This, for example, could make this work:
http://{{orion}}/v2/entities/urn:citizenID/attrs/name/tax
However, this seems to require every citizen to be registered as an entity, so tax information system should register multiple times (one per citizen). (And residenceInformationSystem, and healthInformationSystem, and...)
...ANSWER
Answered 2021-May-19 at 07:48Not sure if I'm fully understanding you case...
You could do a registration for all citizen like this one:
QUESTION
I didn't found in documentation or source code the specifications to add attribute to multiple created entities with same id pattern. Only found the method for add attr to entity one by one (with array), but this method doesn't work (lazy method) when need add attribute to 100+ entities with id pattern (idIot:1, ... , idIot:N).
Any help?
...ANSWER
Answered 2020-Jul-31 at 13:27The NGSIv2 method that allows to update several entities at once is POST /v2/op/update
. It uses as parameter an array of entities:
entities
, an array of entities, each entity specified using the JSON entity representation format (described in the section "JSON Entity Representation").
and in the cited "JSON Entity Respresentation" section we have:
An entity is represented by a JSON object with the following syntax:
- The entity id is specified by the object's
id
property, whose value is a string containing the entity id.- The entity type is specified by the object's
type
property, whose value is a string containing the entity's type name.- Entity attributes are specified by additional properties, whose names are the name of the attribute and whose representation is described in the "JSON Attribute Representation" section below. Obviously, id and type are not allowed to be used as attribute names.
Thus, in conclusion, you cannot use a pattern of entities to update.
However, this has an easy workaround: you can create and script (or logical function in a wider program) to do that work, basically:
- To query Orion with a given pattern, getting a set of entity (taking into account pagination, if the number of entities is large).
- To update all these entities with
POST /v2/op/update
(taking into account doing it in batches, as there is a limit of 1MB in Orion request, if the number of entities to update is large).
You can have a look to this script, which works in this way (although in this case is to delete a set of entities instead of updating an attribute).
QUESTION
Due to some error in a script I have thousands of subscriptions (over 5000). Is there a way to delete them all except by hand?
I know that for entities I can use this batch delete script, however, I could not find out if there is a similar way to delete subscriptions. Is there even a batch mode for CRUD operations regarding subscriptions?
...ANSWER
Answered 2020-Jul-19 at 10:36Not as far as I know, but it should be easy to do with a shell script and curl. Another option is through the mongoDB collection, but that would be a hack that could lead to inconsistencies ...
QUESTION
If I plan to install multiple instances of Orion context broker in a high availability scenario like described here, I am wondering how event notifications are handled?
So If I Register/subscribe to an specific Event, which occours then, will I be notified/called one time, or one time for each CB-instance?
...ANSWER
Answered 2020-Jan-23 at 04:27In multi node deployment of Orion ContextBroker as described in referred document, there will be one notification to each event from the broker which will receive the request. The HAProxy will route each incoming request to one of multiple ContextBroker, thus one notification will be generated based on subscription made.
So If you Register/subscribe to an specific Event, then, you will be notified/called one time from one ContextBroker which has received the reuqest.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fiware-orion
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page