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

Remove "timestamp" field from message #147

Closed
joshdvir opened this issue Feb 1, 2017 · 5 comments
Closed

Remove "timestamp" field from message #147

joshdvir opened this issue Feb 1, 2017 · 5 comments
Milestone

Comments

@joshdvir
Copy link

joshdvir commented Feb 1, 2017

Hi @FZambia

Wanted to know why does the server needs to send a timestamp if it's in insecure mode?

Timestamp is needed in normal mode only from my understanding.

If removed it can save traffic 😄

Thanks

@FZambia
Copy link
Member

FZambia commented Feb 2, 2017

@joshdvir hello, do you mean timestamp in connect client to server message? It's not needed in insecure mode. Or you mean timestamp in every broadcasted message - if yes it's not related to security - it's a Centrifugo server time when every message was created.

@joshdvir
Copy link
Author

joshdvir commented Feb 2, 2017

@FZambia yes I meant the timestamp send in every broadcasted message, does Centrifugo server use it?

From going over the code I didn't see the client using it, if removed it can save traffic.

Don't you think that any application has it's own logic about when messages are created and they use that? why does the server needs to send when messages where created ?

Thanks

@FZambia
Copy link
Member

FZambia commented Feb 2, 2017

Actually this was added in Centrifuge (written in Python) after feature request in issue, so it was migrated into Go server version to preserve backwards compatibility. I've never used it myself so I'd be happy to remove it. If someone needs timestamp - it can be added into message payload.

But this is a breaking change for those who rely on it somehow. So at least we should wait with this for a while to collect opinions against removing it, then deprecate it in release notes and then remove. I'll change title of this issue to be more precise and let's wait.

@FZambia FZambia changed the title Centrifugo sends "timestamp" in insecure mode Remove "timestamp" field from message Feb 2, 2017
@joshdvir
Copy link
Author

joshdvir commented Feb 2, 2017

👍 great, thanks a lot.

@FZambia FZambia added this to the v1.7.0 milestone Feb 17, 2017
@FZambia FZambia closed this as completed Feb 28, 2017
@williambao
Copy link

Hi @FZambia ,
Could you update the Android SDK for this?
Android SDK crashed when receive message from server, because the message json no timestamp property...
image

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