9
vane
4y

About 4-5 hours ago I wanted to make simple websocket to get input from textarea and parse it on server and somehow got myself into developing in asyncio -> aiohttp -> graphql-core -> graphql-ws -> aioredis
and svelte-> typescript
I still didn’t make the stuff I wanted but I’m very close on backend at least.
I have some frontend part somewhere in my old prototypes so it will be faster if I figure out svelte.

Still don’t understand what the fuck just happened.
Maybe it’s because I wanted try those frameworks for a long time.

All ‘simple’ examples I found have around 20-30 files for backend and same amount for frontend so more then 50 files to get this shit working.
They’re called oh irony “simple chat”.
Now I see why no one fucking understands this shit.

I’m trying to cut mine to 5 files.

I thought developers are lazy bastards who don’t like write code.
But now after this they’re all looking like adhd coders.

Looks like Monday won’t be my best day.

Comments
  • 3
    You could just take a raw request and write a simple middleware/socket server to implement a single websocket endpoint.

    https://developer.mozilla.org/en-US...
  • 1
    @SortOfTested yeah but what struggle that would be ?
  • 2
    @vane
    About the same as implementing a massive application. Which seems to be where you're at. 😸
  • 0
    @SortOfTested yeah but when I cut this to ~5 files and leave the imports I’m interested in I can easily plug some additional stuff from the ecosystem, don’t want to cut the road at this point.
  • 0
    Yeah well I think I’ll just switch to javascript apollo server or implement subscriptions and graphql by myself on top of asyncio cause this python graphql-server version 3 california style is to fancy schmancy for me.
    To much shit, not much value.
  • 0
    Well fuck that I just took aiohttp websockets.
    It’s enough enterprise bullshit for today.
  • 0
    Why do you need graphql on top of websocket? Graphql uses a strict req/res pattern, and the main point of websocket is to break that.
  • 1
    @Lor-inc graphql subscription spec use websockets under the hood for web
  • 0
    @vane Oh right forgot about sub.
Add Comment