
Show HN: A/B Testing Backend Using AWS Lambda and Redis HyperLogLog - gingerlime
https://github.com/Alephbet/gimel
======
gingerlime
Very keen to get some feedback since it's the first time I'm using Lambda and
Redis HyperLogLog, and might have missed something.

It's still quite raw, but I hope it has good potential. I wrote a bit more
about the architecture, motivation etc on my blog[0]

[0] [http://blog.gingerlime.com/2016/a-scaleable-ab-testing-
backe...](http://blog.gingerlime.com/2016/a-scaleable-ab-testing-backend-
in-100-lines-of-code-and-for-free/)

~~~
_bpo
Looks like your blog is down at the moment

~~~
vhaenel
Yeah, it still seems down.

~~~
vhaenel
Correction, it says: Site not configured

~~~
gingerlime
that sounds like a webfaction error (where I host the blog), but it usually
happens when the domain name doesn't match what they know they're hosting...

Are you using https anywhere or some other type of plugin that might change
the URL or proxy your access somehow? (anything that might mess with the Host
header somehow).

EDIT: I think I have an idea (could be the webfaction cname + IPv6 - I'll look
into it...). Should work now! Sorry about that. Thanks for letting me know!

------
vhaenel
I personally like AWS Lambdas very much and am always looking for interesting
use-cases, like this one. I don't quite get what your code is supposed to do
yet, but I have some initial comments about the implementation, hope it's ok.

There are two things that glare at me immediately, a) the vendoring of the
redis code (including pyc files) and b) the need to define static credentials
in the code itself.

There are two little tools I would like to point your attention to, that may
ease this pain.

Here is a pybuilder plugin to make deploying lambdas much easier, it can
generate a lambda-zip for you (including all dependencies) and upload it to S3
so that you can use it in a CFN template:

[https://github.com/ImmobilienScout24/pybuilder_aws_plugin](https://github.com/ImmobilienScout24/pybuilder_aws_plugin)

The second is a tool to configure lambdas, by placing "things" (e.g. redis
creds) in the description field of the lambda. This way, you can speparate
code and configuration cleanly:

[https://github.com/ImmobilienScout24/aws-lambda-
configurer](https://github.com/ImmobilienScout24/aws-lambda-configurer)

~~~
gingerlime
Thanks a lot! I was looking for ways to separate configuration from code, but
couldn't find anything. Similarly "packaging" this so it's easy to share and
for other people to use, I couldn't really find any common solution. I'll take
a look at your suggestion! Much appreciated.

~~~
vhaenel
You are most welcome, our code is still really fresh so if you do hit any
snags we'd love to hear from you! Any and all feedback is welcome!

