Skip to content
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

Transport Layer Module design. #1295

Open
Tracked by #1629
sbernard31 opened this issue Aug 5, 2022 · 5 comments
Open
Tracked by #1629

Transport Layer Module design. #1295

sbernard31 opened this issue Aug 5, 2022 · 5 comments

Comments

@sbernard31
Copy link
Contributor

sbernard31 commented Aug 5, 2022

Adding the new transport layer (#1025) means probably changing the java module design.

Current modules are described at : https://github.com/eclipse/leshan/wiki/Modules

Here is a proposal for a new design :

leshan-core

leshan-tl

leshan-demo

@sbernard31
Copy link
Contributor Author

@JaroslawLegierski, @Warmek do you have any opnion about this ?

I try to get feedback before to do this very impacting changes.

@sbernard31
Copy link
Contributor Author

sbernard31 commented Feb 21, 2024

@JaroslawLegierski, @mgdlkundera, I would like to do that renaming soon.
So if you have any opinion ? (about the renaming itself and/or the plan/timing about that it)

I think we will be able to do this once we have the minimum viable feature for write attributes in master. (#1514 (comment))

sbernard31 added a commit to sbernard31/leshan that referenced this issue Jun 28, 2024
sbernard31 added a commit to sbernard31/leshan that referenced this issue Jun 28, 2024
sbernard31 added a commit to sbernard31/leshan that referenced this issue Jul 5, 2024
Move Bootstrap Server code in dedicated maven modules.

This is part of  :
eclipse-leshan#1295

Refactoring was done in 2 commits to try to keep git history :
https://stackoverflow.com/questions/2314652/is-it-possible-to-move-rename-files-in-git-and-maintain-their-history
This commit doesn't build.
sbernard31 added a commit to sbernard31/leshan that referenced this issue Jul 5, 2024
Move Bootstrap Server code in dedicated maven modules.

This is part of  :
eclipse-leshan#1295

Refactoring was done in 2 commits to try to keep git history :
https://stackoverflow.com/questions/2314652/is-it-possible-to-move-rename-files-in-git-and-maintain-their-history
sbernard31 added a commit to sbernard31/leshan that referenced this issue Jul 5, 2024
sbernard31 added a commit to sbernard31/leshan that referenced this issue Jul 5, 2024
@sbernard31
Copy link
Contributor Author

sbernard31 commented Jul 5, 2024

This is implemented by #1628.

Finally, I decide to go with leshan-demo-??? for demo and leshan-lwm2m-??? for library.
So when modules are sorted by alphabetic order, they are grouped by kind (demo, transport, lwm2m)

Here is renaming details :

leshan-bsserver-demo ─────────────► renamed by ──────► leshan-demo-bsserver
leshan-client-demo ───────────────► renamed by ──────► leshan-demo-client
leshan-server-demo ───────────────► renamed by ──────► leshan-demo-server
leshan-server-core-demo ──────────► renamed by ──────► leshan-demo-servers-shared
leshan-core-demo ─────────────────► renamed by ──────► leshan-demo-shared

leshan-integration-tests ─────────► not changed ─────► leshan-integration-tests 

leshan-client-core ───────────────► renamed by ──────► leshan-lwm2m-client
leshan-core ──────────────────────► renamed by ──────► leshan-lwm2m-core
leshan-server-core ───────────────► split in ──┬─────► leshan-lwm2m-server
                                               └─────► leshan-lwm2m-bsserver
leshan-server-redis ──────────────► renamed by ──────► leshan-lwm2m-server-redis

leshan-client-cf ─────────────────► split in ──┬─────► leshan-tl-cf-client-coap
                                               └─────► leshan-tl-cf-client-coap-oscore
leshan-server-cf ─────────────────► split in ──┬─────► leshan-tl-cf-server-coap
                                               ├─────► leshan-tl-cf-bsserver-coap
                                               ├─────► leshan-tl-cf-bsserver-coap-oscore
                                               └─────► leshan-tl-cf-server-coap-oscore

leshan-core-cf ───────────────────► split in ──┬─────► leshan-tl-cf-shared
                                               └─────► leshan-tl-cf-shared-oscore


leshan-tl-javacoap-client ────────► renamed by ──────► leshan-tl-jc-client-coap
leshan-tl-javacoap-client-coaptcp ► renamed by ──────► leshan-tl-jc-client-coaptcp
leshan-tl-javacoap-server ────────► renamed by ──────► leshan-tl-jc-server-coap
leshan-tl-javacoap-server-coaptcp ► renamed by ──────► leshan-tl-jc-server-coaptcp
leshan-tl-javacoap-core ──────────► renamed by ──────► Leshan-tl-jc-shared

I know some will think that there is now too much module and this is painful but the project is growing and modularity will help for maintainability.

Note that some packages are renamed too but your IDE should fix it using kind of "Organize Import" feature.

There is also some class renaming, all are not listed here but some noticeable :

  • Now we have a clear separation between LWM2M (device management) Server and LWM2M Bootstrap Server :
    • DownlinkRequest is split in DownlinkDeviceManagementRequest and DownlinkBootstrapRequest
    • UplinkRequest is split in UplinkDeviceManagementRequest and UplinkBootstrapRequest

@sbernard31 sbernard31 mentioned this issue Jul 5, 2024
3 tasks
@niklas-sparfeld-gcx
Copy link

In today's SNAPSHOT I see that there are two packages org.eclipse.leshan.server and org.eclipse.leshan.servers. Two import statements I stumbled upon are

import org.eclipse.leshan.server.security.Authorizer
import org.eclipse.leshan.servers.security.Authorization

Are you aware of this naming? I found it slightly confusing at first glance, but I did not have the time to look into whether you wrote down some reasoning already. sorry bout that.

@sbernard31
Copy link
Contributor Author

Yep that still a bit complicated to me to find good name 😁

The **.servers.** packages are in **-servers-shared modules.
Those modules are shared between LWM2M Server and LWM2M Bootstrap Server code.
Do you think I should remove the s ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants