Better HN
topnewbestaskshowjobs
Log inSign up

_query

1,262 karma · joined Mar 7, 2014 (12y ago) · 293 submissions

Founder, digitally induced GmbH

https://www.digitallyinduced.com/

marc a t digitallyinduced com

Submissions

61.

The Monad Fear(xtendo.org ↗)

1 points · by _query · 4y ago · discuss

comment 4y ago · link · parent

Update: It's now 1$ per 1M Api calls :) Thanks again for the feedback.

comment 4y ago · link · parent

Thanks for your feedback. It's very hard to even get to 1GB of data traffic via JSON. And the Pro plan includes 5 GB already.

We will update the pricing later today to make it more intuitive.

comment 4y ago · link · parent

Thanks, this is really good feedback! We will update the pricing today to use a different unit that is more intuitive.

comment 4y ago · link · parent

Thin also supports other JS frameworks. Svelte docs can be found here https://thin.dev/docs/svelte We're focussing the communication on react mostly to keep things simple. The core of thin is independent of react.

comment 4y ago · link · parent

Thin self-hosting is coming soon :) We already have this working on the technical side, we just need to add more documentation before we can push it out.

comment 4y ago · link · parent

Thanks for your feedback :) You have to send quite a few json messages to fill up 1GB. We think overall thin provides a lot of value and saves a lot of developer time (atleast for businesses), so we price it as that.

comment 4y ago · link · parent

Thin Backend (https://thin.dev/) is the newest of all of those. Compared to Hasura it offers a nicer schema designer. Compared to Supabase it offers better end-to-end typesafety and a more higher level API that offers optimistic updates. Prisma is more like an ORM, so it's designed to be used by a handwritten backend.

comment 4y ago · link · parent

> That's a similar approach to supabase. Why reinvent the wheel?

We've initially built the technology already for IHP DataSync (https://ihp.digitallyinduced.com/Guide/realtime-spas.html). So we used what we already had here :)

> Why websockets?

We also use the WebSockets to do write operations. This allows for lower latency than doing a HTTP call for any API call. Additionally we run all operations in parallel. With HTTP push we wouldn't be able to easily run all these operations in parallel.

comment 4y ago · link · parent

It's using Postgres pg_notify to subscribe to tables and using a WebSocket server to distribute the changes. The table watcher is written in Haskell and based on the IHP haskell framework. Using Haskell makes it very easy and efficient to deal with lot's of active sessions in parallel.

You can find the source code here https://github.com/digitallyinduced/ihp/blob/master/IHP/Data... if you're interested :)

comment 4y ago · link · parent

If you're looking for something like superbase but with a more end-to-end typesafety approach + optimistic updates, check out Thin Backend https://thin.dev/ It takes a bit more of a higher level approach to database operations than superbase, which allows us to do things like optimistic updates that are hard to do in other tools.

comment 4y ago · link · parent

If you're interested in building realtime web apps with Postgres and React, check out https://thin.dev/

Next to great user experience, building your application in a realtime way also allows to simplify the state management in certain parts.

A typical react app might use something like redux to store a subset of the application's database state locally. Now whenever you do any write operations to your data, you need to make an API call and also make sure the local redux state is kept in sync.

When you're embracing realtime everywhere, you avoid this, because any write operation automatically updates your realtime data, so you don't need to manually e.g. update your redux state. This allows you to skip a lot of the code that's needed for state management locally, so it saves a lot time and bugs (less code => less bugs).

73.

IHP v0.19 has been released(github.com ↗)

2 points · by _query · 4y ago · discuss

comment 4y ago · link · parent

Check out this video on how to use VSCode with IHP https://www.youtube.com/watch?v=_8_8XYO6rgY

comment 4y ago · link · parent

Yes, check out https://twitter.com/haskellpreneur He's doing 12 startups in 12 months using Haskell. There's also https://twitter.com/tonialaribe building in public with Haskell :)

comment 4y ago · link · parent

Haskell is famous for it's quite an academic nature. But the ecosystem has drastically improved in recent years, so that that image is really outdated by now.

E.g. with Haskell Language Server we have nice autocompletion. Recently dot-notation has been added, so you can now write `someValue.someField` as in other languages. And the documentation is improving as well.

If you're doing web development, a good starting point is IHP (https://ihp.digitallyinduced.com/ https://github.com/digitallyinduced/ihp). IHP is Haskell's version of Laravel/Rails/Django. It's really a superpower to have Haskell's type system combined with the rapid development approach of Rails :) (Disclaimer: I'm founder of the company that makes IHP)

comment 4y ago · link · parent

If this post got you interested in learning more about Haskell and you want to see type classes in some real code, a great starting point for Haskell is IHP :)

