in reply to Re^3: Perl microservice framework
in thread Perl microservice framework

Well, I like the idea of having batteries included. I don't have the luxury of time to dabble with too many different options and with their respective ways of doing things (eg. I don't have time to learn both Catalyst and Mojolicious).

Deciding on a particular stack or framework, and then switching later can be expensive. So I prefer to leverage upon the time and knowledge invested in one good thing that can [ideally] do everything.

Replies are listed 'Best First'.
Re^5: Perl microservice framework
by NERDVANA (Priest) on Dec 24, 2024 at 15:31 UTC
    I think you're looking for Mojo, then. Mojo comes with its own event system, so you don't need to change anything later if you decide to do something event-driven. The toolkit all installs as a single dist, so you don't have to worry about version conflicts. Everything in the Mojolicious dist follows a common pattern for objects and minimalism. It's a very capable web framework, but also my first choice for microservices. There's also the separate Minion dist which pairs with Mojo and lets you do long background processes without disturbing the web request processing.
Re^5: Perl microservice framework
by LanX (Saint) on Dec 24, 2024 at 11:52 UTC
    Well, maybe you should have the "luxury of time" to find out what you need and what you want first?

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    see Wikisyntax for the Monastery

      I have already provided an example for a basis for comparison with Spring Boot, with REST as a use case, and stated a preference to avoid having to deal with disparate Perl projects that were not originally designed for microservices architecture (albeit they can be used as such).

      Java has well-understood and popular ecosystems for web and microservices with clear goals for different projects (eg. the need to extend Spring with Spring Boot, and others like Quarkus and Micronaut that tailor to different developer preferences).

      As some people have helpfully pointed out, Perl offers projects that can satisfy aspects of microservices:

    • Catalyst promotes convention over configuration (a style of Spring Boot)
    • Mojolicious is event-driven, can run standalone instances (a feature of Spring Boot)
    • Plack is light weight (the need for Spring Boot)
    • Myraid is unclear to me what it coordinates (my guess is BPM or deployment orchestration, or some kind of burst scaling tool)

      but this is precisely the kind of disparateness I want to avoid where there is no complete unified solution.

      A CPAN search shows projects that come close are apparently primarily only intended as management tools (as opposed to frameworks) (eg. BeeKeeper, Myraid, Narada).

      Judging on the responses received thus far, I believe that Perl has no specific microservice framework.

        It doesn't make much sense to complain about Perl projects being not originally designed for microservices, when Spring Boot was also not originally designed for microservices (though it often is used for that).

        Both Catalyst and Mojolicious can be used to implement REST style microservices. These are also the safest bets in terms of community/support. Plack is a lower level web framework, really meant for authors of web frameworks, rather than application developers.

          A reply falls below the community's threshold of quality. You may see it by logging in.
        Java has well-understood and popular ecosystems for web and microservices with clear goals for different projects (eg. the need to extend Spring with Spring Boot, and others like Quarkus and Micronaut that tailor to different preferences).

        ...but then you'd be learning whole new frameworks any time you wanted to produce a slightly different style of web app? I'd much rather have flexible frameworks that do them all equally well.