10 ms·
Jamsocket: Back Ends for Realtime Apps
- veryvisa 3y agoI'm unable to view https://github.com/drifting-in-space/jamsocket-nextjs-tutorial https://github.com/drifting-in-space/jamsocket-nextjs-tutori...
- paulgb 3y agoThanks for letting us know — it’s fixed now!
- Alifatisk 3y agoBelieve it or not, the website is barely scrollable with my MB 2015.
- paulgb 3y agoOof, 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.
- seabrookmx 3y agoDitto on my Framework laptop with an i5-1240p (running Fedora). Might be because I'm running Firefox?
- Alifatisk 3y agoRunning FF aswell
- asadawadia 3y agosame scroll issues - firefox on 2019 macbook pro
- brabel 3y agoIt made my Dell XPS13 / Linux / Firefox sweat (i.e. turn on the fans).
- thedangler 3y agoYeah, Doesn't work well for my iMAC.
- paulgb 3y agoHey 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 https://news.ycombinator.com/item?id=33178797 Sorry for the website performance issues, I've disabled the animation which should help.
- stunt 3y agoThe session thing looks really cool, but when do I need it? I can develop a simple real-time app using socket.io or a service like Pusher. Why would I choose this instead? That isn't clear to me yet.
- paulgb 3y agoIf you write a socket.io service that uses broadcast, and then scale up to more than one server, your users will be split between those servers and won’t be broadcast to the other. Jamsocket allows you to generate a unique hostname for each room that ensures that every user is talking to the same server. That server can still use socket.io in addition to Jamsocket; they work at different layers of the stack. Pusher solves the problem of scaling in a different way, which is by giving you an HTTP endpoint to send events to. It’s better for large broadcast groups (e.g. sending people sports scores) but doesn’t run any compute for you.
- Donckele 3y agoYep, your homepage breaks on my imac/firefox due to webgl.
- tcper 3y agoTo build a image and push, spwan a pod? Why not just use FaaS service skip the build step?
- paulgb 3y agoYou 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-notebook 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 3y agofor someone new to real time apps, can you help me understand how JamSocket is different from some service like Pusher?
- paulgb 3y agoPusher 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 3y agoWhat is the latency to start a session?
- paulgb 3y agoYou can see an example by clicking "new game" on here: https://word.red/ https://word.red/ We are working on getting it subsecond for most images, but we're not there yet.
- deleted 3y ago[deleted]
- CtrlAltDelete51 3y agoThis 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 3y agoThanks, 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/ https://docs.jamsocket.com/free-tier-limits/
- tony_cannistra 3y agoI 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 3y agoThe 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 3y agoThanks, 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.
- nesarkvechnep 3y agoAnother reinvention of Erlang processes?
- paulgb 3y agoErlang got a lot right ;) Sometimes I explain it to Erlang/Elixir world people as “GenServer-as-a-service”.
- dgreensp 3y agoIt’s been a while since I’ve done server push in production… Back in the day, you couldn’t count on the browser or the ISP supporting real WebSockets correctly, and I expect this is still the case some percentage of the time. WebSockets were best seen as one possible transport, and if they were detected to be not functioning, the client library responsible for the “socket” would fall back to long-polling. Or, the client library would start out with something simple and known to work and “upgrade” the connection if possible. WebSockets also don’t ensure messages are delivered (once) across network hiccups. And browsers have different limits on how many there can be open at once across tabs for a domain (IIRC). In the end, I think it makes sense for them to be the main transport for a real-time app, but they are just one part of creating a conceptually simple model for real-time communication between client and server. Does Jamsocket have or use a client socket library?
- paulgb 3y agoI used to work at a company that fully blocked WebSocket, I know the pain! We don't provide a client socket library, we just expose an HTTPS endpoint that also supports WebSockets. So you can use something like socket.io to provide fallback options, reconnects, etc. Some customers don't even use WebSockets at all and just hit HTTP endpoints.
- jelling 3y agoCan you contrast your product with Liveblocks? I am considering it for a real-time application.
- paulgb 3y agoLiveblocks is a full data layer solution -- you use their JavaScript library in your client, and they run code on their servers for synchronizing standard data types like lists and key/value maps. By contrast, Jamsocket gives you a place to deploy your own WebSocket server, which means you can write your own data layer. This give you the control to do more advanced things like enforce invariants in the data structure. I think of it as akin to using Firebase vs. using Postgres -- there is a place for both, and Liveblocks is a solid product, it just depends how much control you want vs. how much you want to lean on a managed service.