Deathowl’s Nest

Some words of programming and more.

about me

I’m an Infrastructure Engineer working at Ustream Inc.

I love to code, open source, good music, beer , and my bass guitar

And by the way this is me below:

For more check out this page and my references

recent public projects

Status updating…

found on

contact at

deathowlzz@deathowlsnest.com

Ustream Hackathon Recap

- - posted in Hacks., IT,, Ustream,

There was a the first ever Hackathon held at Ustream a good month ago, this is just a short summary about my experiences, and how fun it was.

Long story short, i led a team named Call of Duty and we reached the 4. place out of 12 teams, so it was a pretty decent achievment, i’ve got to say.

The story of the Hackathon, you have an idea, you collect your team, and you get one day to make a working protoype based on your idea. We wrote an alerting and incident escalation application, much like Pagerduty, and it is free, so the name DutyFree was absolutely trivial.

Soon you’ll find the source code on Ustream’s github account, we just got to clean it up a little. Here is a good photo taken at 4 a.m of the team.

PHPMeetup BP -Errbit Talk

- - posted in IT,, Talks

Előadtam 2014.03.25. este a Balabitnél tartott PHP Meetupon a hibákról, Airbrake.io-ról, Errbitről, és arról, hogy a Ustreamnél mit csinálunk a hibáinkkal.. Aki lemaradt, és átélné az élményt, ahogy prezentálok, az most megteheti. Recorded:


Video streaming by Ustream

A prezentációm:

Bye Wordpress and Byethost , Hello Octopress and DigitalOcean

- - posted in IT

So after 4 years i decided to move from Byethost(i also deleted my EC2 instance at the same time btw.) to Digital Ocean. I also decided to give up wordpress and give Octopress a try. It was easy to set up, and finally i have a nice static super fast blog set up. I was getting tired of having a box on EC2 to do stuff, and have another one to host my blog, now it’s all in one place and feels much better. And thanks for DigitalOcean for their awesome pricing, which is more than affordable.YAY.

Errbit(Airbrake) vs Non Blocking Error Reporting

- - posted in IT

Errbit and it’s hosted counterpart Airbrake are great tools to capture and track your Application’s Exceptions. The only problem is, the interface they provide is a restful API in which one you can post errors in a nice XML format. The only problem with this is http, or if I go deeper tcp. If your app has  a really bad time , and gets flooded with exceptions (for example in case of cascading errors  eg.: a database outage) your application could get into serious locks if you try to send all the exceptions directly. Yes of course you could use a queue to store exceptions, and process them asynchronously, or you could just do the whole thing via udp.

That’s why i started to hack on my pet project, really creatively named “Err-proxy” , which one is really an error proxy listening on UDP for error messages and forwarding them on the regular HTTP way to the Airbrake or Errbit server. It’s written in node.js (Yes, I’m coding in node, no thank you ,I feel all fine, it’s just the right tool for the problem), and inspired by statsd a lot. It’ll be in working state in a few days, and i’ll share the github repo here(It’s a private repository at the moment). Here it is: https://github.com/ustream/Errbit-proxy

Monitorama.eu 2013 Berlin

- - posted in IT

So Monitorama.eu (my first ever Monitorama) just ended and i just can’t describe how cool it was.

BTW Berlin is a really wonderful and amazing city. You’ve gotta love the vibrant scene there, with lots of historical parts worth to mention.

So the talks, and the people i met on the first day were cool, but the workshops on the second day. Man, i mean really, it was the icing on the cake.

Collectd, Riemann, Dashing, Graphite scaling, and last but not least a little about Descartes. But my favourite one was the talk of Abe Stanway about Kale. My mind just blew up with the ideas how many things become possible and less sucky with an automated anomaly detection system.  But i liked the Dashing talk also as much as this one, so i can’t decide. I’ve got a love about pretty dashboards and automation, get over it.

It was good to be there, i really would like to come next year also .

Ludum Dare 27

- - posted in IT

I participate on  a 48 h Game Development competition, and i’ll be streaming it live.

i came up with this : BeatTheBeat, i’ll opensource it , once i have the time to make the code cleaner

Team Dashboards: Unicorn vs Thin

- - posted in Rails

There is a great project called Team Dashboards by Frederik Dietz ,and i’ve been experimenting with it a little. Team Dashboards uses Thin as its webserver of choice, but thin with one worker is way too slow for my taste for this project.

