HNHacker News
TopNewBestAskShowJobs

bradrydzewski

397 karma · joined February 26, 2010

submissionscomments
bradrydzewski··on Drone is a Continuous Integration platform built on Docker
Bitbucket integration should land this week. We open sourced our Go Bitbucket API which was the first step: https://github.com/drone/go-bitbucket

There is also a thread going for adding other sources: https://github.com/drone/drone/issues/10

It took about 24 hours for a GitHub enterprise patch to land, so I'm sure we'll support many other options pretty quickly.

bradrydzewski··on Drone is a Continuous Integration platform built on Docker
we bought the drone.io domain name back before Drones were all over the news. We thought this definition of Drone, "a unit which takes commands from a primary source" made sense for a cloud-based CI solution.
bradrydzewski··on Drone and Docker, Open Source CI
yes! there is a CLI that let's your run your builds locally, on your laptop. Navigate to the root directory of your repository and run `drone -v build .`

you need Docker installed and the .drone.yml file in the root. it's a great way to test locally without having to push to the CI server. As an added bonus, you could even setup a pre-commit hook

bradrydzewski··on Drone and Docker, Open Source CI
The workflow is pretty basic right now, however, we plan on adding matrix and parallel builds in the near future. Could you elaborate a bit more on your workflow? I definitely want to make sure Drone supports more than just simple use cases.
bradrydzewski··on Drone and Docker, Open Source CI
The open source edition is meant for teams that want to run CI on their own trusted infrastructure.

That being said, we are definitely making a long term bet on Docker and containers, and are confident security will improve over time.

bradrydzewski··on Drone and Docker, Open Source CI
Thanks! We posted our go-bitbucket api today as well. https://github.com/drone/go-bitbucket

The Bitbucket patch should land next week

bradrydzewski··on Writing HTTP Middleware in Go
We created a custom implementation of an io.ReadCloser that allowed us to wrap the http.Handler's io.ReadCloser and attach context to the request: https://github.com/bradrydzewski/routes/blob/master/exp/cont...

It avoids the global lock and we haven't found any compatibility issues.

bradrydzewski··on Docker joins the Linux Foundation
Have you considered using OverlayFS in a future version of Docker, instead of AUFS? It comes bundled with Ubuntu 12.04 and higher, and my understanding is that it could possibly get merged w/ kernel 3.10
bradrydzewski··on Web Framework Benchmarks
Ok, so I added a third benchmark where the handler gets and item from memcache (NOT from a database). Here are the results:

  PASS
  Benchmark_Routes             10000	    234063 ns/op
  Benchmark_Pat                10000	    233162 ns/op
  Benchmark_GorillaHandler      5000	    265943 ns/op
  Benchmark_Webgo               5000	    348349 ns/op
  ok  	github.com/bradrydzewski/routes/bench	10.062s
Notice the top 3 frameworks (pat, routes and Gorialla) have almost identical performance results. The point being is that routing and string manipulation are relatively inexpensive when compared to even the most lightweight TCP request, in this case to the memcache server.
bradrydzewski··on Web Framework Benchmarks
I used Go's benchmarking tool to compare raw routing performance of various frameworks. The handlers all return a simple "Hello World" string. Here are the results:

  PASS
  Benchmark_Routes           100000	     13945 ns/op
  Benchmark_Pat              500000	      6068 ns/op
  Benchmark_GorillaHandler   200000	     11042 ns/op
  Benchmark_Webgo            100000	     26350 ns/op
  ok  	github.com/bradrydzewski/routes/bench	12.605s
I then ran the same benchmark, but this time I modified the handler to serialize a struct to JSON and write to the response. Here are the results:

  Benchmark_Routes              100000	     21446 ns/op
  Benchmark_Pat                 100000	     14130 ns/op
  Benchmark_GorillaHandler      100000	     17735 ns/op
  Benchmark_Webgo                50000	     33726 ns/op
  ok  	github.com/bradrydzewski/routes/bench	9.805s
In the first test, Pat is almost twice as a fast as the Gorilla framework. In the second test, when we added a bit more logic to the handler (marshaling a struct to JSON), Pat was only about 18% faster than Gorilla. In fact, it turns out it takes longer to serialize to JSON (8000ns) than it does for Pat to route and serve the request (6000ns).

Now, imagine I created a third benchmark that did something more complex, like executing a database query and serving the results using the html/template package. There would be a negligible difference in performance across frameworks because routing is not going to be your bottleneck.

