Live data from Hacker News

Lahja – A generic event bus implementation written in Python

github.com

61–70 of 74 posts

Re: Lahja – A generic event bus implementation written in Python

#64
post #27

Earlier quoted context omitted.

Python 2.7 is still maintained, and the last version came out in March IIRC, so there's that. Lots of big players still use Python 2 (Google being the most prominent), and untold smaller players. Besides, Windows XP and PHP are also in use, as are 50+ year old COBOL systems, so there's that. Unless you come in and do the port yourself, many systems are not getting ported anytime soon. RedHat and co will continue to r…

Surely the number of eyes looking at that codebase will vastly diminish though? You may get RH and co backporting massively obvious issues but there will be many other smaller issues that won't be found. Also Google have golang, which I'd imagine would be their target now, not python 3 (for migrations)

>Surely the number of eyes looking at that codebase will vastly diminish though?

I don't think the "many eyes" theory ever panned out. There are projects used by billions, and on which thousands of other FOSS projects work, and only have like a handful of people working at the codebase (and less catching bugs)

>Also Google have golang, which I'd imagine would be their target now, not python 3 (for migrations)

Not really, Golang was never Google's official/mandated language. Just a language some Googlers made with Google's use cases in mind. Google still uses C++, Java, and Python (plus some Dart). Some things use Golang, but not in some top-down "Googlers shall use Golang" way.

Re: Lahja – A generic event bus implementation written in Python

#66
post #27

Earlier quoted context omitted.

Python 2.7 is still maintained, and the last version came out in March IIRC, so there's that. Lots of big players still use Python 2 (Google being the most prominent), and untold smaller players. Besides, Windows XP and PHP are also in use, as are 50+ year old COBOL systems, so there's that. Unless you come in and do the port yourself, many systems are not getting ported anytime soon. RedHat and co will continue to r…

Where exactly does Google use python2.7?

Internally, all around. A 2018 answer by a Google engineer:

Build system automation of all kinds (although the main build tool is in Java)

Test automation

Deployment automation

Many services configure their job placement and options with a Python-derived language (not mine)

Monitoring configuration and dashboards

Data analysis using Scipy, Scikit, Numpy and various kinds of notebook UIs

Configuring Tensorflow and analysing the results of ML projects

Hundreds of little command-line utilities for all sorts of small code and data manipulations

Thousands of internal websites

The youtube.com site was still Python last time I looked

Re: Lahja – A generic event bus implementation written in Python

#68

Is this somehow connected to processing cryptocurrencies? This is under ethereum repo.

It's a library we use in the "Trinity" client for the ethereum network. The lahja library itself is however just an event bus and has no cryptocurrency ties other than being used in the Trinity codebase.

https://trinity.ethereum.org/

Re: Lahja – A generic event bus implementation written in Python

#69

From glancing at the code, this is an observer pattern over asyncio and unix sockets. That means you're unable to communicate outside the current machine (short of hacks like ssh socket forwarding), but adding support for tcp endpoints shouldn't be too hard. I'd be interested to see how well this holds up under load, especially compared to other common event bus patterns.

We've talked a bit about adding TCP support and really like some of the options it opens up. However, we have to move away from the use of pickle for event serialization before we can do that, otherwise we would have some security issues with remote code execution.

Re: Lahja – A generic event bus implementation written in Python

#70
post #3

Neat. This feels quite a bit like Vert.x from the Java world, which flows data between components via an event bus. Noob python question: does Python support reactive extensions and chaining? That would fit well on top of this too.

For push-type events there is eventkit: https://github.com/erdewit/eventkit (I'm the author).
Post reply on HN