Every packet from Apple is forwarded to 188.8.131.52, which then sends back exactly what data to send to Apple (along with extra packets that I presume tell the client what's happening so it can update its UI). Likewise, if the client wants to send a message, it first talks to the third-party server, which returns what needs to be sent to Apple. The data is re-encrypted as part of this process, but its size is deterministically unaffected.
Clearly, this is suboptimal from a security perspective. Is this the kind of thing that Google gets involved in? ( : I'm legitimately curious about that.) The developer is even responding to reviews about login issues asking only for user's Apple IDs, which makes it sound like even the authentication must be under his direct control (where it can be logged and debugged given only the username). Arguably, though, the app does do what it claims to do ;P.
Update: pointed out that jmeter might not be fast enough to benchmark my Go web API and I should have used wrk. I tried as per his suggestions and he's right, I'm getting a much higher throughput. I originally reported a 10X improvement, it really was a 50X improvement.
4 threads and 20 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 5.88ms 8.41ms 36.76ms 78.48%
Req/Sec 0.99k 97.22 1.00k 99.05%
93852 requests in 20.00s, 19.15MB read
I've always liked #Golang and I'm impressed by how much/fast the Go core team keep on improving the language, implementation, and documentation. Things are much easier now in Goland.
With version 1.1 and 1.1.1 being released I wanted to see how easy it would be to start using Go in my daily workflow. By that I mean that until now, I only "played" with Go, I wrote a few small apps for fun but no nothing mission critical.
My goal was to write 2 web json APIs, one using Rails and a port in Go. The API would be simple and do a few things:
* extract the Authentication header from the request
* verify it against the DB (mysql)
* and render a json representation of the user object.
The Rails app was written in no time but the Go one took a bit longer. I chose to use the Revel framework since I like Play (Scala framework) and Revel is a port. Unfortunately that was a mistake. The lack of documentation, the odd features and the lack of simple cross platform deployment made me give up the framework approach. To be honest, I should add that (easily) convinced me that I should keep it simple and just stick to pure Go. (discussion over on #shitfire (freenode).
Rewriting the few things and conventions I like took me less than an hour or so, I ended up using 's Pat package (Sinatra like pattern muxer https://github.com/bmizerany/pat ).
My code is simpler, more flexible and easily cross compiles.
The next step was to benchmark the 2 APIs under load. I knew that Go was going to be considerably faster and I knew that benchmarking on my own machine wouldn't yield scientific results. That said, I fired up jmeter and run 20 threads/users making 1000 queries and looked at the results.
Go web API:
Memory usage: 10MBs
Rails (Rails 4, Ruby 2.0, production mode, puma web server):
Max: 178,552ms (442ms most of the time but big spike around 15,000 requests)
Throughput: 88.9 requests/s
Memory usage: 117MBs
(server was warmed up and the benchmarks were run multiple times, delta stayed within 5 ms)
The numbers in themselves aren't that important. Running the same benchmark on a linux machine and on AWS will obviously yield slightly different numbers. What's interested in that the performance difference between Go and Ruby in this specific use case is 10X.
10X is a LOT. There is no way I could tweak the Ruby code to get close to the Go numbers. For many use cases, it wouldn't matter, but if performance is important, then choosing Go might make a lot of sense. Note also that the response time is more than 10X faster with Go.
Finally, here are more scientific and detailed comparison benchmarks (Rails, Sinatra, Revel, JRuby etc..): http://www.techempower.com/benchmarks/#section=data-r5&p=3q
- 2359 MediaSoftware Engineer, 2011 - present
- CartomapiciOS Apps Developer, 2010 - 2011
- barabluSoftware Developer, 2006 - 2008
- Institut Teknologi BandungComputer and Control Systems, 2002 - 2006
43B Tanjong Pagar Road
PandoMonthly San Francisco with GitHub CEO Tom Preston-Werner, the full ...
GitHub CEO Tom Preston-Werner took the stage for our latest PandoMonthly San Francisco event on Thursday, where he talked about his Midweste
How To Create a Simple Magazine App with Core Text | Ray Wenderlich
This is a blog post by iOS Tutorial Team member Marin Todorov, a software developer with 12+ years of experience, an independant iOS develop
Dangerous Minds | CAPTCHAs to keep idiots out of comment threads
Check it out! It’s like a CAPTCHA IQ test. If Fox Nation implemented something like this, they’d have zero commenters (unless, of cours
ruby on rails - How to change values overriding the 'to_json' method? - ...
up vote 1 down vote favorite. I am using Ruby on Rails 3 and I would like to override the to_json method. At this time I use the following c
ruby on rails - Override as_json or to_json model class name - Stack Ove...
up vote 0 down vote favorite. I'd like to modify the classname when calling to_json on an AR model. ie. Book.first.to_json #=> "
json - Override to_json in Rails 2.3.5 - Stack Overflow
Update: This issue was not properly explored. The real issue lies within render :json . The first code paste in the original question will y
That Didn't Take Long: Spotify Sued For Patent Infringement Just Weeks A...
Hello Spotify. Welcome to America, where if you do anything even remotely innovative, you get sued for patent infringement. Indeed, just a
Saving John Siracusa’s massive Lion review to Instapaper – Marco.org
Marco.org. I'm Marco Arment: creator of Instapaper, amateur tech writer, and coffee enthusiast. About • Twitter • RSS Some of my favorit
John Siracusa Reviews OS X 10.7 Lion – The Review To End All Reviews | J...
John Siracusa Reviews OS X 10.7 Lion – The Review To End All Reviews. 10.7, Ars Technica, Epic, John Siracusa, Lion, OS X, Review. John Sira