TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Perl toolchain for building micro-services at scale

142 pointsby ramananalmost 9 years ago

11 comments

SwellJoealmost 9 years ago
I&#x27;ve just started tinkering with Mojolicious, after spending some time playing with a variety of other frameworks in other languages (I&#x27;m starting a new web project, and wanted to make an informed decision about how to build it). Mojolicious gets so many things right in such a tiny package, I&#x27;m surprised more folks aren&#x27;t using it or talking about it.<p>The real-time support is awesome; setting up Websockets is stupidly simple; coding non-blocking services is, I think, easier (at least more concise) than in Node.js (though it uses a similar callback model); testing is just perfect (Mojo has a user agent and DOM support, so you can write super concise tests for web services); building multiple outputs (like HTML for humans and JSON for API) for the same routes is excellent. So far, none of the frameworks I&#x27;ve looked at has been as concise or as...neat, I think might be the right word. So many things about it have me saying, &quot;Now, why didn&#x27;t someone think of that earlier?&quot;<p>It&#x27;s pretty tightly focused on just doing a few things really well, so it&#x27;s not like a Rails, or even Django, experience...you have to make your own decisions about what ORM to use (or not to use an ORM), front end (though because it is agnostic about front end, you can use whatever you like pretty readily...so, React&#x2F;Redux, Angular, whatever), and even nitty gritty stuff like authentication and accounts and such. I occasionally find myself wishing it had a <i>little</i> more batteries included, but mostly I like that it doesn&#x27;t take days of doc&#x2F;code spelunking to grasp the whole system.<p>Anyway, I&#x27;m not a Perl fanatic, though I like the language OK; especially in recent versions. So many little warts have gone away in recent years. But, the web service ecosystem in Perl is surprisingly strong and modern, given how unpopular it seems to have been in recent years. It&#x27;s been a while since I really dug into what goes into building a new Perl system, and a lot of cool stuff has been completely off my radar. Mojolicious, in particular, is one of those things.
评论 #11944068 未加载
评论 #11944573 未加载
n_coatsalmost 9 years ago
Nice post! At my most recent job, we used perl daily for processing scripts and many other functions. After initially having similar thoughts about it being &quot;obsolete&quot; and a &quot;dinosaur&quot;, I quickly realized how resilient and flexible the language is (I know the flexibility can come with some criticism).<p>We investigated a lot of other options (go &amp; python specifically) when building new projects, but found that perl was the best solution. It&#x27;s flexibility allowed us to develop a custom and durable solution that surpassed our expectations.<p>We ran into some environment&#x2F;portability issues and resorted to using docker, carton, and gitlab CI to solve these problems. It is incredible how reliable and easy it became to modify and deploy code to a variety of systems (new or old).
评论 #11946407 未加载
marghidanualmost 9 years ago
I fully resonate with this article! For the last few years I&#x27;ve been trying to do the same thing and in the last 2 years I can say that we successfuly managed to create a similar thing using Perl. More than this we are developing all our web services with Mojolicious we are running them on top of Mesos using Docker. We use Module::Build for packaging the app and to be honest I find it more reliable than using any other tools. I&#x27;m gald to see that there&#x27;s somone else who believes in Perl&#x27;s abilities to deliver a modern application.
评论 #11944222 未加载
sijoealmost 9 years ago
A key component of the network side of our (<a href="https:&#x2F;&#x2F;scalableinformatics.com" rel="nofollow">https:&#x2F;&#x2F;scalableinformatics.com</a>) SIOS layer is handled by Mojolicious running on Perl. Has been for a while (about 5 years).<p>I&#x27;ve taken some steps to do a re-implementation in node, but the perl version &quot;just works&quot; with very little fuss, under fairly heavy load, and is pretty easy to debug when I need to.<p>This is very much a microservice: tailored PXE environments as a service based upon a database, and the booting mac address as a key. A programmatic&#x2F;database-based backend to a PXE server. It allows us to boot effectively anything that is bootable by modern hardware, from Linux, Windows, SmartOS&#x2F;OpenSolaris, through FreeDOS, and other more esoteric systems. A number of our customers use this as a configuration tech underneath their own orchestration layers.<p>All Perl based, and using as modern techniques as possible.<p>We stopped using system Perl many years ago. Red Hat seems to like to ship not merely obsolete versions, but versions actually past their end-of-life, so that they are not really supported upstream anymore. They have a similar issue with Python and other languages. So, reluctantly, about a decade ago, we started building our own toolchain. First with Perl, then adding in Python, Julia, R, Octave, and other analytics codes. Our analytics tools use all of these as part of our SIOS rambooted appliances (<a href="http:&#x2F;&#x2F;scalableinformatics.com&#x2F;fastpath" rel="nofollow">http:&#x2F;&#x2F;scalableinformatics.com&#x2F;fastpath</a>), so we needed the updated toolchain. We are looking at Rust as well for future work, and have looked at incorporating Go, but we don&#x27;t have any Go code developed&#x2F;planned as of yet.
tmalyalmost 9 years ago
I have been using Perl to do similar things. I build everything internally in the same manner as one would a CPAN module, and this is checked into a private git repo.<p>From there it is simple to call custom tools to build and deploy services in Perl.<p>My favorite feature about Perl is that version 5.x is compatible with each release and our code has worked without issue for over a decade.<p>I recently integrated some Go code into part of my module and wrote a post about how to compile it as part of the build process here : <a href="http:&#x2F;&#x2F;www.tysonmaly.com&#x2F;programming&#x2F;go&#x2F;using-go-perl-makefile&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.tysonmaly.com&#x2F;programming&#x2F;go&#x2F;using-go-perl-makefi...</a>
Diederichalmost 9 years ago
It&#x27;s often heard that CPAN is Perl&#x27;s Killer App. No argument from me!<p>I believe what&#x27;s even more impressive in the Perl ecosystem is CPAN testers.<p>When you upload a module to CPAN, lots of neat things happen. Of particular interest is all of the testing that gets done. For example:<p><a href="http:&#x2F;&#x2F;www.cpantesters.org&#x2F;distro&#x2F;M&#x2F;Message-Inform.html" rel="nofollow">http:&#x2F;&#x2F;www.cpantesters.org&#x2F;distro&#x2F;M&#x2F;Message-Inform.html</a><p>As you can see, that&#x27;s a pretty wide swath of OS and Perl versions.<p>This is an example of a failure report: <a href="http:&#x2F;&#x2F;www.cpantesters.org&#x2F;cpan&#x2F;report&#x2F;e93a7034-cf3f-11e5-9695-d3f3f0af5a77" rel="nofollow">http:&#x2F;&#x2F;www.cpantesters.org&#x2F;cpan&#x2F;report&#x2F;e93a7034-cf3f-11e5-96...</a><p>This is an powerful resource. I&#x27;ve had random people approach me with suggested fixes to test failures on CPAN in the past. It&#x27;s amazing!<p>I believe the Perl community is <i>serious</i> about testing and reliability in ways that few others are. For example, the default module installation command ($ cpan &lt;module name&gt; or $ cpanm &lt;module name&gt;) will NOT install if there are failures in any of the tests.<p>By modern standards, Perl5 has some silly characteristics, no doubt. But as others have said, the community is <i>rock solid</i>, and more lively than ever:<p><a href="https:&#x2F;&#x2F;metacpan.org&#x2F;recent" rel="nofollow">https:&#x2F;&#x2F;metacpan.org&#x2F;recent</a>
Roboprogalmost 9 years ago
Perl is also one of the fastest things out there - if your problem is doing lots of string handling. I have this little test that does a lot of string concatenation and garbage creation, which I recently pulled out of the closet to compare Javascript on Node and Javascript on Nashorn (and also native Java, since it was already there). Even on Java 8, Perl still blows it away.<p>That said, I hate working with references in the Perl debugger, and, I would be lynched at most worksites, at least in Sacramento, if I suggested a Perl back end. ...Which is too bad - Java&#x2F;ORM, &quot;COBOL-fingers&quot;, bondage and discipline forever...
评论 #11947464 未加载
mhdalmost 9 years ago
What&#x27;s microservice-specific about that post? It&#x27;s mostly about pretty standard perl packaging and deploying, most of which would apply to monolithic equally well (even more so, if your dividing line is DarkPAN-backed modules and not HTTP-isolated (micro-)servers).
评论 #11944897 未加载
mschuster91almost 9 years ago
It surprises me Perl isn&#x27;t dead yet - in fact, German Bundeskriminalamt built a website for people having information about the German nazi hool riots during the France EM 2016 in Perl: <a href="https:&#x2F;&#x2F;www.bka-hinweisportal.de&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.bka-hinweisportal.de&#x2F;</a>
评论 #11944495 未加载
评论 #11944796 未加载
评论 #11944648 未加载
_pmf_almost 9 years ago
This is one of the first articles that clearly and consistently lays out the actual concrete benefits of microservices instead of the cargo cult Medium drivel that usually plagues the ecosystem.<p>(Of course, these are still only arguments for SOA and there&#x27;s no clear differentiation between SOA and microservices, because there is none.)
评论 #11944437 未加载
评论 #11945753 未加载
onetwotreealmost 9 years ago
This is a great writeup. I especially like that you make the actual concrete case for micro-services instead of the hype driven garbage we usually see.<p>Do you have trouble hiring qualified perl devs?