Resetting alliance chat

Options
Blackstone
Blackstone Posts: 597 Critical Contributor
When does the alliance chat reset?

Is it based on time, or a certain number of messages?

Thanks in advance for any help.

Comments

  • Blackstone
    Blackstone Posts: 597 Critical Contributor
    Options
    Looked through the forums and can't find anything on it.

    The chat just send you disappear sometimes.

    Other times it seems to stay up forever.
  • Shintok17
    Shintok17 Posts: 620 Critical Contributor
    Options
    I have noticed that it's based on number of messages. In my chat I can't see anything before 14d, but we don't talk much unless there is a Boss event or an Alliance event.
  • Blackstone
    Blackstone Posts: 597 Critical Contributor
    edited April 2019
    Options
    We don't usually talk a lot but my alliance is mainly newer, casual players that have questions.

    I'm the only one in the alliance with a full roster, so most of those questions fall on me to answer.

    As such, I find myself repeating things several times.

    I don't mind, and enjoy being helpful, i just can't figure out what resets the chat, as it seems inconsistent.
  • Phumade
    Phumade Posts: 2,477 Chairperson of the Boards
    Options
    We don't usually talk a lot but my alliance is mainly newer, casual players that have questions.

    I'm there only one in the alliance with a full roster, so most of those questions fall on me to answer.

    As such, I find myself repeating things several times.

    I don't mind, and enjoy being helpful, i just can't figure out what resets the chat, as it seems inconsistent.
    The chat system was always a bolted on afterthought.  Truthfully, they realized along time ago, they could never match the functionality of outside app, and as such never bothered to update it beyond making sure it worked on the latest version of their compiler.

    Honestly,  they may not have a engineer on staff who was actually around when the code was implemented (its that old!) (My account is older than chat, but not by much and its around 6+ months older than the dawn of Alliances).  It could be a legacy do not touch module for all we know, and no one knows how the chat code actually works i.e. buffer sizes, variable names etc..

    Use this opportunity to get your newbies onto an outside chat system, where you can save your faq. guides. etc.  It just makes life easier for everyone, if you think of it as the most rudimentary of message boards.

  • jamesh
    jamesh Posts: 1,600 Chairperson of the Boards
    Options
    Without seeing the code for either the frontend and backend, it is difficult to be sure how it all works.  But here is my guess at how it all works:
    1. When the game starts up fresh (i.e. after the game has been force closed or the device rebooted), it will download 2 weeks of chat history while loading.
    2. While the game is running, it keeps an open network connection to the backend servers.  If an alliance mate sends a message, it will be delivered down this connection and displayed immediately.
    3. If the game is suspended (i.e. some other app is in the foreground on Android/iOS), it won't be reading anything from the backend network connection.  Eventually the connection will be closed for being idle.
    4. When the game resumes (i.e. in the foreground again), it will find its connection has been closed and attempt to reconnect.
    5. There doesn't seem to be any delivery acknowledgement system, so the backend assumes the game received all the messages sent while it was suspended.  The game will receive new messages though.
    At this point, force quitting and starting the app again will fill in the missing messages.  One thing that makes it a little more confusing is that seeing the game's loading screen doesn't necessarily mean the game is starting fresh: you will also see this after the daily data updates, which could be delivered while the game is only suspended.
    I wouldn't have thought it would be that difficult to improve the reliability of this system.  It could be as simple as the following:
    1. When reconnecting to the backend, check the time stamp of the most recent alliance message.
    2. Send a request to the backend for all messages with time stamped after this point as soon as the connection is established.
    3. The backend could then redeliver those messages using the same format used for the current real time delivery.