Re:Polyglot is a distributed web framework for multiple prog...
by FooBarWidget on Monday July 14, 2014 @02:09PM
(#8032289)
That makes sense if your services do not follow the request-response pattern (e.g. background workers). But what if they do? In Polyglot, the services very clearly follow a request/response pattern because they're handling web traffic. What sense, then, does it make to use a message queue?
Persistence? Makes no sense for web traffic. Even if the message is persisted to disk, it's useful for a few minutes at most before the user gives up and closes the tab.
Language-independence? You don't need a message queue for that. You can do that with regular HTTP.
Scaling and load balancing? Ditto.
Re:Polyglot is a distributed web framework for multiple prog...
by rubiquity on Monday July 14, 2014 @02:14PM
(#8032319)
I'm not sure what your comment is getting at. I think HTTP is fine for the Web, and any service exposed and designed for use by the Web is going to have to use HTTP. But if you're going to use a framework like Polyglot, you're going to have several services and any of those services not directly communicating with the Web doesn't need to speak HTTP.
Re:Polyglot is a distributed web framework for multiple prog...
by FooBarWidget on Monday July 14, 2014 @02:32PM
(#8032416)
What I'm getting at is why those services shouldn't speak HTTP. I understand that they don't need to speak HTTP per se, but I get the feeling that your comment is implying that such services should speak a non-HTTP protocol, while I think that it's fine even if those services speak HTTP.
Re:Polyglot is a distributed web framework for multiple prog...
by socceroos on Tuesday July 15, 2014 @01:35AM
(#8034956)
Persistence can be very important depending on your needs. Save-and-forget comes to mind.
Re:Polyglot is a distributed web framework for multiple prog...
by tlrobinson on Monday July 14, 2014 @02:45PM
(#8032500)
That makes sense. There are also good reasons to just HTTP: one less technology to understand/troubleshoot, reuse existing tools and middleware.
Re:Polyglot is a distributed web framework for multiple prog...
by Xorlev on Monday July 14, 2014 @04:10PM
(#8032923)
We've had a similar argument internally. In load testing, we're not bounded by the speed of our JSON parsing, and if we were we'd probably just swap that endpoint to use a different message body provider before moving to a totally binary RPC model.
Especially in the Java world, where Jackson + Afterburner is fast enough for most cases. Protobufs/Thrift will smoke it in most performance tests, true enough, but when you're waiting on a database or algorithm to run, what's JSON serialization?
There's certainly benefits at extreme scale, but not enough to justify the loss of tooling that comes with it until necessary.
Re:Polyglot is a distributed web framework for multiple prog...
by rubiquity on Monday July 14, 2014 @02:51PM
(#8032524)
Yup, I agree with that and in a team environment that may be very valuable. HTTP is definitely the "JavaScript of protocols." However, I don't think learning other protocols is a ton of overhead, and learning is always a good thing ;)
> Why is this better than just using HTTP?
In SOA most of your services aren't going to be exposed publicly. HTTP is a great protocol for public facing servers, but HTTP is a very clunky protocol. For private services, it's a pretty big benefit (performance, scalability and ease of parsing) to skip HTTP and use something else. ZeroMQ gives you several messaging patterns that you would never get from HTTP.