Debugging Protocol Shoot-out (Part 2)
Guy Harpaz posted a reply to my Debugger Protocol Shoot-out on his newly created blog. In this post he tries to counter some of my arguments. I don't quite understand why he couldn't just have posted his comments here though. (And in case why you're wondering why I'm not adding a comment to his post: You need a blogger.com account to comment, and I refuse to create one just to be able to comment on a blog).
The first thing that strikes me as odd is the following quote:
We chose performance (binary based protocol) over easy server side implementation (textual based protocol).
Easy implementation was never the reason for going with a textual based protocol. The main reason was to allow extensions to the protocol be as easy as possible. Cramming as much data in as little bytes as possible is also not going to increase performance if your protocol has no ways to paginate through arrays with many elements or when you have no means of limiting the amount of data in one variable to be send over the wire. This is very useful incase you have a few MB files in variables for example.
The second argument why you should "choose Zend Studio's protocol" is:
DBGp supports several scripting languages and from this derives some of its disadvantages. We believe that a debug protocol should be as 'close' as possible to the PHP language.
This doesn't make much sense to me, as far as I know Eclipse is a multi language IDE. Secondly, which disadvantages there are is not mentioned.
Then Guy tries to compare some security points:
The Proxy mechanism has few bugs in it
If that is the case, would you mind telling us where?
He further mentions:
The PHP IDE debug protocol does not specify requirements for a security system but defines that the Debug server should receive the client IP before initializing the session. By using the IP, implementing a security mechanism is very simple.
Xdebug doesn't specify any requirements either. Xdebug could implement an extra security that checks whether the IP is allowed to be used as debugging IDE client. However, when you are on a NAT-ted local network, and your dev server is somewhere outside of this network you have a problem without a proxy. As there is no way for the debugging engine on the developer machine to connect to individual IDEs anymore (as the IPs are simply not accessible by the devel server because of NAT). The proxy-server based approach of DBGp allows your devel server to connect to the proxy on one IP and one port (which also means you have to poke only one hole in your firewall). The IDE then simply have to make itself known to the proxy server with its "idekey" to allow debugging through a NAT-ted network.
The last point that Guy raises is:
DBGp supports PHP execution stdout and stderr as a general solution for all supported languages. PHP IDE as a specific protocol for PHP can distingue between header output and standard output and between all types of PHP errors (warnings, errors and notices).
It really has nothing to do whether a protocol is specifically made for PHP or not to allow the sending of HTTP headers. DBGp currently has no options for sending headers, but that would not be hard to add. It definitely would not be the selling point on why somebody should "choose Zend Studio's protocol".
Comments
Ok, binary is shorter/more bandwidth efficient and that's obvious to anymone.
This being said, we are talking about debugging, right ? What would be the benefit of a more efficient protocol ? Being able to have 10'000 simultaneous debug sessions on a single server with a binary protocol instead of only 5'000 with a text one ?
In my mind, debugging is done by an handful of people simultaneously on a developement server that is likely to be in the same LAN and with a CPU load of 0.0. The amount of byte sent and received is simply irrelevant.
Beside, I've heard about a few protocols, like html, xhtml, xml, soap, ajax and the al. Last time I checked, they were rather full text protocols, isn't it ? ;)
I've only used xdebug on a LAN, is this really using a lot of bandwidth ?
X+
Would it be possible to compress this textual data? and likewise decompress it on the IDE side, wouldn't this make this "textual" data probably as fast as the binary protocol?
@Ammar: sure we can... but it is really not a problem to have it as textual strings in the first place, so why bother?
I'm definietely with you derick, from technical side and from the "spirit of open source site".
Zend, or Mr. Harpaz in this case, just doesn't carry the spirit of open source, interchangability and heterogeneousity. Your point about Eclipse being multiplatform about just anything is well placed.
@derick: Ofcourse it is no real problem, but this would end the "Binary protocol is faster" debate. Which I find really silly( From Zend's point of view ). But still having this feature in the future releases might be worth it for people debugging remote servers on a slow connection.
Life Line
I've finished reading Children of Memory, the third book in the series.
Another interesting take on forms of intelligent life.
A fourth one is going to get released later this year.
Updated a post_box, a beauty shop, and a restaurant; Confirmed 2 clothes shops, 2 pet shops, and a restaurant
I walked 5.9km in 1h40m39s
Updated a bicycle_parking
Updated 2 waste_baskets
I walked 7.9km in 1h37m12s
Created 3 waste_baskets; Updated 3 bus_stops, 2 benches, and 2 waste_baskets
I walked 8.1km in 1h25m53s
I walked 1.2km in 9m31s
I walked 9.4km in 1h39m05s
Merge branch 'xdebug_3_5'
Merged pull request #1071
Fixed issue #2411: Native Path Mapping is not applied to the initial …
Created 2 waste_baskets; Updated 3 waste_baskets, 2 benches, and 2 other objects; Deleted a waste_basket
I walked 7.9km in 1h45m36s
RE: https://phpc.social/@phpc_tv/116274041642323081
Now that phpc.tv and phpc.social are part of the same umbrella, I've upped my yearly contributions to their Open Collective: https://opencollective.com/phpcommunity/projects/phpc-social
Merge branch 'xdebug_3_5'
Merged pull request #1070
I walked 7.2km in 1h10m26s
Fixed issue #2405: Handle minimum path in .xdebug directory discovery
I've published a new blog post: "Human Creations", on the difference in content generation by LLMs, and the creation of text, art and code by humans.
You can find it at https://derickrethans.nl/human-creations.html or at @blog
I walked 7.8km in 1h38m32s
RE: https://phpc.social/@afilina/116274024588235234
It's good to see that more and more people are realising that the Web can be for-good, without all the enshittification.
That's why I'm happy to see endeavours like phpc.tv springing up, and helping out where I can.
Taking back the control of how the Web is for people, by people, without big tech making it all shit.
Created a waste_basket; Updated 5 crossings and a bicycle_parking
I walked 10.7km in 2h35m10s


Shortlink
This article has a short URL available: https://drck.me/dpsp-2-4s2