Better HN
topnewbestaskshowjobs
Log inSign up

pixelmonkey

6,134 karma · joined Oct 5, 2007 (19y ago) · 831 submissions

Founder of PX Systems, which ships a daily developer tool to go from code to cloud cluster in seconds. More info @ https://px.app

Formerly the founding CTO of Parse.ly. Coding in: Python, JavaScript, Zig. Pleased to be a Pythonista and UNIX lover.

Parse.ly was acquired by Automattic (creators of WordPress.com) in February 2021; more here: https://www.techmeme.com/210208/p12#a210208p12

My essays & technical blog: https://amontalenti.com

My AngelList profile: https://angel.co/p/amontalenti

My occasional tweets: https://twitter.com/amontalenti

Submissions

comment 11y ago · link · parent

Yes, each Python Bolt and Spout runs as a separate process. Though, by changing the paralellism hint, you change the number of Python processes spawned per component (e.g. :p 8 = 8 Python processes running the same bolt code).

This is because, under the hood, it all uses ShellBolt/ShellSpout in the Storm layer, which is all process-based. But I actually find this to be the "purer" way to run Storm, anyway. Why deal with threads when you don't need to.

As Joe Armstrong, the creator of Erlang, once said (paraphrasing): "Processes are isolated environments for code where state can't be shared except through explicit messaging; threads are isolated environments where state is directly -- and dangerously -- shared. Why would you want threads when you could have processes?" Ofc, I realize, there are times when threads' lightweightness matters, but it doesn't in our case, and processes are certainly simpler!

As for your question, yes, we are working on async support for pykafka. The async producer is being worked on in this issue: https://github.com/Parsely/pykafka/issues/124 -- feel free to contribute, or even simply +1 as a vote of confidence!

comment 11y ago · link · parent

I find it scales well and uses resources well, within the limitations of its design. For example, Storm does not attempt to handle concerns like resource rebalancing, contention management, or auto-scaling. It has a simple REBALANCE command, but this amounts to killing all your workers and randomly redistributing them in your cluster. It isn't a smart rebalancer based on load or throughput, or anything.

My understanding is that Twitter's rewrite of Storm (Heron) was mainly to make it work with Mesos as a resource manager. This is probably wise since Mesos handles a lot of the concerns I described above. But Mesos didn't really exist when Storm was written.

They chose to re-implement 100% of Storm's API in doing so, which perhaps shows that the high level concept of the framework has staying power even though you might benefit from a more advanced resource manager at 1,000-node scale. I wish they had reimplemented it as a competing implementation and actually released it as open source. But no, they decided to keep it 100% proprietary. So it goes. I guess once companies become a certain size, they turn their back on open source if it's not directly in their interest any longer.

We run it with 10-15 Storm nodes with 32 cores each and find it to be immensely helpful in this context, keeping each node in the cluster lit up to ~60% CPU utilization and plowing through 10K events/second on a Kafka topic, despite the fact that we are using Python and there isn't a line of code using threads or process management. People are often shocked we pull this off, since, in theory, CPython's GIL means you can't even run on more than one core at a time. But we write simple Python programs that run on Storm and utilize hundreds of cores at once, across multiple machines. And we get the Erlang-style "let it crash" / "fail fast" process supervision for free.

I have a more cynical view of the Heron paper overall -- if you're curious about that, reach out to me directly (@amontalenti on Twitter).

comment 11y ago · link · parent

One of the nice things about Storm, in particular, is that the creator of the project thought about multiple language support from the start. We use Storm via our open source project, streamparse[1], and this enables usage of normal Python programs running under a Storm topology. In our case, we achieve multi-process parallelism and fault tolerance using Storm's simple multi-lang protocol, which is abstracted by our library.

We also use Kafka natively from Python via the other module we released publicly, pykafka[2]. It provides support for nearly all of the Kafka protocol, and we even have an optimized C extension module in the works that may even be faster than the JVM consumer.

My view on this is that infrastructure has to be implemented in some language. I don't lament the fact that Postgres was written in C or that Cassandra was written in Java -- I just use these technologies as infrastructure. Both have very full-featured Python bindings. The only thing missing on the Storm/Kafka/streams side are the full-featured Python bindings. But my team at Parse.ly has been hard at work building those in open source. Help us!

[1]: https://github.com/Parsely/streamparse

[2]: https://github.com/Parsely/pykafka

comment 11y ago · link · parent

If you're interested in Python + Storm, we are making it happen via our open source project streamparse. See the project on Github[1] and also my PyCon US 2015 talk[2].

Your point about documentation is well-taken. We are trying to document streamparse + Storm usage from a Pythonista standpoint via our online documentation[3], e.g. here is our detailed Python API documentation[4].

