Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4669026yPHP 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. -
@C0D4 well that may be a reason for not finding anything about it.
However how is Java Spring more for microservice and not PHP? -
C0D4669026y@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? -
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. -
@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!
-
@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
-
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.... -
@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. -
inaba45896y@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 -
@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? -
C0D4669026y@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. -
inaba45896y@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. -
@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.
-
@ItsNotMyFault yeah, one solution to add microservice to existing php is through rabbitmq with consumers
-
inaba45896y@ItsNotMyFault Fuck I think I just had a brainfart or something lmao. Yeah messaging is the way to go :v
-
@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. -
@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
Related Rants
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 ?
rant
nodejs
php
go
killme
java
javascript
microservice