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

Test Connection Ideas #11

Closed
KaraMelih opened this issue Apr 14, 2022 · 6 comments
Closed

Test Connection Ideas #11

KaraMelih opened this issue Apr 14, 2022 · 6 comments

Comments

@KaraMelih
Copy link
Collaborator

In 80bb6f3 I added a part where it checks if "test-connection" is passed in the '_id' field of an observation message.
I (stupidly) was printing it on the server, thinking that this would be a confirmation message. However, of course, this is printed on the server terminal. Thus, the user still won't know if their messages are received by the server.

We need to feed this back to the user, without having private channels, the only option I see is publishing a message in the observation(?) topic saying that;
2022-04-14 15:45 connection test message is received from 'TEST', the user would still be required to launch a second terminal and subscribe to something...

Alternative, and maybe unnecessarily sophisticated solution would be;

  • user submits a message via a function called test_connection()
  • test_connection() generates a hash and publishes {'_id' : 'test-connection', ''hash':'xsASgwe35s'}
  • test_connection() subscribes to a special test channel and listens
  • on server run_coincidence receives {'_id' : 'test-connection', 'hash':'xsASgwe35s'} and submits a message to this channel with this specific hash
  • test_connection() receives messages (possibly more than one, if there are also others testing) but it compares this hash
  • if there is a hash_sent == hash_read match, it confirms that the message is received by the server.

is this an overkill? :D

@KaraMelih
Copy link
Collaborator Author

@Storreslara @joesmolsky ideas on this?

@KaraMelih
Copy link
Collaborator Author

well, I see that a timestamp would do the trick, no need for hash actually. If we have enough precision on the timestamp it should work.

@Storreslara
Copy link
Collaborator

agree just a time stamp in UTC would be enough

@KaraMelih
Copy link
Collaborator Author

Let's do this; "record the timestamp, check the stream, if the message with your timestamp is received, display 'confirmed'" idea also on the observation messages. (as suggested in SNEWS2/SNEWS_Publishing_Tools#38)

@habig
Copy link

habig commented Jun 2, 2023

test-connection is all working now. Is there anything left with this issue, or can it be closed?

@KaraMelih
Copy link
Collaborator Author

Hmm, reading your previous comment, I see that we could indeed also send a confirmation after the user sends an observation message.

While this can be added, do we really need it? Is it sufficient for the user to test their connection using test-connection function, or would the user also wants to get that confirmation after they submit the observation message

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

3 participants