[1]: https://github.com/Parsely/streamparse

[2]: https://www.youtube.com/watch?v=ja4Qj9-l6WQ

[3]: http://streamparse.readthedocs.org/en/stable/

[4]: http://streamparse.readthedocs.org/en/stable/api.html

comment 11y ago · link · parent

Parse.ly - http://parse.ly - Fully Remote - Full-Time

Parse.ly has built a real-time content measurement layer for the entire web.

Parse.ly's analytics platform helps digital storytellers at some of the web's best sites, such as Arstechnica, New Yorker, The Atlantic, The Next Web, and many more.

In total, our analytics backend system needs to handle over 30 billion monthly events from over 450 million monthly unique visitors.

Our entire stack is in Python and JavaScript, and our team has innovated in areas related to real-time analytics, building some of the best open source tools for working with modern stream processing technologies.

Our UX/design team has also built one of the best-looking dashboards on the planet, using AngularJS and d3.js. You can see some screenshots at http://parse.ly/tour.

Our distributed team is best-in-class and we happily skip commutes by working out of our ergonomic home offices. Here's a photograph of mine running two full-screen Parse.ly dashboards on my monitors: https://flic.kr/p/v1NZ73

We are currently looking for UX / front-end engineers to help us build the best real-time analytics dashboard the world has ever seen. The only requirement is some experience in Python/JavaScript, emphasis on JavaScript. Bonus points for an interest in information visualization, Edward Tufte, or d3.js.

We are also hiring backend engineers to expand our data platform and make the world's most flexible and highest-performance real-time content analytics system.

Apply now by sending a CV/website, github/dribbble links (if available), and 1 paragraph intro to work@parsely.com. Let us know what part of the position interests you. Also, mention the HN Who's Hiring thread.

p.s. to see an example of how we work, check out the blog post, "Whatever It Takes": http://blog.parsely.com/post/46

comment 11y ago · link · parent

OTP is described thusly by "Learn You Some Erlang":

"OTP contains functions to safely spawn and initialize processes, send messages to them in a fault-tolerant manner and many other things."

Also, "supervisors are one of the most useful parts of OTP you'll get to use." And, "an OTP application specifically uses OTP behaviours for its processes, and then wraps them in a very specific structure that tells the VM how to set everything up and then tear it down."

Given that, I don't see how you could think Storm isn't at all related. (I never said it was equivalent, just very similar goals.)

comment 11y ago · link · parent

It is a fair criticism of the state of Storm documentation and examples. The book Storm Applied by Manning details tons of Storm usage examples, ranging from the technically advanced to the mundane. I recommend that book to learn more about real world usage (disclosure: I wrote the foreword).

Also, my team is working on an open source example project called birding that uses streamparse and pykafka together to build filtered firehose tweet streams from Twitter's public API. We think this will illustrate both Storm and Kafka really well, and be beyond the typical word count examples. See https://github.com/Parsely/birding to track that effort.

comment 11y ago · link · parent

I have a more cynical view of the Heron announcement. But let's remember that Twitter ran Storm in production for over 4 years at massive scale, and whatever improvements Heron represents, they thought the abstraction was important enough to reimplement the entire Storm API in the new system.

comment 11y ago · link · parent

Apache Storm[1] isn't exactly like Erlang/OTP, but it definitely aims to achieve similar goals. Though Storm is written in Java and Clojure, the infrastructure it provides is usable across languages thanks to something it calls the "multi-lang protocol".

I work on a Storm library for Python that's called streamparse[2], and the goal of the project is to allow us to easily achieve Erlang OTP-style reliable processing atop open source infrastructure while still writing pure Python code.

I also gave a PyCon talk about streamparse which you can find on YouTube[3]. It describes the motivation for the project -- which is to solve a large-scale real-time analytics problem with Python and do so in a reliable way, while beating Python's multi-core limitations (the GIL, etc.)

[1]: https://storm.apache.org/

[2]: https://github.com/Parsely/streamparse

[3]: https://www.youtube.com/watch?v=ja4Qj9-l6WQ

comment 11y ago · link · parent

"This is a challenge that journalism faces today -- how to fairly update and keep stories current while informing readers as best we can."

I work in and around the media industry, and I don't think most publishers see this as a "challenge" -- they have other things to worry about (like how to survive post-print, how to operate in an Internet ecosystem with Google/Facebook/Twitter/YouTube, etc.)

Instead, I see a lot of excitement around the ability of journalists to update their work after they publish it -- one of the few upsides, in fact, of the Internet, from their standpoint. Just as Wikipedia articles get better over time, some important pieces of journalism do, too -- with the guidance of new information or challenges to the original writing.

