@griatch said in A new platform?:
In the Evennia case we use a two-pronged approach for this - if the web client's websocket connection fails or times out the web client transparently falls back to using old-style COMET long-polling. Haven't found any browsers having issues with that combination so far
That's why you don't see issues - because you've fallen back to not using websockets when they fail and/or are unavailable. A purely websockets-based solution is not reliable.
@ashen-shugar said in A new platform?:
I honestly don't see the difficulty? Am I missing something?
I'm not sure what you're trying to demonstrate with the pipe thing. What @grapenut showed makes sense... if you tack on JSON output to the end of, say, +finger, then you can parse that on the webclient side:
&cmd-+finger:think pemit(%#,ALL KINDS OF ASCII JUNK)[wsjon(finger: { name: [name(%0)], position: [xget(%q0,position)], etc. })]
But to implement that for every softcode command would be a giant and painful undertaking, and I'm not sure how you'd handle the hardcoded commands like pages and channels. Sending input with { to: [ list, of players ], subject: "Subject", message: "Some message }
and trying to convert that to +mail names=subj/message
again sounds like a lot of work and kinda messy.
Basing a web API on +-commands or the website trying to send think [wsjson(stuff)]
sent over websockets just isn't an approach I'd advocate, that's all. If somebody wants to do it, then yes - of course - it's technically possible.
ETA: On a more positive note though - if you isolated the JSON stuff in a separate set of commands, like website/profile, website/scenes, etc. that JUST did JSON, then I don't think it would be quite so bad. You wouldn't need to have the website send softcode, you wouldn't have to center the web interface around existing MUSH commands, and you wouldn't need to kludge ASCII and JSON together. You still have the websocket/input/hardcoded command issues, but it's better than nothing.