Better HN
topnewbestaskshowjobs
Log inSign up

socketcluster

765 karma · joined Sep 20, 2023 (3y ago) · 331 submissions

Email: jon(at)socketcluster.io
Submissions

comment 2y ago · link · parent

I've been working on a no-code/low-code serverless platform for building/running web applications: https://saasufy.com/

Some unique selling points are:

- Apps are defined as declarative HTML. It's possible to build complex apps using only HTML + CSS and no back end code.

- Supports the creation of complex filters/views via a simple UI, with indexing for fast lookups.

- Collections and records update in real time.

- Efficient; real time updates only reach users who are currently looking at the affected resources/views.

- Scalable; behind the scenes, both the database and pub/sub mechanism for delivering real time updates support sharding.

- Spam prevention with rate limiting and backpressure limits.

comment 2y ago · link · parent

I wrote a library a while back which implements this. It handles all the edge cases, provides the ability to measure message backpressure and allows you to close or abruptly kill a stream:

https://github.com/SocketCluster/writable-consumable-stream?...

It has full test coverage and is a core part SocketCluster which has almost full e2e test coverage.

To put it in perspective, the library itself is very lightweight with under 300 lines of code including dependencies (only 1 of them) and has 1.6K lines of test code...

It supports concurrent consumption/iteration by default (each consuming loop causes a new async iterator to be created implicitly in accordance with the AsyncIterator spec) but it also gives you the ability to manually create consumer streams using `stream.createConsumer()` for cases where you want to start buffering messages some time before consuming/iterating over them.

comment 2y ago · link · parent

I built a serverless SaaS no-code/low-code platform which could be of interest: https://saasufy.com/

You can build your entire app inside a plain HTML file which can be deployed online with something like GitHub pages.

I've built a few apps with it including a real-time chat app which supports both group chat, private 1-on-1 chat with an account system (with access control), OAuth via GitHub... The entire app is only 260 lines of HTML markup and fully serverless (no custom back end code). Access controls are defined via the control panel. All the app's code is in this file: https://github.com/Saasufy/chat-app/blob/main/index.html

You can try the app here (use the 'Log in with GitHub' link): https://saasufy.github.io/chat-app/index.html

Saasufy comes with around 20 generic declarative HTML components which can be assembled in complex ways: https://github.com/Saasufy/saasufy-components?tab=readme-ov-...

There is a bit of a learning curve to figure out how the components work but once you understand it, you can build apps very quickly. The chat app only took me a few hours to build.

I've also been helping a friend to build an application related to HR with Saasufy and I managed to get the basic search functionality working with only 160 lines of HTML markup.

comment 2y ago · link · parent

Ah yes good point. By plain HTML, I meant apps which can be assembled without custom JavaScript logic needed.

comment 2y ago · link · parent

Interesting. I wrote a similar plain HTML/WebComponent-based front end for my new no-code/low-code serverless platform https://saasufy.com/

It lets you build just about any data-driven application using only a handful of declarative generic HTML components: https://github.com/Saasufy/saasufy-components?tab=readme-ov-...

I built a chat app with both group chat and private chat (with access control) using only plain HTML; only ~250 lines of HTML markup for the entire thing, no front end or back end code was used: https://github.com/Saasufy/chat-app/blob/main/index.html

You can use it here - All hosted on GitHub pages: https://saasufy.github.io/chat-app/

