hubclientinfo PUSH requests

Issue #3 resolved
John Henderson created an issue

As per section 15.2.1 of OCPI 2.2, the HubClientInfo module contains a Push model. In order to provide all of the functionality of OCPU, the ocn-client should implement this Push model.

Comments (6)

  1. John Henderson reporter

    This may be complex in OCN’s case due there being both connections on both the local OCPI platform as well as remote OCPI connections through OCN. (Perhaps this is why this wasn’t implemented already). I am thinking though that it would be valuable just to start with push to local OCPI, with a view to possibly extending to pushing to remote connections in the future.

    I am considering implementing this using Spring Data @DomainEvents (https://www.baeldung.com/spring-data-ddd). My thinking is that an observer/pub-sub of some kind will make it easier to implement this with minimal coupling/changes to the other OCPI module implementations. Any thoughts on this?

  2. Adam Staveley

    Yes, you are right, we have not yet implemented this due to the complexity. It is in our internal backlog and scheduled for around January time. If you wish to submit a first implementation you are very welcome!

  3. John Henderson reporter

    @Adam Staveley Hi Adam, a couple questions for you when you have a moment. Both are in the context of HubClientInfo push model.

    1. If a platform has updated ClientInfo, should a notification be sent to that same platform or should it be excluded from the notification? My opinion is that it should be excluded but I don’t think that is in the OCPI spec.
    2. Should a given notification be sent a single time to a platform or should the notification be sent to each role/party in a platform? If it is a single notification, what should be used for the OCPI-to-party-id and OCPI-to-country-code request headers? I think the straightforward approach is to send a notification to each role/party in a platform, but I am wondering if the platform would consider that to be redundant notifications.

    Apologies if you’re not the correct person to ask or unsure. It should be easy to change to change this behaviour later, but I thought it would be good to get the questions out there.

  4. Adam Staveley

    Hi John,

    I would say:

    1. I agree, I think we can exclude the sending platform from being notified.
    2. I also think it’s redundant to send the notification to each party within a platform. Assuming the platform has a single hubclientinfo receiver interface that operates on behalf of any number of parties within the platform, we could simply not send any OCPI routing headers when sending these notifications out.

  5. Adam Staveley

    The solution, from John Henderson, has been included in v1.1.0 RC0, which can be found in the develop branch.

  6. Log in to comment