I wanted to test how Unicorn performs with one single worker . Just a little tinkering with the Gemfile thanks to the unicorn-rails gem and i was ready to go.

Performance test have been run on my MBP .

Performance with Thin, one worker process:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
deathowl:~/ (master✗) $ ab -n 100 -c 10 -r [http://127.0.0.1:3000/](http://127.0.0.1:3000/) [20:57:12]
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, [http://www.zeustech.net/](http://www.zeustech.net/)
Licensed to The Apache Software Foundation, [http://www.apache.org/](http://www.apache.org/)

Benchmarking 127.0.0.1 (be patient)...Send request failed!
Send request failed!
..done

Server Software: thin
Server Hostname: 127.0.0.1
Server Port: 3000

Document Path: /
Document Length: 31424 bytes

Concurrency Level: 10
Time taken for tests: 131.099 seconds
Complete requests: 100
Failed requests: 3
(Connect: 0, Receive: 1, Length: 2, Exceptions: 0)
Write errors: 2
Total transferred: 3176786 bytes
HTML transferred: 3118586 bytes
Requests per second: 0.76 [#/sec](https://github.com/fdietz/team_dashboard/pull/mean)
Time per request: 13109.925 [ms](https://github.com/fdietz/team_dashboard/pull/mean)
Time per request: 1310.993 [ms](https://github.com/fdietz/team_dashboard/pull/mean,%20across%20all%20concurrent%20requests)
Transfer rate: 23.66 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 10123 4009.8 11487 19334
Processing: 0 2586 1574.8 2583 5405
Waiting: 0 351 1171.7 0 4302
Total: 1439 12709 3625.7 13546 19334

Percentage of the requests served within a certain time (ms)
50% 13546
66% 14208
75% 15166
80% 15306
90% 16129
95% 17240
98% 17916
99% 19334
100% 19334 (longest request)

Performance results with Unicorn ( one worker process)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
deathowl:~/ (master✗) $ ab -n 100 -c 10 -r http://127.0.0.1:3000/ [20:56:50]
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)...Send request failed!
Send request failed!
Send request failed!
Send request failed!
Send request failed!
Send request failed!
..done
Server Software:
Server Hostname: 127.0.0.1
Server Port: 3000

Document Path: /
Document Length: 31424 bytes

Concurrency Level: 10
Time taken for tests: 10.020 seconds
Complete requests: 100
Failed requests: 5
(Connect: 0, Receive: 1, Length: 4, Exceptions: 0)
Write errors: 6
Total transferred: 3051028 bytes
HTML transferred: 2992424 bytes
Requests per second: 9.98 [#/sec] (mean)
Time per request: 1002.014 [ms] (mean)
Time per request: 100.201 [ms] (mean, across all concurrent requests)
Transfer rate: 297.35 [Kbytes/sec] received

Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 854 272.7 887 2116
Processing: 0 114 469.4 0 2116
Waiting: 0 116 469.1 0 2115
Total: 466 968 313.7 890 2116

Percentage of the requests served within a certain time (ms)
50% 890
66% 910
75% 917
80% 933
90% 1110
95% 2116
98% 2116
99% 2116
100% 2116 (longest request)

As you can see Unicorn performed in this case a lot better than Thin.

SOAP Attachments vs PHP 5 SoapClient

- - posted in IT, PHP

The title says it all. This post is about how PHP5 SoapClient behaves when there is an attachment in the SOAP response.

The scenario:

You request some data from an API, the result set is too large to be sent over SOAP, so the server  sends you a simple valid XML response containing “Return result is too large, Please get your result from attachement”,and the resultset as a CSV document attached  to the response. This makes sense.

The only problem is the default SoapClient in PHP can’t handle this kind of situations. The only thing you get is a SoapException with the following message : looks like we got no XML document.

Why?

Because PHP tries to parse the entire response. and we must face it :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <the content id>

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Body>

RESPONSE GOES HERE

</soapenv:Body>

</soapenv:Envelope>

Content-Type: text/plain
Content-Transfer-Encoding: binary
Content-Id: <The second content id>

our pretty huge amount of data in CSV format....

is not a valid XML response at all.

Conclusions:

This is it, if you are facing a problem like this think of this before you panic. Try another Soap library for PHP, there are plenty of them.