« first day (1894 days earlier)      last day (965 days later) » 
00:00 - 23:0023:00 - 00:00

11:00 PM
That's typical header stuff. In fact you could do it in the handshake phase: a special header/ message that is exchanged at a new connection.
 
@sehe yeah true
so it'd be something like [version.major][version.minor][version.build][id][size][body]?
or even [version.major][version.minor][version.build][format][id][size][body]
 
I wouldn't repeat that every message. Unless, of course, you want to implement some commands with extra features (compression, encryption, asynchronous resposne multiplexing etc etc) and not others.
I'd say "connect -> handshake -> [message]..." and let handshake establish the parameters for the entire session (things like prio, authentication, keepalive, idle time etc)
 
Basically, if it applies to every message in a session, send it once up-front and be done with it. Send something in each message if and only if it can vary from one message to the next, so it's needed to understand that message.
 
^ +1
 
@sehe compression was one I was thinking about - gzip namely
boost json then gzip it and send it
 
11:12 PM
lzop will be faster, but yeah. Maybe just use websockets (from Beast) and enable permessageflate
 
I've had bad experiences with that
 
Be careful, often compression just hurts perf.
@JoshMenzel "that" being?
 
Beast
so what would the handshake be?
 
I think that's probably for exactly the same reasons as with ASIO
 
still binary?
 
11:14 PM
Everything is binary, so yes.
 
I really don't want to go down the path of websockets
since not everything has a websocket client implementation that works well
 
That's ok, I was just thinking laterally.
@JoshMenzel Huh. Python and node sure do
 
(though a websocket is still a socket)
c# doesn't
 
Mmm. Doesn't it have autobahn and similar?
 
maybe I'm not sure
I just know the few times I looked at it
it was just so all over the place
 
11:16 PM
@JoshMenzel Yeah it comes with the HTTP baggage though. Which is a boon when you want to host in a big-league server like iis/uwsgi
 
@JoshMenzel All worthwhile languages do. ;)
 
Can a websocket get this same throughput as we have now?
I doubt something like google chrome or edge could keep up
 
@JoshMenzel Overhead imposed by websockets themselves is quite low.
 
It should be pretty close. A little more protocol overhead, but also less to worry about and vastly easier to interface from other languages
@JoshMenzel Wait What. I'm pretty sure you just named the most crazy optimized networking applications in existence.
Even Edge, which I despise.
 
For what (little) it's worth, I prefer IXWebsocket over Beast.
 
11:21 PM
I just remember edge and chrome being terrible with executing javascript
 
Well. That will be circumstantial. It's hard to measure anything in the browser without measuring the UI interactions
 
I mean that'd be the point
 
But, you can write js outside a browser
 
onmessage -> receive message, decode json, update UI elements as the data said
I know
but I'm telling you what people are going to expect to be able to do
 
@JoshMenzel And again, we're back to "speed doesn't happen by accident". That also goes for web application design
 
11:24 PM
right
 
Building responsive apps takes a lot of good judgement and planning. And no, browsers aren't "slow". Yes, there was a time when Safari had abysmal Javascript performance - relatively.
 
so how hard would it be to adapt the server/client to be websocket client/server
 
And there are times when Windows browsers are slow due to interfering virus scanners.
 
well windows is the main platform this is going on
and most don't have optimized configurations
 
But by and large, Javascript execution is the bread and butter of a modern browser. This stuff be working already.
 
11:25 PM
@JoshMenzel If they really expect to do that, then Websockets becomes almost a necessity. No browser is going to support your protocol without writing code to do so (and even carefully written JS is going to have a hard time keeping up with pre-written, heavily optimized Websocket libraries)
 
just plain defaults
 
Defaults are usually good, here.
@JerryCoffin What Jerry said, once again
 
@sehe so then how hard would it be for me to adapt what the server and client have and do a websocket implementation of that?
that does boost json
where you add/remove json fields via something like Add<T>(std::string const& name,T data)
where T can be a char*, string, List, Map, etc..
 
And the elephant in the room is little none of this fits in the original "1k connections x 512kb-1Mb/50ms over loopback".
Are you secretly a manager? You're doing scope creep like no other :L
 
oh god no
I'm just curious at this point
I have a game with a c++ sdk
I want to make that data available outside of the game
 
11:29 PM
@JoshMenzel E_TOO_VAGUE and E_OVERLOAD. I'm going to focus on strandifying those detached threads and call it quits for the day
 
for other developers and programs
 
@sehe Serializing and transport should be kept separate anyway.
 
Agreed.
 
I guess I'm just lost as to what the best path forward is now
 
@JoshMenzel Seems like the obvious choice is either BSON or MsgPack (flip a coin) over Websockets.
 
11:35 PM
yeah
 
Is there a way to get whatever this value is: `-fconstexpr-depth` from the C++ compiler? 🤔
(Got some code that would do better knowing what this value is than without, though the value itself is not necessary)
 
00:00 - 23:0023:00 - 00:00

« first day (1894 days earlier)      last day (965 days later) »