I would personally choose my framework not just based on performance, but also based on productivity. One that can help me write code that is easier to test and easier to maintain in the long run.

bradrydzewski··on Docker - the Linux container runtime
This is still technically a virtualization technique, known as "operating system-level virtualization". http://en.wikipedia.org/wiki/Operating_system-level_virtuali...

Here are some of the technologies explained:

cgroups: Linux kernel feature that allows resource limiting and metering, as well as process isolation. The process isolation, also called namespaces, is important because it prevents a process from seeing or terminating other running processes.

lxc: this is a utility that glues together cgroups and chroots to provide virtualization. It helps you easily setup a guest OS by downloading your favorite distro and unpacking it (kind of like debootstrap). It can then "boot" the guest OS by starting it's "init" process. The init process runs in its own namespace, inside a chroot. This is why they call LXC a chroot on steroids. It does everything that chroot does, with full process isolation and metering.

aufs: this is sometimes called a "stacked" file system. It allows you to mount one file system on top of another. Why is this important? Because if you are managing a large number of virtual machines, each one with 1GB+ OS, it uses a lot of disk space. Also, the slowest part of creating a new container is copying the distro (can take up to 30 seconds). Using something like AUFS gives you much better performance.

So what about security? Well, like every (relatively) new technology LXC has its issues. If you use Ubuntu 12.04 they provide a set of Apparmor scripts to mitigate known security risks (like disabling reboot or shutdown commands inside containers, and write access to the /sys filesystem).

bradrydzewski··on Ask HN: What's the golang web framework with the most momentum?
I put together an experimental package based on express: https://github.com/drone/routes/tree/master/exp
bradrydzewski··on Ask HN: What's the golang web framework with the most momentum?
I'd like to add a few more options. First there is pat, by the Heroku / the guy that created Sinatra: https://github.com/bmizerany/pat

if you need simple routing and REST url parameters this is a great library to use. I've found it outperforms many of the other routing libraries. The best part is that it (mostly) uses the standard net.http library and you don't need to code against custom APIs.

there is also Gorilla Web Toolkit: http://www.gorillatoolkit.org/

this library has been around for a couple years, and is often recommended on the Go mailing list. It recently switched from Google Code to Github, so it doesn't have as many stars as the others. It provides routing, secure cookies, sessions, and more.

I personally would start with Gorilla or Pat, because they are very thin layers on top of the standard net.http library with little abstraction ... in many cases the standard library works great. If you end up needing a higher level framework you can always switch to something like Revel.

bradrydzewski··on Everlane Closed on Black Friday
I like that when you "view source" they have their logo in ascii art with the following "work at everlane - bmFuQGV2ZXJsYW5lLmNvbQ==" ... if you base64 decode the string you get someone's email address
bradrydzewski··on Ask HN: Review my startup, drone.io
are you using GAE for java, python or go?
bradrydzewski··on Ask HN: Review my startup, drone.io
Check back next week, we should have basic AppEngine integration available. We use appengine ourselves (although not for drone.io), so it is high priority for us too
bradrydzewski··on Ask HN: Review my startup, drone.io
I think your feedback on the pricing page is great, and we'll definitely be making some quick changes to the design later today.

Regarding the Signup screens, I personally appreciate when websites use OpenID or OAuth so that I can use an existing account instead of creating a new username / password. That is why we chose to use Github and Google, and we hope to support more providers in the future (such as Bitbucket). I'd be interested to hear your thoughts.

bradrydzewski··on Ask HN: Who are the best icon designers?
Check out http://yellowicon.com/

The design company is run by Everaldo, the creator of the Crystal Project http://www.everaldo.com/

His icon sets have been some of the highest rated and most downloaded at kde-look.org for years now

If you are not familiar with kde-look.org, check it out. There are hundreds of very impressive icon sets you can download for free. Many are released under LGPL and can be used in commercial software

bradrydzewski··on Ask HN: "Basic SEO"?
SEO can be expensive and time consuming, and a single update to Google's algorithm can send you back to the drawing board.

My advice: take all of the time and money and, instead of SEO, focus on making your product great or creating great site content.

If you have a site worth visiting, the quality linking and SEO will eventually take care of itself. People will blog about your site and link to it without you having to do anything other than being the best at what you do.

← PreviousPage 3 of 3