johnblackford / agent

A Python implementation of a STOMP Agent (for the USP protocol as defined by the Broadband Forum).
MIT License
2 stars 5 forks source link

cfg/agent.json missing #1

Closed sreedm closed 5 years ago

sreedm commented 5 years ago

Hi,

I have pulled the agent code and I see that the directory "agent/cfg" is missing. while running agent, in main(), cfg/agent.json file is not available. can you please add the missing directory.

Thanks, Sreedevi

johnblackford commented 5 years ago

Sreedevi,

Thanks for raising this issue. The config file is only used when the "product class" is either "RPi_Motion" or "RPi_Camera", which are special installations on a couple of my raspberry pi devices. I'll add the file later tonight when I get back home.

sreedm commented 5 years ago

Thanks John.

John, I see in DB files the below values for controller Device.LocalAgent.Controller.1.EndpointID": "controller-stomp-johnb" Device.LocalAgent.Controller.1.MTP.1.STOMP.Destination": "/queue/controller-stomp-johnb" Device.STOMP.Connection.1.Host": "stomp.johnblackford.org" so, your controller is running on different machine? and in the path specified above?

-Sreedevi

johnblackford commented 5 years ago

I've added an example config file.

johnblackford commented 5 years ago

Regarding the controller, I have an example controller that I was using for testing but it is no longer being maintained and the stomp.johnblackford.org server is also not being maintained.

sreedm commented 5 years ago

Thank you. On 24-Jan-2019 10:13 PM, "John Blackford" notifications@github.com wrote:

I've added an example config file.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnblackford/agent/issues/1#issuecomment-457267341, or mute the thread https://github.com/notifications/unsubscribe-auth/AeE7JkIbbqxyyZd2-RmmiVEq_q50DHYtks5vGeK7gaJpZM4aMFVW .

sreedm commented 5 years ago

Hi John,

This "/queue/controller-stomp-johnb" is just a flat file or process running for controller? w.r.t the binding between USP and STOMP, i was thinking to actually use the message queues or can be done in any other way. Any insight on this is really helpful to me.

Thanks, Sreedevi

johnblackford commented 5 years ago

I was using a RabbitMQ server as a STOMP server when I was testing. The "/queue/controller-stomp-johnb" was a queue on the RabbitMQ server that the test USP Controller was listening to.

sreedm commented 5 years ago

Git it. Thanks On 01-Feb-2019 12:05 PM, "John Blackford" notifications@github.com wrote:

I was using a RabbitMQ server as a STOMP server when I was testing. The "/queue/controller-stomp-johnb" was a queue on the RabbitMQ server that the test USP Controller was listening to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnblackford/agent/issues/1#issuecomment-459622420, or mute the thread https://github.com/notifications/unsubscribe-auth/AeE7JsI2JHSDmV79q_8fO8l_YB-CIBFhks5vI-AzgaJpZM4aMFVW .

sreedm commented 5 years ago

Sorry. Got it. On 01-Feb-2019 1:51 PM, "sreedevi m" sreedm@gmail.com wrote:

Git it. Thanks On 01-Feb-2019 12:05 PM, "John Blackford" notifications@github.com wrote:

I was using a RabbitMQ server as a STOMP server when I was testing. The "/queue/controller-stomp-johnb" was a queue on the RabbitMQ server that the test USP Controller was listening to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnblackford/agent/issues/1#issuecomment-459622420, or mute the thread https://github.com/notifications/unsubscribe-auth/AeE7JsI2JHSDmV79q_8fO8l_YB-CIBFhks5vI-AzgaJpZM4aMFVW .

sreedm commented 5 years ago

Hi John,

what is purpose that USP Agent sending Periodic Notif messages?? Is this to keep the connection alive between agent and controller?

If so, can the subscription for PeriodicStompNotif can be disabled and can i enable heartbeats instead?

Thanks, Sreedevi

On Fri, Feb 1, 2019 at 1:51 PM sreedevi m sreedm@gmail.com wrote:

Sorry. Got it. On 01-Feb-2019 1:51 PM, "sreedevi m" sreedm@gmail.com wrote:

Git it. Thanks On 01-Feb-2019 12:05 PM, "John Blackford" notifications@github.com wrote:

I was using a RabbitMQ server as a STOMP server when I was testing. The "/queue/controller-stomp-johnb" was a queue on the RabbitMQ server that the test USP Controller was listening to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnblackford/agent/issues/1#issuecomment-459622420, or mute the thread https://github.com/notifications/unsubscribe-auth/AeE7JsI2JHSDmV79q_8fO8l_YB-CIBFhks5vI-AzgaJpZM4aMFVW .

johnblackford commented 5 years ago

Sreedevi,

Periodic Notification messages are not the same as the connection keep alive. The connection keep alive is handled at the Message Transfer Protocol (MTP) layer: CoAP, WebSockets, or STOMP. Actually, CoAP doesn't have persistent connections as it is UDP-based, but STOMP does and has its own keep-alive mechanism (see https://usp.technology/specification/mtp/stomp/#handling_the_stomp_heart_beat_mechanisms ).

The purpose of the Periodic Notification is more to see if there is anything the USP Controller might want to do on a periodic basis (retrieve data, perform diagnostics, etc.).

sreedm commented 5 years ago

Hi John,

I don't see the implementation for ADD and DELETE in agent code (request_handler.py). Do you have the plan to add them into the agent code? Is there any reason for not being added those functionalities in the code? if i have to test the ADD/DELETE functionality from my controller , how do i proceed?

Thanks, Sreedevi

On Tue, Feb 19, 2019 at 3:26 AM John Blackford notifications@github.com wrote:

Sreedevi,

Periodic Notification messages are not the same as the connection keep alive. The connection keep alive is handled at the Message Transfer Protocol (MTP) layer: CoAP, WebSockets, or STOMP. Actually, CoAP doesn't have persistent connections as it is UDP-based, but STOMP does and has its own keep-alive mechanism (see https://usp.technology/specification/mtp/stomp/#handling_the_stomp_heart_beat_mechanisms ).

The purpose of the Periodic Notification is more to see if there is anything the USP Controller might want to do on a periodic basis (retrieve data, perform diagnostics, etc.).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/johnblackford/agent/issues/1#issuecomment-464894776, or mute the thread https://github.com/notifications/unsubscribe-auth/AeE7Jm75lslWH7n-4KQmEDmu0WQCaA97ks5vOyF6gaJpZM4aMFVW .