News for hackers. Stuff that matters.
Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @08:42AM (#15558294)
Author here. Small bit of background. I'm VP of Engineering at Wallaroo Labs and a member of the Pony core team (many folks at Wallaroo Labs are now actively involved in the Pony community).

Happy to answer any questions here or if you prefer, via email:

[email protected]

Re:Why we used Pony to write Wallaroo by ZenoArrow on Thursday October 26, 2017 @12:39PM (#15560481)
Have been impressed with Pony the few times I've seen it on HN, thanks for your work on Pony and Wallaroo.

I'm guessing that tooling for Pony still needs some refinement, but as things are now what would you recommend to someone new to Pony (e.g. editor, package manager, build tools, debugging tools)?

Oh and just out of interest, did you evaluate Rust as a language for Wallaroo? I do think Pony has the potential to be stronger in certain areas, but it seems like there's a certain amount of overlap in terms of use cases.

Re:Why we used Pony to write Wallaroo by jtfmumm on Thursday October 26, 2017 @12:47PM (#15560612)
I'm an engineer at Wallaroo Labs and I've been writing Pony for the last two years. We're using pony_stable (which is the primary package manager at the moment) and make for managing builds. I currently use Sublime 3 as my editor and lldb for debugging. I know that others are using emacs and vim as well.

We did consider Rust as there are certainly overlaps in their approaches to safety (though coming from different angles). In the end we thought that Pony would be better for managing concurrency for our particular use cases, which we thought mapped well onto the actor model.

Re:Why we used Pony to write Wallaroo by kodablah on Thursday October 26, 2017 @12:57PM (#15560742)
> we thought mapped well onto the actor model.

Out of curiosity, were there a widely accepted actor lib/approach in Rust (I know there are a few like RobotS and others), would that have affected your decision?

Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @01:07PM (#15560854)
It might have. When we were looking at Rust, it was a topic of conversation.
Re:Why we used Pony to write Wallaroo by steveklabnik on Thursday October 26, 2017 @01:28PM (#15561081)
In general, it's not a space where there's a hyper-mature library, but there are some cool stuff happening today: http://cityboundsim.com/devblog/my-full-rustfest-talk-with-n...

That said, I mean, if you want to go full actors, Pony is a great choice.

Re:Why we used Pony to write Wallaroo by Cyph0n on Thursday October 26, 2017 @02:27PM (#15561613)
Oh wow, I used to follow Citybound development a while ago when it was still written in JS. Anselm is an amazingly talented developer and it's great to see him working with Rust!
Re:Why we used Pony to write Wallaroo by aturley on Thursday October 26, 2017 @01:38PM (#15561176)
I'm also an engineer at Wallaroo Labs. A while back I wrote up some information for people who were interested in Pony:

https://gist.github.com/aturley/49b60c98306d90ffc2f981515827...

I've been using Emacs as an editor. We use a combination of make and pony-stable to build projects. For package management we use pony-stable. LLDB is your best bet for debugging, and if you follow the link above there's a link to the pony-lldb project, which is an LLDB extension that makes it easier to work with a few Pony datatypes.

Re:Why we used Pony to write Wallaroo by snappyTertle on Thursday October 26, 2017 @12:37PM (#15560456)
Why did you choose Pony over something like Erlang or Elixir?
Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @12:45PM (#15560580)
I want to preface this with: I love erlang. We use Elixir for the service that powers metrics display for Wallaroo. When I learned Erlang several years ago, it made me a better programmer.

At the time we made the decision, we were worried about Erlang being able to meet the latency and throughput goals we had. I knew a number of people who worked on Riak at Basho and had a few lengthy discussions about Erlang performance. They felt that we could end up struggling to get the performance we were looking for.

I had never used Erlang for any large scale project and deferred to their wisdom and knowledge.

As it turns out, the approach that we've used to support languages like Python is in process, using C to bind Wallaroo with the other language. This probably would have been more difficult with Erlang as well, but that's hindsight.

Erlang is an awesome language. It has an amazing VM. That we didn't think it was right for us should in no way discourage anyone else from using it.

Re:Why we used Pony to write Wallaroo by fasquoika on Thursday October 26, 2017 @01:22PM (#15561012)
Is your application CPU bound? Because that's generally where Erlang's performance is lacking. I'm pretty sure you wouldn't run into performance issues in Erlang if you're doing an IO bound task
Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @01:29PM (#15561097)
Wallaroo is a framework for end users writing applications. It is not an application itself. Many of the use cases that people come to us with are very CPU intensive.
Re:Why we used Pony to write Wallaroo by fasquoika on Thursday October 26, 2017 @04:00PM (#15562462)
Thanks, that makes sense
Re:Why we used Pony to write Wallaroo by vanderZwan on Friday October 27, 2017 @03:52AM (#15566465)
Just so you know, some of the earliest videos you can find about Pony are at Erlang conferences, probably because it is cited as a big influence (actor language). The two communities seem to be getting along very well.
Re:Why we used Pony to write Wallaroo by jack9 on Thursday October 26, 2017 @03:10PM (#15562037)
How do you ingest data with Wallaroo? I see a mention of "...say TCP" and in the github word count there is mention of a (data)source framed-message-protocol but nothing that describes it in the (https://github.com/WallarooLabs/wallaroo/blob/0.2.0/book/cor...) link.

Dropping Python into the mix for a high throughput processing pipeline seems counterproductive. Why isn't there a tutorial in a more strict language like Go or C++, since someone pursuing this kind of high-throughput framework that can't benefit from wider parallelism, will 100% want that performance guarantee?

Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @04:39PM (#15562803)
Ingestion:

Kafka and framed TCP are the two ingestion sources that Wallaroo currently ships with.

Python:

We added a Python API because there was a lot of interest in it. There's more to Wallaroo than just performance and folks were interested in having it available via Python. See https://vimeo.com/234753585 for some more information on the "scale independent" nature of the Wallaroo APIs.

Go:

We're working on that right now actually. Planning to release later this year.

C++:

We had a C++ API (still do), we aren't currently supporting it. There was limited interest at the time. If folks show interest we would start supporting it again.

Re:Why we used Pony to write Wallaroo by MrBuddyCasino on Thursday October 26, 2017 @04:33PM (#15562760)
I‘ve worked with Scala/Akka, and while I like the actors model, some things turn me off about the stack, mostly the language.

After reading the Pony guiding principles, I was delighted. This looks like an implementation where the ecosystem complexities don’t get in my way of „getting things done“!

Re:Why we used Pony to write Wallaroo by Cyph0n on Thursday October 26, 2017 @06:23PM (#15563731)
May I ask what turned you off about Scala?
Re:Why we used Pony to write Wallaroo by MrBuddyCasino on Friday October 27, 2017 @03:44AM (#15566432)
Its the JVMs C++. Because it is both OO and functional, it has too many concepts and some have a poorly thought out mental load/usefulness balance. Implicits is just the most notorious offender. For me it was a huge productivity killer, because proficiency takes a long time and the tools are poor (IDE support, compile times & build tools).

I like my languages opinionated, in as "there should be one way to do it". Python, C, Go, Clojure, maybe Rust. Designed to be a tool for their inventors set of problems, not a vehicle to implement research papers. Fast turnaround/feedback cycles.

Re:Why we used Pony to write Wallaroo by Cyph0n on Friday October 27, 2017 @04:21PM (#15571910)
> Because it is both OO and functional

Hmm, I actually see that as a strength. Need a strong type system, pure FP, and immutable state throughout? Easy. Need to build an OOP library that will be mostly used by Java devs? Easy as well.

Implicits are handled pretty well by Intellij IDEA afaik.

Of course, I haven't had experience using Scala in a large codebase, so I may be on the wrong track!

Re:Why we used Pony to write Wallaroo by MrBuddyCasino on Saturday October 28, 2017 @05:34AM (#15574543)
If it works for you, great! You have a very powerful tool at your disposal. There are many good reasons to like Scala, it is entirely possible that my experience would have been different in another team setup.
Re:Why we used Pony to write Wallaroo by kevinconaway on Thursday October 26, 2017 @12:55PM (#15560719)
Thanks for the writeup Sean. I've been interested in pony since I read about here on HN a while back.

I have a question on this quote

> The standard JVM garbage collection strategy is “stop the world.” That is, when the JVM needs to reclaim unused memory, it needs to pause all other processing so it can safely garbage collect. These pauses are sometimes measured in seconds. That is going to destroy your tail latencies.

Thats why applications rarely use the default serial collector.

Does your comparison still hold against the CMS and G1 collectors, which do a much a better job at eliminating "stop the world pauses"?

Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @01:03PM (#15560815)
Thanks.

At my previous job, we used the G1 collector and still had issues with "stop the world" type pauses. G1 does a best effort, but I've had applications that still experience rather long pauses (sometimes measured in seconds, usually hundreds of microseconds).

I haven't used either CMS or G1 heavily since I joined Wallaroo Labs a couple years back so, I don't have first hand experience with either recently.

Azul's Zing JVM does a really nice job of concurrent collection and if you can afford it, is a great way to improve the performance of clustered JVM applications.

Re:Why we used Pony to write Wallaroo by model_m_warrior on Thursday October 26, 2017 @12:45PM (#15560584)
What benefits does Pony have when compared to Erlang?
Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @12:49PM (#15560636)
From the Pony side:

Biggest strength would be performance. Biggest weakness would be maturity. I think almost every pro/con I can think of can fall into those 2 buckets right now.

I'm a big fan of type systems so Pony having one is a big win for me.

The maleability of Pony and its immaturity helped us in some ways. We were able to treat it as a runtime for us to help mold and fit to our needs. That wouldn't have been possible with Erlang.

Re:Why we used Pony to write Wallaroo by 59nadir on Thursday October 26, 2017 @02:17PM (#15561531)
> Biggest weakness would be maturity.

Has there been any progress towards a preemptive scheduler? Otherwise, I'd think that's the most obvious weakness.

Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @03:30PM (#15562205)
There's pros and cons to preemptive and cooperative scheduling policies. I wouldn't be comfortable labelling either as weakness. It really depends on context.

I've heard rumor of someone working on a preemptive scheduler. The current cooperative one is about to have runtime backpressure added to it which is going to be a really nice scheduling win.

https://github.com/ponylang/ponyc/pull/2264

Re:Why we used Pony to write Wallaroo by 59nadir on Thursday October 26, 2017 @04:04PM (#15562503)
For the kinds of systems that are built with Erlang, which is a niche that Pony seems to want to occupy, I would argue it's inherently better to have preemptive scheduling. A cooperative scheduler will always be an open invitation for bugs relating to CPU hogging. Not having to worry about these things is priceless.
Re:Why we used Pony to write Wallaroo by model_m_warrior on Thursday October 26, 2017 @01:21PM (#15561003)
Are Ponys classes akin to Erlang modules or does it take a more enterprise-y perspective on OOP?
Re:Why we used Pony to write Wallaroo by scottlf on Thursday October 26, 2017 @03:27PM (#15562185)
Howdy. Erlang's modules are involved in code namespace for the compiler & runtime (i.e., the 'M' of the 'MFA' triple of Module + Function name + Arity that names a function) as well being the unit/scope/bound for hot code loading (i.e., you must load or unload an entire module at a time).

I've worked in Erlang-land far longer than I've lived in any OOP-land, so I'm not sure what you mean by enterprise'y OOP. Coincidentally, Pony's rules for "Packages" are something I just smacked my ignorant head against a few hours ago. The subsections of https://tutorial.ponylang.org/packages/ in the tutorial can probably answer at least some of your question: specifically "Package System" and "Use Statement".

Re:Why we used Pony to write Wallaroo by pdimitar on Thursday October 26, 2017 @04:30PM (#15562741)
I'll take the liberty to speculate and assume your parent comment was asking if Pony classes have the same features as Java classes -- namely class-level attributes, instance-level attributes, different access levels to attributes and methods. Those things.

So, does it?

Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @04:42PM (#15562814)
Pony classes have methods. Pony classes have fields.

Fields and methods can be public or private. Private is akin to Java's package private.

There are no instance variables.

Re:Why we used Pony to write Wallaroo by pdimitar on Thursday October 26, 2017 @08:54PM (#15564678)
Thank you. And structs / records? I mean, if there are no instance fields, there has to be some kind of constructs that emulate them.
Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @09:26PM (#15564854)
Sorry, I mispoke. There are no class fields. Only instance fields.
Re:Why we used Pony to write Wallaroo by aturley on Thursday October 26, 2017 @01:45PM (#15561244)
I'm not sure which features of Erlang modules you're interested in comparing to Pony classes, but I'll take a stab at trying to answer.

Pony classes are defined using a "class" keyword. Classes have properties and functions, where functions are like methods that you would find in a language like Java. Pony supports structural subtyping via interfaces and nominal subtyping via traits, and it disallows multiple inheritance.

I'm not sure how much that helps, but if you have more specific questions I'd be happy to try to answer them. I'm a little rusty on my Erlang, but hopefully it will come back to me.

Re:Why we used Pony to write Wallaroo by jdp23 on Thursday October 26, 2017 @04:30PM (#15562747)
Just wanted to say, thanks for the excellent article and the answers to questions here!
Re:Why we used Pony to write Wallaroo by spooneybarger on Thursday October 26, 2017 @04:34PM (#15562769)
Thank you!