-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Timestamped Nodes support to Send Operation at Client side #1228
Comments
Hi, my name is Adam and I replaced @Michal-Wadowski as a contributor from Orange Polska. I've been studying the code and I made some first steps and committed them on opl/timestamp_nodes_support_for_client. I created a basic encoder for type TimestampedLwM2mNodes, with optional support for non-timestamped multiple nodes (in that case it uses the old encoder). So far I only tested it in a crude way, but I'm currently working on proper integration tests. As for now, it is possible to send nodes with timestamps, but it's not possible to retrieve them from enablers - I'd like to discuss how to approach this topic after you approve of the encoder/tests. |
(I will look at this tomorrow) |
Hi Adam, welcome on board 😉 I looked quickly at the code and that sounds to go in the right direction.
I'm not sure you will be able to start by integration test. You will probably need to define the client API before you write integration tests ? But you can start to add encoders unit tests.
About client side API, I'm not sure it makes sense that enablers returns timestamped value. The idea is to have an object which is responsible to collect data from enablers, timestamped the data, store it, then we use this stored data to send e.g. I configure my DataCollector to collect This is not crystal clear to me how this should looks like exactly but I think this could be a good way to explore. What do you think ? Anyway, If you really need timestamp from enablers, please let me know the use case 🙂 |
(By the way I will be unavailable from the end of day to Monday 18th april, back on Tuesday) |
Alright, I will work on unit tests for encoders then - you're right about that.
I agree with that, it's better not to modify the existing structure of enablers, but rather add new functionalities on top of the existing ones. However writing a DataCollector is going to be a lot of work. |
I'm not so sure. 🤔 I guess we should define an interface with a very simple default implementation in a first time. Do not hesitate to ask for help if needed. |
I will think about how to implement this idea while you're away and hopefully have something ready by the time you're back 🤞. As for now, I added some unit tests for encoding in SenML-JSON and SenML-CBOR (f6ca130) |
@adamsero any news about this ? 🙂 |
I think I should have something to show later today when it comes to Data Collector. In the meantime, do you possibly know if the next release is going to contain changes from #1218? And if so, when will it come out? It's fairly important for Orange to have these changes in a release sometime soon. |
@sbernard31 OK, in 00baa08 I added Right now there's no real way to test this in practice, so I had to override
Let me know what you think about my code and the ideas 🙂 |
Yes, next release will integrate this.
The plan I had in mind was : #1222.
What could be a good release date for you ? (Note that I will be often unavailable during May) |
About Waiting and as first step you can create a PR with encoder modification + unit test about it (without data collector)? This should be an easy PR and so probably a first good step to enter in Leshan project ?
Yes I also have this kind of idea about adding some command about this in leshan-client-demo.
For now I don't know if we should have several DataCollector or only 1.
Same here I don't know if the collector is responsible to send or not the data. I really need to think more about all of this. 🤔 |
I created a PR #1246 |
It would be convenient for us if you could release a version with timestamped Send before OSCORE, especially since you mentioned you might be less active in May. |
You mean the server part only ? or also the client part which is currently in development ? Do you have an approximate date in mind ? end of April ? mid May ? end of May ? |
@adamsero let me know that ☝️ as soon as possible (especially if you need it for end of April, because there is not so much time remaining 😅 ) Did you try to integrate the current |
The next release will be mainly for you and I'm asking myself if we should add the last californium release 3.5.0 to this release ? Currently we depends on cf 3.4.0. |
Sorry for the delay, but I had to contact team members and we established that the latest date would be around mid-May. It will be enough if only Server-side changes are in the release, but I don't know if we can make it in time to also include Client-side. We could have PR #1246 in the release at the very least (if you even want to include it). |
OK so I think we can integrate #1246 and #1247. I will be unavailable from April 29th to May 8th (included), So either I try to release before the end of the week or when I will be back the 9th. (Note I will be unavailable again from May 13th to 22th and also 26/27th, then I will be avaialble again as usual) |
If you could make it by the end of the week, it would be wonderful 🙏. The new californium version is not a priority, especially if it would slow you down. |
Tomorrow is my last day of work for April, so I need to integrate #1246 and #1247 in the morning to be able to release in time. |
(spoiler alert, this #1224 could prevent me to release tomorrow) |
I made changes to both branches, should be good now. |
Lucky me, today the github quota was not reached , so release is ongoing. 😌 |
Oh, so in that example you could create pools at the same time as you collected data, got it. I was thinking more like:
But we'll think about that another time, for now I'll implement what I described previously. |
I pushed the changes in 0647aad |
I looked at this quickly and I don't get why void collectData(List<LwM2mPath> paths);
void sendCollectedData(ServerIdentity server, ContentFormat format, long timeoutInMs, boolean noFlush); |
Those methods are being called from |
OK but I'm not sure I also get why DataSenderManager also exposes some For me there is no API defined for a But maybe I missed something ? |
I understand your logic, but I proposed a different approach (in my previous comment):
and you agreed on this, so I just did what I said I would do. |
Oops, sorry I didn't understand it like this 😬 I'm not sure I get how it will works with something else than manual sender ? |
Well, IMO there can really only be two types of senders: manual or automatic - users can create their own types but they will just be extensions of the aforementioned ones. Since automatic senders (including periodic ones) don't require user interaction by definition, you only really need to provide access to the manual ones through the manager. Of course, users don't have to use that option if they don't want to, but since the manager already aggregates senders, I thought it would be a good idea to have some utility methods like You have a good point about limiting |
I'm not sure I agree 🤔 Or even leshan-client-demo do configure collect and send period.
In my opinion this add more code for not so much benefits because :
So I would prefer to keep it simple and so remove the methods in manger, but If you really want to added, let's go for it. |
OK, I can remove the I'm not sure where to put the logic from the removed methods though, should it be directly in the |
That sounds good.
Yep I think it makes sense too. |
I think it might be ready to integrate into master, unless you want it more polished? |
Maybe I missed something but do you create a PR ? (or push --force on an existing one ?) |
No worries, I just wanted to wait for you to confirm it's finally ready. Unfortunately, there's going to be a merge conflict if I open a PR from opl/manual_data_sender due to the latest commit 30bad68 on master. The forked repo maintainer from our company is on vacation, so I can't update our forked master to resolve the conflict. Any ideas what to do with that? He'll be back on Monday if anything. |
I didn't look at this yet, anyway PR is right place to discus about details in the code.
I'm not sure I get you ? you mean the But what is the problem exactly you don't know how to fetch this commit ? or you don't have the right to push on master in przem83/leshan ? |
That's it |
Ok so you can fetch the commit 30bad68 and rebase your work on it. I hope I'm clear. |
By 'fetch it', I mean git fetch this commit from leshan repository. I guess if you have conflict you didn't do it. (That's why I asked if "you don't know how to fetch this commit " ?) In your local git repository you can have several remote repositories attached. # I suppose your current remote repo is named origin
# -------------------------------------------------------
# add leshan repo
git remote add leshan [email protected]:eclipse/leshan.git
# fetch leshan master branch
git fetch leshan master
# checkout your local branch if not already done
git checkout manual_data_sender
# rebase it on leshan/master (commit 30bad6824)
git rebase leshan/master
# you will probably need to solve conflict
# once it's done, push force the branch
# (if you are not so sure of you, you can create a local branch of previous origin/manual_data_sender branch)
git push origin manual_data_sender --force If I didn't missed anything, you should be able to create a PR on leshan repo without conflicts. |
(another solution just push the PR with the conflicts and I will resolve it when I will integrate it in |
I created #1268 but it didn't pass the code check - it looks like the compiler doesn't understand the |
I'm currently trying to add more automatic check (see #1265) About your question, this issue(#924) should give you some answer. I see that your PR contains merge commit. For Leshan we don't use it, rebase only. If you have more question relative to your PR, I think it's better to ask at #1268. |
Signed-off-by: adamsero <[email protected]> Also-by: Simon Bernard <[email protected]>
@adamsero, #1274 is now integrated in Do you want to work on Periodic Sender ? In all case, I think we can close this issue and when needed create a new issue to talk about it ? |
Yeah, I think we can finally close this one now. I'm not sure about Periodic Sender's priority right now considering #1222, but I might open it as a new issue at some point in the future. At the moment I have some side tasks but after I'm done with them we can think more about the issue. |
Following #1192 we decide to add Timestamped nodes to Send Operation.
The Server side part was done by #1218.
This issue aims to track / discuss about client side support.
(Here some idea about a
DataCollector
? => #1192 (comment))The text was updated successfully, but these errors were encountered: