Permanent Messages ?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

genar
Posts: 34
Joined: 13 Jul 2017, 11:49

Permanent Messages ?

Postby genar » 12 Jan 2018, 05:42

Does smartfoxserver Supports some Kind of permanent Messages ?

I want the possibility for Players to Send each other Messages without the chat. Some Sort of private Letters. Those should stay in a list and shouldn't be Auto removed at some Point.

Is this possible ? Or do i need to Code that on myself ?
User avatar
Lapo
Site Admin
Posts: 19732
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Permanent Messages ?

Postby Lapo » 12 Jan 2018, 08:36

Hi,
private messages are possible, yes. About being "permanent", I don't know what you mean.
Once the message has been delivered to the target user, the client application could store it locally so that it's always available.

I am not sure if this is what you're looking for. An alternative would be to store these permanent messages into a database so that every user can read them when they need to.

Let me know
Lapo
--
gotoAndPlay()
...addicted to flash games
genar
Posts: 34
Joined: 13 Jul 2017, 11:49

Re: Permanent Messages ?

Postby genar » 12 Jan 2018, 11:29

Thanks for your answer :)

Thats what i mean. But wouldnt that be a bit too much when storing them in an database ? Im using Mysql, imagine the server would create a table for each player, which stores the messages. That would be a mess. And i read somewhere that Mysql is only good to manage tables with much entrys, not many tables.

I hoped that SmartFoxServer would store Private Messages somewhere automaticly.
User avatar
Lapo
Site Admin
Posts: 19732
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Permanent Messages ?

Postby Lapo » 12 Jan 2018, 11:45

I don't see any problem with storing text messages with MySQL, there is nothing to worry about.
If storage limits is what concerns you, the problem would exist regardless of the medium you use (files, database etc.). In other words, storing every user's message can indeed take quite a lot of disk space.

The question is, do you really need to keep every single message? Maybe you could store a message history that goes back only a certain amount of time, so you can purge all the old data at some point.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 14 guests