Coder Social home page Coder Social logo

Comments (9)

sbernard31 avatar sbernard31 commented on August 28, 2024

For completeness :

I add content of your previous comment here :

During performance test, we surely need something like access-log to easily figure out problems.

Some problems I have met so far:

  1. Frequent gc leading to registration update time out. (our elb can only keep udp session for 10s, time out means offline).
  2. We send msg to kafka synchronously, and one day kakfa has heavy load so it response slow (5ms), which leading to CoapServer thread blocked and unable to process registration update in time.

If I am able to provide a UplinkRequestReceiver of my own, access log can be easily implemented.

And also the link to an existing related issue : #696

from leshan.

sbernard31 avatar sbernard31 commented on August 28, 2024

First note that a LWM2M request or response could means several CoAP request. (e.g. when using blockwise transfer)
This is also true for response.

Then, do you want to monitor LWM2M request or CoAP request ?

  • If you want to monitor LWM2M request we can try think about a new API to do that.
  • If you want to monitor CoAP request, you need to deal with org.eclipse.californium.core.network.interceptors.MessageInterceptor but this is a Californium class, so if modification is needed better to ask to Californium project.

Currently we have org.eclipse.californium.core.network.interceptors.MessageInterceptor which can be called when request is received or when response is sent, but we can not pair them. Upon sendResponse callback we only have response as parameter, but we don't know it is response of which request, especially we don't know when the request is arrived.

A possible working solution. Store time in map with (Token + Identity) as key on receiveRequest and in Response you should also find Token+Identity.

from leshan.

Nick-The-Uncharted avatar Nick-The-Uncharted commented on August 28, 2024

@sbernard31
Sorry for the late response, I got overrun by my work.

I want to monitor lwm2m request, I am using org.eclipse.californium.core.network.interceptors.MessageInterceptor only because currently there is no api to monitor lwm2m request.

I used Store time in map with (Token + Identity) as key to implement this feature, but I want to ignore registerUpdateRequest, this become very complex to implement (I can never know the parameter of sendResponse is the resposne of what request).

from leshan.

sbernard31 avatar sbernard31 commented on August 28, 2024

Sorry for the late response, I got overrun by my work.

No Problem.

I want to monitor lwm2m request, I am using org.eclipse.californium.core.network.interceptors.MessageInterceptor only because currently there is no api to monitor lwm2m request.

Got it. I keep this in mind and will try to work on that when I found time.

I used Store time in map with (Token + Identity) as key to implement this feature, but I want to ignore registerUpdateRequest, this become very complex to implement (I can never know the parameter of sendResponse is the resposne of what request).

I understand but you must deal with MessageInterceptor waiting I work on ☝️ .

Update request are POST with uri.size == 2 and first part of the uri = rd. (see RegisterResource)

I can never know the parameter of sendResponse is the resposne of what request

I don't get this 🤔

from leshan.

Nick-The-Uncharted avatar Nick-The-Uncharted commented on August 28, 2024

I can never know the parameter of sendResponse is the resposne of what request

Because we try to log request handling time, so we do that in the callback of org.eclipse.californium.core.network.interceptors.MessageInterceptor#sendResponse, but that method only have one parameter response, there is no easy way to get the corresponding request.

from leshan.

sbernard31 avatar sbernard31 commented on August 28, 2024

@Nick-The-Uncharted does #1617 could solve your problem ? Let me know.

from leshan.

Nick-The-Uncharted avatar Nick-The-Uncharted commented on August 28, 2024

@sbernard31 Yes, this perfectly solved my problem, thanks a lot

from leshan.

sbernard31 avatar sbernard31 commented on August 28, 2024

@Nick-The-Uncharted, #1617 is now integrated in master. It should be available in 2.0.0-M15. (#1612)

from leshan.

sbernard31 avatar sbernard31 commented on August 28, 2024

@Nick-The-Uncharted Thx to you for taking time to provide feedback to make Leshan better. 😉

from leshan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.