tab before first sentence

tab before first sentence

For the discussion of infrastructure improvements and changes.

Moderator: Moderators

Post Reply
MetalSucker
Posts: 98
Joined: 22 Sep 2014, 20:29

tab before first sentence

Post by MetalSucker » 18 Jun 2015, 05:58

Here's an example:

UPDATEBATTLEINFO 2878 3 0 -1755751665 Charlie in the Hills v2.1

UPDATEBATTLEINFO battleID spectatorCount locked mapHash {mapName}

Wouldn't things be better if there was a [tab] before the first sentence, as well as between sentences? As parsing goes, it would be easier to tab split, then space split the first tab split, get command name and first parameter from there, then consider tab splits 2-infinity as sentences .. rather than "everything after parameter 4 to the end of the line is the map name and it's a sentence, although there's no tab involved as a separator".

I know this might not be constructive, but I'm looking for a reason for not using a tab before the first sentence. Not a problem with maps with _ instead of spaces.
0 x

abma
Spring Developer
Posts: 3535
Joined: 01 Jun 2009, 00:08

Re: tab before first sentence

Post by abma » 19 Jun 2015, 15:48

lobby protocol has way to many restrictions:
- no named parameters, adding / removing of (optional) parameters always requires changes on lobby clients
- new features needs a new commands and needs larger changes on clients, too
- escaping isn't good: its not possible to send a tab in a sentence
- in general: way to many commands
- things i forgot

imo only a rewrite / migration to a more flexible protocol would solve such issues.

sth. like:
- use json for parameters
- reduce commands to insert/update/delete
- allow to register/unregister of getting changes to a specific scope (battle/channel/match making...)

thats already described here in a similar way: https://github.com/spring/uberserver/bl ... rtymap.txt

but i would use json as there already exists great libs for parsers.


to answer your question:

yes it would make sense but its not worth the trouble imo:

- needs a new compat flag
- all clients needs to be changed
-> the (old) compat code would exist for ages which makes maintaining uberserver code more difficult.
0 x

MetalSucker
Posts: 98
Joined: 22 Sep 2014, 20:29

Re: tab before first sentence

Post by MetalSucker » 19 Jun 2015, 16:03

Thank you for replying, so it's mostly a legacy thing, that makes sense.
0 x

Post Reply

Return to “Infrastructure Development”