-
-
Notifications
You must be signed in to change notification settings - Fork 545
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
Decoupling "inventory" from LoRa Server (looking for feedback) #68
Comments
Yes, it may be a good idea to move (optionally) authorization credits away from loraserver. From my point of view, we can use Radius or LDAP backend as "lora-app-server" and let redis cache credits. Radius is robust, but not for mio/s requests. |
That is actually very good idea
|
https://github.com/arun1587/radius/tree/lora-radius --> i have the prototype of the draft here (the server side). |
Yes, with the decoupling, that will all be possible :-) I think for the sake of simplicity, I will provide a |
All the otaa / uplink and downlink tests are working again after a big refactor (see https://github.com/brocaar/loraserver/tree/app_server_refactor/internal/testsuite for the testcases). There is still a lot to do, as the rest is still failing and I haven't started yet on You can find the first definition of the apis for each component here (look at the There will be some changes in the queueing of data down payloads. After the refactor this will be handled by the application-server. (for class A) LoRa Server will ask the app server for a downlink payload and provides the app server with the max payload length. See also https://github.com/brocaar/loraserver/blob/app_server_refactor/api/as/as.proto#L81 |
I am a little concerned about the use of gRPC, especially for communicating with the lora-app-server that is suppose to maintain the inventory (why could simply use GET request), handles join request (simple POST) and think about crypt (here gRPC sound more appropriate, however a little lonely). Similarly between the lora-controller and the loraserver, why do we use a more standard REST interface? In my opinion, REST would be more standard and simpler to use for most programmers. Also it allow a loosely coupling between the component, with gRPC you have to define all the interface upfront. Maybe I am missing something but I don't see the benefit of gRPC (performace?). Just a thought, the leadership of @brocaar in this project is amazing and the product really well done and I will trust him with whatever he choose to be more appropriate. |
Hi @siscia thanks for your feedback! There are a couple of reasons I think gRPC is a good choice: I wouldn't say REST interfaces are more standardised, but they are more accessible / open. E.g. the transport is just plain text instead of a binary protocol so it is easier to debug. My problem with REST interfaces is that you need a proper framework or else you have to be really good at documentation writing. When an API becomes more complex, it is really easy to make a mistake (either you forget to document fields, or as an user, you forget to implement them, make wrong assumptions about data types). The advantage I see in using gRPC is that the API is defined in a The lora-app-server component will have a REST interface (most of the loraserver API will be moved to the |
Just a quick update on the progress (from the outside it might seem that this issue takes ages to complete)! The loraserver refactor is as good as complete (there might be some really small API changes). I'm now working on the last lora-app-server backend bits. When that has been done, I'm planning to migrate the AngularJS code to ReactJS (the AngularJS code was hacked quickly together and I think it can be done better) and update the documentation, as there are quite some new steps involved to setup a LoRa Server architecture. |
And LoRa Server 0.12.0 and LoRa App Server 0.1.0 are out :-) Please see the changelogs for upgrade information + https://docs.loraserver.io/lora-app-server/ for LoRa App Server documentation. Looking forward to your feedback (and bugreports 😁)! |
hi brocaar, |
I'm thinking about decoupling the "inventory" part from LoRa Server. I think this makes the whole setup more flexible, as it allows you to use a different data storage, data schema etc, different transports between the
lora-app-server
and the application receiving (and sending) payloads. Below a draft diagram:This means that the Application / Node and Channel(List) APIs will be moved to the new
lora-app-server
, and thatloraserver
only has knowledge about a node-session.My idea is to keep the RESTful and gRPC api with (optional) JWT auth in
lora-app-server
, all other gRPC interfaces will be (optional) client side certificate auth only as they should not be exposed to the outer world directly. Of course this means there will be some breaking changes, but I think apart from moving the API from one service to the other, we can limit the impact.Looking forward to feedback and thoughts.
The text was updated successfully, but these errors were encountered: