[HN Gopher] Jamsocket: Back Ends for Realtime Apps
       ___________________________________________________________________
        
       Jamsocket: Back Ends for Realtime Apps
        
       Author : yurisagalov
       Score  : 69 points
       Date   : 2023-06-20 17:15 UTC (1 days ago)
        
 (HTM) web link (jamsocket.com)
 (TXT) w3m dump (jamsocket.com)
        
       | nesarkvechnep wrote:
       | Another reinvention of Erlang processes?
        
         | paulgb wrote:
         | Erlang got a lot right ;)
         | 
         | Sometimes I explain it to Erlang/Elixir world people as
         | "GenServer-as-a-service".
        
       | thedangler wrote:
       | Yeah, Doesn't work well for my iMAC.
        
       | tcper wrote:
       | To build a image and push, spwan a pod? Why not just use FaaS
       | service skip the build step?
        
         | paulgb wrote:
         | You don't need to push every time you spawn, only when the code
         | is changed. Typically, you would use a CI/CD action to push the
         | image (this repo has a simple example:
         | https://github.com/drifting-in-space/jamsocket-jupyter-
         | noteb...)
         | 
         | A typical FaaS is stateless between invocations. We have an
         | explicit "spawn" step because each spawn produces a new server
         | process with its own state and own DNS hostname.
        
       | taw1516 wrote:
       | for someone new to real time apps, can you help me understand how
       | JamSocket is different from some service like Pusher?
        
         | paulgb wrote:
         | Pusher provides a way to simulate a stateful WebSocket
         | connection using a stateless server architecture. Jamsocket
         | provides a stateful server architecture where WebSockets have
         | first-class support.
        
       | aboodman wrote:
       | What is the latency to start a session?
        
         | paulgb wrote:
         | You can see an example by clicking "new game" on here:
         | https://word.red/
         | 
         | We are working on getting it subsecond for most images, but
         | we're not there yet.
        
           | aboodman wrote:
           | Interesting. Is there a latency difference between first
           | instance of an image and nth?
        
             | paulgb wrote:
             | On the free tier there can be (because images are loaded
             | lazily), but on the paid tier we load the images eagerly so
             | that there is not.
        
       | [deleted]
        
       | paulgb wrote:
       | Hey HN! I'm a co-founder of Jamsocket, happy to answer any
       | questions. We've previously been on HN for Plane, which is the
       | open-source engine behind Jamsocket.
       | https://news.ycombinator.com/item?id=33178797
       | 
       | Sorry for the website performance issues, I've disabled the
       | animation which should help.
        
         | pcthrowaway wrote:
         | Can you clarify pricing? "From $25" is terribly opaque. What
         | are the billing criteria?
        
           | paulgb wrote:
           | Thanks for the feedback, I agree and it's something that
           | we're working improving.
           | 
           | Currently most people are paying the $25 flat rate; for this
           | we bump the per-backend memory limit to 2GB and give them a
           | soft limit of 20 concurrent backends, up to 24h duration for
           | those backends, and enable eager image pushing for faster
           | start times. The pricing will become more sophisticated over
           | time as we deal with a wider variety of usage patterns.
           | 
           | The bring-your-own-compute model is a bit clearer because
           | it's simpler for us to model from the side of our own costs.
           | That has a $25/month base fee plus $10 per "server month" of
           | compute connected to the control plane. For bring-your-own-
           | compute there is no cost or limit to the backends that run,
           | since they run on our customer's own hardware.
        
             | pcthrowaway wrote:
             | Thanks for clarifying.
             | 
             | So how does the price scale with the limit on concurrent
             | backends? That's the really important factor in determining
             | whether this is feasible (though I assume given a baseline
             | of 20 it probably wouldn't be, for me, right now)
             | 
             | Also, how does BYOC differ from using Plane or Socket.io?
        
               | paulgb wrote:
               | At scale it becomes a bit less one-size-fits-all, because
               | compute requirements can vary so much. Eventually we will
               | probably have different backend types the same way that
               | Amazon has different instance types, but for now we tend
               | to talk things through with the customer one-on-one (feel
               | free to reach out at the email in my profile if you want
               | to talk about a use case).
               | 
               | BYOC is essentially a hosted instance of Plane with our
               | hosted container registry, web UI, and command-line tool
               | for deployment.
               | 
               | Jamsocket could be used to spin up a socket.io WebSocket
               | server.
        
         | Donckele wrote:
         | Yep, your homepage breaks on my imac/firefox due to webgl.
        
           | paulgb wrote:
           | Sorry about that, thanks for reporting. Can you elaborate on
           | how it breaks -- does it freeze up or not display at all?
        
             | hdidhdish wrote:
             | most sane people disable webgl and enable per domain
        
               | paulgb wrote:
               | Fair enough, I have fixed it so that it doesn't break
               | without webgl.
        
         | juberti wrote:
         | Do you support WebTransport in addition to WebSockets?
        
           | paulgb wrote:
           | Not yet but if you have a use case in mind, I'd love to hear
           | more about it. I'm pretty excited about
           | QUIC/WebTransport/HTTP3.
        
             | juberti wrote:
             | The basic idea would be a simple voice conferencing bridge
             | that you connect to via WebTransport. There are a number of
             | more interesting things that we would be interested in if
             | we could get this sort of basic scenario working.
        
       | Alifatisk wrote:
       | Believe it or not, the website is barely scrollable with my MB
       | 2015.
        
         | paulgb wrote:
         | Oof, sorry (I'm the one who wrote the webgl code). Are you on
         | Chrome, Firefox, or something else?
         | 
         | We tested on everything we could get our hands on but didn't
         | have any older macbooks that worked. I'll see what I can do.
         | 
         | Edit: I disabled the animation, I hope that helps.
        
           | asadawadia wrote:
           | same scroll issues - firefox on 2019 macbook pro
        
           | brabel wrote:
           | It made my Dell XPS13 / Linux / Firefox sweat (i.e. turn on
           | the fans).
        
           | seabrookmx wrote:
           | Ditto on my Framework laptop with an i5-1240p (running
           | Fedora).
           | 
           | Might be because I'm running Firefox?
        
       | tony_cannistra wrote:
       | I didn't read very deeply, but I was surprised to see something
       | like a Jupyter notebook mentioned as a use-case. The marketing
       | pitch seems to suggest that these hosted sessions are relatively
       | stateless, so I'd hesitate to trust an interactive Jupyter
       | session with one.
       | 
       | Accidentally closing a browser tab seems like it would end the
       | session and wipe out my whole Jupyter session, variables and all.
        
         | paulgb wrote:
         | The use case in that example is for ephemeral notebooks used
         | for demos. It's also good for running notebooks for temporary
         | classroom use.
         | 
         | When backends are spawned, there is a period of time that they
         | remain alive without a connection. By default, it's 5 minutes.
         | So if you accidentally close a tab, but open it back within 5
         | minutes, the kernel is still there.
        
           | tony_cannistra wrote:
           | Thanks, I can definitely understand the classroom use-case.
           | 
           | I've seen a lot of bad engineering go into solving that
           | problem, this seems like a better way.
        
       | CtrlAltDelete51 wrote:
       | This looks really interesting, and something that could solve a
       | semi-immediate pain point but I can't find any data on the
       | production plan other than the price. Is that information
       | available anywhere?
        
         | paulgb wrote:
         | Thanks, we are working on adding more details about the
         | production plan and I agree that it's currently sparse. We do
         | have some details about the limitations of the free tier[1].
         | 
         | With the production plan we increase the memory limit of the
         | backends to 2GB, up the number of concurrent backends to 20
         | (it's a soft limit), up the limit on backend runtime to 24h,
         | and have images eagerly pushed rather than lazily pulled for
         | faster start times. If you're open to chatting about your use
         | case, feel free to reach out to the email on my HN profile.
         | 
         | [1] https://docs.jamsocket.com/free-tier-limits/
        
       ___________________________________________________________________
       (page generated 2023-06-21 23:02 UTC)