It would be great to add support for other front end tech like this. I kind of like HTMX (especially as it's declarative). This HTMZ looks interesting. I'd like something with a big community and more components to handle more advanced cases (e.g. higher level components like calendars).

comment 2y ago · link · parent

I really like this general approach of using HTML as a declarative language.

I've been working on a similar concept except as a serverless platform which updates all data in real time: https://saasufy.com/

Docs: https://github.com/saasufy/saasufy-components/#saasufy-compo...

comment 2y ago · link · parent

I'm really into this HTML web components trend. I built a similar set of primitive HTML components except the focus is to allow interfacing with data from my serverless platform.

See https://github.com/Saasufy/saasufy-components#saasufy-compon...

Actually, the elements from this article could complement my own nicely as they seem to provide more fine-grained control.

My platform is https://saasufy.com/ (you can log in with GitHub)

comment 3y ago · link · parent

Based on the choice of fonts and colors, you know this is a serious hacker website ;p

comment 3y ago · link · parent

I also built a similar serverless project but with a focus on no-code.

I built a support chat app with it (which we use ourselves) using only declarative HTML components. Supports both public chat and private chat with authentication.

It's fully working now but I'm now focusing on walkthroughs/guides.

https://saasufy.com/

comment 3y ago · link · parent

The weirdest bug I've seen yet was a concurrency race condition which led to 'spooky action at a distance'. Every time I tried to console.log() to observe some value to see the cause of the bug, the bug would go away.

But alas, I hadn't discovered some new quantum effect... It turns out to have been because the race condition was close within maybe 1 millisecond and adding the console.log() statement there meant that one part of the code would take a bit longer to execute and so the race condition would not occur.

comment 3y ago · link · parent

Thanks for pointing this out. I should probably mention this approach in my article for cases when you need to work with slotted elements but don't want to inherit all page styles.

comment 3y ago · link · parent

The main problem with the Shadow DOM which makes people avoid it is the inability to use CSS externally to style the elements which are generated internally by the component...

This is unfortunate because the Shadow DOM is essential if you want to work with child components slotted into it from the outside. This opens up many use cases.

There is one alternative which is not being considered; it's possible for components with a shadow DOM to inject their elements into the Light DOM (where they can be styled/skinned externally with CSS), you just have to make the user slot a div (or other element) from the outside to act as a 'viewport' so that the component can inject its children into it (instead of injecting them into its Shadow DOM).

With this approach, you can still access slotted elements. It's an ideal pattern for situations where you want the component to generate child elements from a slotted template.

I wrote an article about this approach here: https://dev.to/jondubois/web-components-the-template-viewpor...

comment 3y ago · link · parent

Up to this point, software systems have evolved in an environment where market monopolies were the norm and therefore a 'chosen few' software tools, libraries and frameworks have had an abundance of resources and talent dedicated to them.

It's hard for me to imagine an environment where software is constrained by the availability and cost of engineering talent and where maintainability becomes the number 1 priority. So far, I suspect that maintainability has ranked VERY LOW on the list of priorities. The only reason some systems are maintainable today is because maintainability is correlated with security which is a bit higher priority.

I feel like the priority of software development over the last decade has been 'shipping fast' as enshrined in Facebook's motto "Move fast, break things." everything else has been neglected in favor of shipping fast. So I can understand the author's point of view that software is likely to experience a decline; it was not built to last and thus requires an unreasonable amount of human resources to maintain.

comment 3y ago · link · parent

> The winners in this new world would be those who limited their dependence on software to simple systems with limited features that they could maintain mostly themselves, needing minimal support from outsiders.

I'm hoping that this is true because simple systems that require a single-maintainer are my specialty. It's almost unbelievable how much software I'm maintaining right now for myself and my small community:

- A quantum-resistant blockchain (it includes a server component which can be configured to support custom currencies... It includes a bash client, JavaScript client, front end wallet app; all can be configured/whitelabeled to support any currency based on the tech).

- A decentralized exchange which can work with essentially any blockchain (includes back end node, clients, UI trading front end).

- An open source WebSocket library with a focus on scalability (includes server and client). This one gets a fair bit of production usage among startups.

- A no-code platform which lets users build real-time apps using only HTML. This one is new and I'm currently finalizing and working on documentation.

And I still have a lot of spare time. I don't get many bug reports these days. My main concern is that I started to forget details of how some components work because I barely look at the code of some of these projects anymore. Not hard to refresh my memory though I guess. Architecture and tooling is very consistent and I use as few dependencies as possible.

comment 3y ago · link · parent

It comes down to alignment of interests and alignment of values. I think previous comment is right in suggesting that people's interests and values may not be clear at that level. People often hide them to appeal more broadly.

The more you reveal about yourself, the fewer people you will appeal to because very few people share your exact values. People tend to like people who share some obvious common values and they assume that the values that are unspoken are also a match. In reality, it's rarely so.

As people learn more about the world and themselves, they begin to realize that some values that they didn't consider before are very important and they may be shocked to find that certain people they used to like do not share those values which they took for granted.

comment 3y ago · link · parent

The no-code serverless platform I built achieves this behind the scenes via a real-time CRUD API: https://saasufy.com/

The key is to perform updates on fields individually. Normally this would not be viable using HTTP due to headers/overheads (too many fields per resource to dedicate an entire HTTP request per-field) but it is viable over WebSockets as each frame is very lightweight and can even be batched. Also, being able to tie together the life of the connection to the subscription is handy to ensure that no real-time updates can be missed.

I built a chat app with authentication + access control with it (you can log in with GitHub at the bottom):

https://saasufy.github.io/chat-app/

Only 120 lines of HTML markup (web components), no custom JS. See GitHub repo here for the 'source': https://github.com/Saasufy/chat-app

comment 3y ago · link · parent

I'm currently working on a server-less, no-code multi-tenant platform. I'm still unsure if I should aim for full no-code or go for low-code. So far it's possible to build complex apps with it using only HTML tags (web components). Although it also exposes a CRUD interface, I haven't promoted this aspect as I feel it detracts from the huge time-saving and maintenance benefits which come with building apps using only declarative HTML + CSS.

The other thing I've been careful about is to ensure that the backend is fully no-code. As soon as you allow the user to execute custom code on your backend, it opens up security risks with multi-tenancy. The risk doesn't fully go away when you containerize as vulnerabilities have been encountered in the past in Docker which allow escaping the sandbox.

In my case, although the user can customize back end behavior, they can only do so in a highly constrained way using well defined parameters, not custom code. It saves a lot of effort not having to write a VM or restrict each container to a single host.

comment 3y ago · link · parent

It's generic code, not specific to the application as it can be reused for any application. There is code behind native HTML tags too but we don't say that writing HTML is writing code, the browser handles that.

comment 3y ago · link · parent

Web Components are highly versatile. I built a chat app with GitHub OAuth login, blockchain-based authentication and access control using only 120 lines of HTML in a single .html file with no custom code, no framework, no custom server-side code. It can run anywhere:

https://github.com/Saasufy/chat-app/blob/main/index.html#L23...

You can try the app here (if you have a GitHub account): https://saasufy.github.io/chat-app/

The backend is serverless built using Saasufy.com - The platform/startup I'm working on currently: https://saasufy.com/

An effective approach I've found is to create components which consume slotted <template> elements to produce HTML that can be fully customized and injected with data they loaded from a back end. This allows you to create components which are declaratively bound to specific back end resources.

comment 3y ago · link · parent

The no-code (HTML markup only) SaaS platform I'm working on seems to fit well with this philosophy: https://www.saasufy.com/

As a demo, I was able to build a chat app with it: https://saasufy.github.io/chat-app/ You can log in via GitHub OAuth (also implemented with HTML tags).

Less than 120 lines of HTML markup in total for the entire functionality.

The source is here: https://github.com/Saasufy/chat-app

There is no custom backend logic, all the logic is in that repo as HTML + CSS.

comment 3y ago · link · parent

So basically they've been printing money and giving it to institutions who serviced reckless people who took on debts that they could not afford and did not repay. Guess who ended up paying for that? Every decent person who did the right thing; tax payers, salary earners (through devaluation of their salary contracts via inflation), those who did pay back their debts.

Then you wonder how all these reckless people ended up in positions of power.

comment 3y ago · link · parent

Agreed. Anyone can create a company which raises a ton of money and feeds 90% of it back to itself as revenue.

comment 3y ago · link · parent

Great to see the interest growing around native Web Components. I've been working on a no-code (markup only) platform which is also based on web components.

https://saasufy.com/

I built a whole chat app with authentication, blockchain and GitHub login with just 120 lines of HTML markup no front end or backend code (all the logic is abstracted away via generic, easy-to-use components provided by the platform).

You can also build apps which display filtered views by category or with text search with custom parameters and it does so efficiently with indexing and all updates in real time. Real time updates are delivered efficiently only to relevant components. Components automatically subscribe and unsubscribe to and from realtime changefeeds in an efficient way. Access control can be specified at the object/model level or on individual fields.

comment 3y ago · link · parent

Yes, likely. Though it hasn't been priority for MVP.

comment 3y ago · link · parent

No-code platform for building dynamic apps and websites: https://saasufy.com/

It's further along than what is available online right now though there should be an update in the next few days as it's very close to MVP.

It allows you to build tables, lists and pages which update in real-time and support complex views including filtered by category and/or based on variables with pagination. It's designed to be fast and scalable.

The idea is that it will allow you to build complex apps using only HTML and CSS with zero to very little JavaScript. I already did a proof of concept as I used the same components to build the service itself and some of the dynamic pages to manage resources are pure HTML with essentially no code.

With MVP, it will work as a flexible CMS for making and updating websites but the next phase is to add authentication and access control and this will allow building forms which collect data from users and allow them to share data and interact with each other. I think it will require a few more weeks to a month to implement that as many of the tools are already in place.

1
89101112