But look, the Internet isn't print. You can publish something at a URL, then change that URL's content. That's not a crime and it isn't worrying -- it's built-in to the medium.

Just like nothing makes the moment of publication special, nothing makes the moment of re-publication or re-writing special.

The New Yorker did a nice piece on the Internet archive, who is trying to "solve" this problem by periodically archiving the web. They pointed out that when Tim Berners-Lee invented HTTP, he considered the idea of versioning, but ultimately discarded it.

    In 1989, at CERN, the European Particle Physics 
    Laboratory, in Geneva, Tim Berners-Lee, an English
    computer scientist, proposed a hypertext transfer 
    protocol (HTTP) to link pages on what he called 
    the World Wide Web. Berners-Lee toyed with the 
    idea of a time axis for his protocol, too. One 
    reason it was never developed was the preference 
    for the most up-to-date information: a bias against 
    obsolescence. But the chief reason was the premium 
    placed on ease of use. “We were so young then, and 
    the Web was so young,” Berners-Lee told me. “I was 
    trying to get it to go. Preservation was not a 
    priority. But we’re getting older now.”
You can read the full story here: http://www.newyorker.com/magazine/2015/01/26/cobweb

I think ultimately having a strong and well-supported Internet Archive (if you care, donate: http://archive.org/donate/) is the best possible solution to this "problem". As long as we can go back and see how content evolved over time, we'll be able to study the changes.

And no, media companies are not going to embed Git into their news stories -- most of their visitors don't even know what Git or version control is. And most probably have never even clicked the "revision history" tab in Wikipedia.

comment 11y ago · link · parent

I brought this up on Twitter, but I think the term "shard" referring to a partitioned database originated from Ultima Online.

The game's fiction included reference to shards of a wizard's crystal that created duplicate worlds -- a convenient explanation within that universe for the need to run multiple, duplicate servers with different users on them.

https://twitter.com/amontalenti/status/615116231092371456

comment 11y ago · link · parent

Parse.ly (http://parse.ly) - Fully Remote - Full-Time

Parse.ly has built a real-time content measurement layer for the entire web.

Parse.ly's analytics platform helps digital storytellers at some of the web's best sites, such as Arstechnica, New Yorker, The Atlantic, The Next Web, and many more. In total, our analytics backend system needs to handle over 25 billion monthly events from over 400 million monthly unique visitors.

Our entire stack is in Python and JavaScript, and our team has innovated in areas related to real-time analytics, building some of the best open source tools for working with modern stream processing technologies. Our UX/design team has also built one of the best-looking dashboards on the planet, using AngularJS and d3.js.

Our distributed team is best-in-class and we happily skip commutes by working out of our ergonomic home offices. Here's a photograph of mine running two full-screen Parse.ly dashboards on my monitors: https://www.flickr.com/photos/amontalenti/19043513522/in/dat...

We are currently looking for UX / front-end engineers to help us build the best real-time analytics dashboard the world has ever seen. The only requirement is some experience in Python/JavaScript, emphasis on JavaScript. Bonus points for an interest in information visualization, Edward Tufte, or d3.js.

Apply via work@parsely.com (CV, github link, 1 paragraph intro), and make sure to mention this HN post!

p.s. to see an example of how we work, check out the blog post, "Whatever It Takes": http://blog.parsely.com/post/46/whatever-it-takes/

613.

How last night's Leap Second event looked to ntp(twitter.com ↗)

1 points · by pixelmonkey · 11y ago · discuss

comment 11y ago · link · parent

"In the evaluation in section 7 of the paper, Heron beats Storm in every single metric."

In every metric except perhaps the most important one for actual users:

Storm is open source, Heron isn't.

Also, the @TwitterOSS account indicated that there are "no plans to open source in the short-term":

https://twitter.com/TwitterOSS/status/605460461761396736

comment 11y ago · link · parent

Surprising, but good news. When Swift was originally announced, I suggested on HN that if they didn't open source it, long term, it would go "the way of Flash" -- eventually, developers would abandon it in favor of more open platform technologies.

https://news.ycombinator.com/item?id=7851583

comment 11y ago · link · parent

I was just informed today that this article, "Lucene: The Good Parts", which I wrote a few months ago, was also just published in Hacker Monthly for this month's print/digital issue (June 2015):

http://hackermonthly.com/issue-61.html

comment 11y ago · link · parent

(Author here.) As others have pointed out, I am here referring to SQL as a broad term for "SQL RDBMSes". When I say that it is not a good blob or document storage system, what I mean is this: You can plop unstructured data into a SQL RDBMS using something like JSON serialization, but it's not generally a good idea. Document storage requires flexible schemas, so SQL schemas are also not generally a great idea -- you end up with tables with lots of nullable fields that are usually empty.

As an example, imagine a single database where you want to store actual desktop documents, such as the formats supported by Apache Tika: https://tika.apache.org/1.8/formats.html -- If you try to model this using a SQL schema, you'll likely be in for a world of pain. From a UX standpoint, a user just wants to "search across all documents", but you have hundreds of heterogeneous types with varying degrees of field-level compatibility.

comment 11y ago · link · parent

Might be specific to the Python driver, but it was slower for queries because most of the cputime was being spent decoding column structure/metadata and on type conversions. We also tested msgpack blobs, iirc, but the xsv format was the winner for query perf and for compactness on disk.

Would have gladly gone into more detail, but at 4,000+ words for the blog post already... :)

comment 11y ago · link · parent

We use Cassandra for data grouping and ordering. Find our other blog post on "Mage", our time series engine, for more info.

comment 11y ago · link · parent

You said: "they should have defined their schema upfront".

We tried. It was not only less disk efficient, but also slower for queries. Wasn't the result we expected, but alas.

comment 11y ago · link · parent

huh?

comment 11y ago · link · parent

We are still running Cassandra. It's used in a more restricted way than we originally thought we'd use it, but we're following the recommendations we wrote up in linked article.

We don't use counters -- at all. (This is discussed in one of the sections.) Counters are one of the few Cassandra features that can offer you some form of value aggregation inside the data store, but we decided they weren't worth it, due to the quirks.

What do you mean by, "when it's wildly known to be a bad idea?" What are you referencing? Lots of people use counters in Redis and MongoDB for analytics, for example.

comment 11y ago · link · parent

OP here. Indeed, it is a parody of click bait, although in retrospect I think I should have avoided it.

Parse.ly's customers are media companies so we deal with news / media / headlines all the time, so we were being cute in referencing this practice in the article. I used the headlines as a mechanism to break up the prose, too, and add some levity, since this article weighs in at over 4,000 words.

But I underestimated the ability of techies to scan the headline and paragraph one of an article and say, "not worth my time" and bounce instinctively. In fact, when I tried to submit this post to r/programming, the moderators instantly deleted it, referencing the headline, despite it being a parody.

One thing I shouldn't be surprised by: The Internet adapts!

comment 11y ago · link · parent

OP here. Surprised to find this article on the HN front page, a month after we originally posted it.

Glad to answer questions. Ask me anything!

625.

This Team Used Apache Cassandra You Won't Believe What Happened Next(blog.parsely.com ↗)

7 points · by pixelmonkey · 11y ago · discuss

comment 11y ago · link · parent

I used a Linux program called byzanz. The bash alias I use to record gif screencasts is here:

https://github.com/amontalenti/home/blob/master/.bash_aliase...

comment 11y ago · link · parent

https://github.com/Parsely/streamparse

comment 11y ago · link · parent

To be clear, our projects (at Parse.ly) don't have anything to do with Tor. In fact, I didn't know much about Tor until researching DARPA and the other participants involved in the program.

But, I'll address your general question, which is, do I have a moral/ethical problem with DARPA funding some of our open source work, such as streamparse and pykafka?

The answer is a resounding "no". There are very few funding sources for open source work. Part of DARPA's funding supports fundamental tech advancements (famously, the Internet itself and GPS) and recently, important open source projects (such as, Apache Spark and the Julia language).

Now, there is no doubt in my mind that open source software is used for intelligence purposes, regardless of its funding source. To restrict ones contribution to F/OSS based on the fear that some government or entity may use it toward an end you disagree with seems a battle you can only win through willful ignorance.

The nature of open source software is that people can use it however they please (within legal limits, of course). This is a trade-off I accept with eyes wide open, and in my mind, the benefit to the community for F/OSS always wins out.

comment 11y ago · link · parent

Hmm, not sure I could answer that question, as in this case, DARPA is supporting our open source projects, not our commercial projects. Or is that what you are asking?

That said, FastCompany covered the story of how we got involved with DARPA here:

http://www.fastcompany.com/3040363/the-future-of-search-brou...

comment 11y ago · link · parent

One of the supported projects is splash, which is basically WebKit-as-a-service. It takes an interesting approach to crawling where it renders the page using WebKit, and then exposes the "rendered DOM" -- so that your crawling code doesn't need to actually use JavaScript for information extraction. See:

https://github.com/scrapinghub/splash

People often use Scrapy + Splash together in the Python community for crawling more dynamic websites.

A team I collaborated with is also working on a project to make Scrapy usable in a "cluster context", it's called scrapy-cluster. The idea is scrapy workers running across machines and a single crawling queue (in the current prototype, powered by Redis) in between them all.

https://github.com/istresearch/scrapy-cluster

1
202122
28