IHP is a new Haskell framework with a focus on actual building applications. Imagine the productiveness of rails combined with the typesafety of Haskell.

It's now already the biggest Haskell web framework, we just hit 3200 GitHub stars. I belive Haskell can reach a lot more than it's currently doing if we get things easy to use.

If you want to build a web app with Haskell and play with type classes check it out: https://ihp.digitallyinduced.com/ GitHub: https://github.com/digitallyinduced/ihp

comment 4y ago · link · parent

Do you think making it more open source would solve the issue?

Thin is mostly based on IHP DataSync. You can the source code here https://github.com/digitallyinduced/ihp/blob/master/IHP/Data... Thin itself is just a "thin" wrapper around IHP and IHP DataSync.

Additionally most of the system is just relying on postgres for doing it's work. So if you ever want to swap out Thin with another API, you could build a normal REST API, connect it to the database and switch it out.

comment 4y ago · link · parent

Yep, exactly :)

comment 4y ago · link · parent

Thanks for your input! In the end every Thin app is just a postgres database. So if you want to move to a different backend, you could replace Thin with a handcoded backend connected to that postgres db.

comment 4y ago · link · parent

Good point, just removed the video. Will be deployed soon.

comment 4y ago · link · parent

Back now. Sorry, deploy issue :)

comment 4y ago · link · parent

Yes, Svelte is already supported https://thin.dev/docs/svelte

We also have an integration for ReScript https://thin.dev/docs/rescript

More to follow in the future

comment 4y ago · link · parent

I'm not so much into web3, so maybe you can help me a little bit and point out where the web3 buzzwords are?

comment 4y ago · link · parent

Thanks for your honest feedback.

Our pricing still might change a bit in the future. I'm with you that with a couple hundred users it shouldn't cost more than 5-10$ to host this app.

The Thin Pro plan already includes 5GB for free, so we might increase these 5GB to a bit more.

comment 4y ago · link · parent

Thanks. Fix is deploying :)

comment 4y ago · link · parent

Thanks for giving it a try so early! :)

comment 4y ago · link · parent

You can find our pricing here https://thin.dev/pricing If you're not using the free plan, you're paying 10$ + (2$ * GB of data traffic). This is likely a bit cheaper than Firebase (but Firebase has many more pricing variables, so it's non trivial to compare) :)

comment 4y ago · link · parent

It solves the same problem as Firebase/Supabase.

In some ways Thin is designed a bit more opinionated. This allows us to e.g. support optimistic updates out of the box.

Supabase generally also exposes very low level APIs (basically just a REST Api via PostgREST), where we offer very high level APIs that sent over a WebSocket.

comment 4y ago · link · parent

Thanks for the input!

Thin can quickly be integrated in an existing stack as long as you're using postgres.

The value proposition with an existing backend can be: Improved UX thanks to very low latency. E.g. Thin automatically does optimistic updates when you're inserting or updating a database record. This results in a really nice user experience compared to what you'd get with a normal REST Backend.

I've no experience with blitz.js. From a first look it seems it goes in the same direction. Blitz.js is not leaning on realtime as much as we're doing. Additionally it seems that it doesn't provide optimistic updates out of the box.

On IHP: Yes! :) IHP has a promising future ahead! All the Thin Feature are btw also supported in IHP. The Thin JS library is just a small wrapper around the IHP DataSync SDK :)

12345
10