Comments (16)
Hello,
do you have some logs to share that show the issue?
from kura.
Hi @MMaiero,
here are the relevant device events: container_device_events.csv
As you can see, if you order them by the Created On
field, the last event is missing the USER-INTERFACE-V1
custom APP ID.
I confirm that by creating an APP ID caching mechanism in one of our custom components and publishing the certificate after 5 seconds the problem no longer occurs.
from kura.
Are you seeingg this issue with only your custom component (USER-INTERFACE-V1) or also with other "native" Kura components?
from kura.
This problem apparently occurs only with "non-native" APP IDs. I imagine that the native components are loaded before the connection is established due to dependencies and therefore the problem does not manifest because the APP IDs have already been collected.
from kura.
The code that manages that publishing is this one:
Once the app registers itself to the cloud connection, it should be tracked and an app update should be published.
From that point on the app should be recorded in a map. The only point where I see a removal from that map is this one:
That is only called when the request handler is unregistered.
from kura.
That's right, just to solve the problem of multiple sequential sending of multiple "non-native" APP IDs, I had to create three new methods, to avoid immediate sending of the certificate for each APP ID, which can cause server-side processing in the wrong order.
These are the methods in kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/cloudconnection/request/RequestHandlerRegistry.java
interface:
public void registerRequestHandlerNotPublish(String appId, RequestHandler requestHandler) throws KuraException;
public void publishRegisteredRequestHandlers() throws KuraException;
public void unregisterNotPublish(String appId) throws KuraException;
As can be guessed, the *NotPublish
methods simply add or remove the APP ID in/from the map and the publishRegisteredRequestHandlers
method is called after a certain period of time and only deals with sending the certificate.
The call to these new methods, however, is currently done by us externally by one of our dedicated components and in my opinion should be included "natively" in kura.
from kura.
Wouldn't be better to add a (maybe configurable) delay in the app processing? So the API stays the same and the code changes to accomodate this need?
from kura.
We have multiple OSGi bundles that can load dynamically in rapid succession, and we have no control over the loading sequence and timing.
from kura.
that's why I was suggesting a configurable delay to be specified in the Request Handler preferences so that the registering operation can stay the same. A separate thread can proceed on the APP/BIRTH publishing after x seconds or x seconds after the last registration events so that you can send only one message to the cloud with all your apps in it
from kura.
It is not acceptable for us to delay loading our bundles, which may number in the dozens and interface directly with hardware components that need to be available to other bundles as soon as possible.
from kura.
No, maybe I was not clear on my proposal: my idea would be to add a thread in CloudServiceImpl that processes the registrations in
from kura.
Sorry, I didn't understand correctly.
Yes, that is exactly what would be needed.
I also don't understand why the APPLICATION certificate is not sent the same way in CloudConnectionManagerImpl
and so that class should be corrected as well.
from kura.
Sorry, I didn't understand correctly.
Yes, that is exactly what would be needed.
That would be a great contribution for the project if you are willing to partecipate to it. We would be happy to have new contributors to Eclipse Kura!
I also don't understand why the APPLICATION certificate is not sent the same way in CloudConnectionManagerImpl and so that class should be corrected as well.
Not sure there too, it may be because of the different contract.
from kura.
Thank you very much for your reply.
As soon as I have some time I will create a PR.
from kura.
This issue is stale because it has been open for 60 days with no activity.
from kura.
This issue was closed because it has been inactive for 14 days since being marked as stale.
from kura.
Related Issues (20)
- ERR_INVALID_HTTP_RESPONSE HOT 6
- Expired certificate for Eclipse Marketplace (ssl-eclipse-marketplace) HOT 1
- Unable to install packages from Eclipse Marketplace
- Question: Eclipse Kura Component is now listed as deprecated ? HOT 4
- Kura Configuration: device.custom-name & Device Custom-Name wrongly saved via Kapua Configuration HOT 9
- Hosted p2 repo containing Kura's target definition HOT 2
- Question: What is the best way to update a device running Kura maintaining components and configurations? HOT 2
- Free subscription via CloudConnectionManager HOT 2
- OSGi Metatype annotations missing from the target definition HOT 2
- Raspberry Pi Installation Documentation Error - Kura package name(s) changed? HOT 1
- install modbus package from eclipse market failed HOT 1
- installed modbus driver successfully but cannot select the modbus option when create a new driver HOT 2
- In kura 5.3.1 I have duplicate keystores HOT 10
- Bump Bouncy Castle to 1.74 HOT 2
- how config kura project in eclipse in order to run or debug HOT 3
- Ability to add / remove single channels from an asset programmatically HOT 5
- Custom cloud connector for AMQP / RabbitMQ HOT 5
- Kura Build 5.4.0 RELEASE build fails with JAVA 17
- Cannot access Web UI on VPS HOT 7
- Kura build failing in JAVA17 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kura.