Hacker News new | past | comments | ask | show | jobs | submit | more filomeno's comments login

I read that blog post but I don't quite understand it.

I assumed it would work as a regular pub/sub pattern where you get notified when some event happens. However, in the attached example, they still poll the database every half second. I'm not sure I understand the idea.


It's maybe not a great post, it was just one that came up when I searched.

> JDBC driver cannot receive asynchronous notifications.

Maybe their example is limited by the choice of client library.

This might be a better example? https://tapoueh.org/blog/2018/07/postgresql-listen-notify/

Or the offical postgres docs are:

https://www.postgresql.org/docs/14/sql-notify.html

https://www.postgresql.org/docs/14/sql-listen.html

https://www.postgresql.org/docs/14/libpq-notify.html


Thanks, it now makes sense.

Quite strange that this specific driver didn't support asynchronous notifications: if you have to poll the database anyway, there's no much difference between doing it without listen/notify support, I guess.


Nobody forces you to. The software is available under the Apache 2.0 license.

https://babelfishpg.org/blog/releases/2021/10/babelfish-laun...


What I usually do is start typing something like "aupdate" or "pdate" (which are wrong) and only come back at the beginning (it's just a ctrl+a) to fix the command when I'm sure the sentence is OK.

Of course if the update is not only important but critical, manually starting a transaction before is the first step ;)


Here you can see a comparison between some popular JVM distributions and what each one includes.

https://www.azul.com/products/core/jdk-comparison-matrix/


I guess there is a typo the second time you wrote "2038".


Yep, and of course the edit window is now closed so the typo now stays.


Well, at least the right to life is a human right. It turned out that having to work in a crowded space with many others can be a real threat for your life.


Man as much as I hate the whole "snowflake" thing...comments like yours really are pushing it lol.


> lack of enterprise support.

You don't get that with Java 8 either, unless you are willing to pay for it. In that case, what's the difference between paying Oracle for support for Java 8 and newer releases?


> Would you believe it if anyone said this to be the case, 10 years ago?

To be honest, Microsoft astroturfers have long existed, for much more than 10 years.


Yes, but that can be achieved by using a hostname alone (router, nas, printer, htpc...). What does the domain bring?


How, exactly, is that hostname being resolved, though? There is no magical protocol to resolve TLD-less hostnames in DNS. Your router probably adds entries for `hostname.dhcp-domain` but since `dhcp-domain` is empty, you end up with just `hostname`. No, go ahead and name a device `com` and see what happens. Your router will have a hard time resolving `example.com`. This is why you put your stuff behind apurpose-built TLD like `home.arpa.`


In some cases today that hostname is being resolved via mDNS, which is a good reason to get into the habit of using .local for mDNS addresses. Using somehostname.local on many OSes today forces DNS lookups to always and only use mDNS and avoids accidentally calling DNS. (So long as you don't break mDNS support on your local network by doing something like trying to use .local for traditional DNS.)

mDNS is probably sufficient for most people and you don't need to setup old school DNS on a local network. (But if you do, a purpose-built TLD like home.arpa is a good choice.)


Prevent collision with public domains. “ws” has an A record. It’s possible that your local Webserver also is named ws.

With all new gTLDs it’s easy to have a collision when someone buys the “router” TLD.


Why is a local domain useful? I mean, what's wrong with your local machines having only a hostname with no domain at all?


I haven't seen many real world software supports lookup remote with a hostname, probably windows itself is the only one that I have seen? Meanwhile, url is almost the universal way for lookup remote machine (besides, of course, IP).


That's what mDNS (multicast-DNS) is for (mentioned in the article as the reason to never use .local as a DNS TLD because that conflicts with mDNS). The old Windows hostname lookup is predecessor of modern mDNS, but surprisingly Windows was one of the slowest to adopt modern mDNS. (In part because Microsoft backed a competitor named PNRP: they thought it would be great to have a Distributed Hash Table [DHT] as the data store for hostname lookup rather than just relying on pure "dumb" multicast shouting for anyone on the local segment who can here it. It wasn't a bad idea but managing DHTs is complex and mDNS was a simpler standard.)

At this point almost every major OS (including Windows 10 after the right feature update) mDNS mostly just works out of the box: ask for somehostname.local and if a system responds "oh, that's my hostname" things mostly just work. (mDNS was once called "Bonjour" if that helps connect the dots on what it is and how long many OSes have supported it.)

So don't use .local for DNS and mDNS works fine in so many cases these days you don't really need set a DNS for your local systems anyway. (Though if you do want a setup, I think this article is correct and home.arpa is the safest option available. .lan is also a bad idea because it isn't RFC protected and could be bought by someone as gTLD just as Google bought .dev.)


If you want to protect a webserver inside your home (which seems like a good idea in 2021), you're going to need SSL -- and that requires a domain.

Self signed ssl certs were kinda a solution to this -- and then were largely rejected as being absolutely "insecure" because they, well, were absolutely insecure.


No domain at all means it’s possibly publicly resolvable. You don’t want to name your internal webserver just “ws” because this resolves to 64.70.19.33.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: