10

I like PHP but every new tech is about all the other languages ! Recently i was searching for microservice architecture and oh it's so easy with nodejs ! It's ready made for Go ! Java has a library build in ! What about Symfony ? Laravel ?

Comments
  • 8
    PHP isn't for microservices - well unless you're me, and aren't building it for large scale usage😂

    But using a framework on top of PHP is already not "micro".

    Yes you could extend an application already made with php and add a rest api but that's about it.

    Source: I'm a freaking PHP Dev, from the PHP4 era.
  • 3
    @C0D4 well that may be a reason for not finding anything about it.
    However how is Java Spring more for microservice and not PHP?
  • 7
    @spyridonas same boat really.

    If you want micro, you need something lightweight and fast.

    Look at lambdas, node (I dislike it but it works when done right), or go.

    Is this for something personal / small use or something large scale?
  • 4
    In my understanding, microservices can be developed in any language. That's the point. Every "micro" service has its own world where he can do whatever he want in any freaking language.

    The infrastructure to make all the microservices working together it's another thing. "Languages" here are out of the picture, it's heavy devops or you are dead.
  • 3
    @C0D4 its for large scale and future expansion of the company I work for. Can't wait to tell all the devs, guess what, we will write in Go for now on!
  • 3
    @deviloper that's my understanding as well but I couldn't find any efficient way of connecting them. gRPC does output php interfaces but I don't want Google everything
  • 1
    probably it's more like API+API gateway that must be exposed by each microservice.

    Nginx has some good articles about that and are trying to position themselves as microservice infrastructure: https://nginx.com/blog/...

    Otherwise we go back to an old middleware like an Enterprise Service Bus, which we probably don't want. However if you look at Mulesoft, which was a popular OpenSource ESB at the time of SOA architectures craze, they are trying to switch also to microservices....
  • 0
    @spyridonas you don't want Google everything and decided to use go?
  • 0
    @kalippu no, I don't want to use Go/JavaScript. I want to use PHP.
    For PHP there's gRPC for microservices that generate interfaces, but that's Google as well.
  • 3
    @C0D4 > But using a framework on top of PHP is already not "micro"

    But that isn't really what a microservice is tho. A microservice isn't the size of the stack that you use but rather the size of the feature and how you break your application into smaller applications. "Do one thing and do it well". Like fuck you can still write microservices using Laraval
  • 0
    @inaba yeah my argument is that Spring Java has microservices as well and it's a huge framework.
    Symfony/Laravel/CakePHP/Whatever don't offer that option. Maybe it's a good idea for future framework?
  • 2
    @inaba ok sure you could use something like Lumen, but why?

    Don't get me wrong , I'm far from against php.

    I'll use it when it doesn't even make sense to use it, but I'm also open to using other stacks if they are suited for it.
  • 1
    @spyridonas I think you need to look up what a microservice actually us first tho since it sounds like what you're describing is a micro framework

    @C0D4 You can use literally anything you want as long as it allows you to use REST. If you wanna use laravel then use laravel, if you wanna use lumen then use lumen. If you wanna use both go ahead and have one or more services in laravel and one or more services in lumen.
  • 0
    @inaba HTTP+REST isn't a requirement for microservices (most services work better as a process that consumes/publishes data on a bus) you really only need an http interface at the api layer.
  • 0
    @ItsNotMyFault yeah, one solution to add microservice to existing php is through rabbitmq with consumers
  • 0
    @ItsNotMyFault Fuck I think I just had a brainfart or something lmao. Yeah messaging is the way to go :v
  • 1
    @spyridonas I think you mixed up alot.

    But... Guess that's the point of Bullshit Bingo words.

    Microservices can be done in any language.

    The question should be more: what is the goal?

    Asynchronous, heavy parallelized services to scale? Then yes, Akka / Rabbit and other message based communication might make sense.

    For most cases, this is firing an planet destroyer on a fly.

    People misunderstand trends vs sense.

    When looking at the PSRs,

    https://www.php-fig.org/psr/

    You can see that HTTP / Routing / Event Handling / Logging already became PSRs. The ground work is there. Used by several frameworks.

    But really... If you don't pump Terra / Peta or more data per hour.... Forget it.

    The complexity isn't worth it.
  • 0
    @IntrusionCM I know that I can make it by myself, the original rant is about having to get all of the things you mentioned and combine them to make microservices.
    Node/Go/Java have ready libraries for that
Add Comment