Better HN
topnewbestaskshowjobs
Log inSign up

adamonduty

27 karma · joined Dec 7, 2012 (13y ago) · 30 submissions

Submissions

comment 10y ago · link · parent

I went down a similar road in 2013 and contacted heroku via a support ticket. They said they "do not offer up [their] certs for verification" and wouldn't answer any other questions. Doesn't seem like much has changed :/

comment 11y ago · link · parent

What part of the battle couldn't you solve? Doesn't the author's setting of the resolver directive work for you, or is there something I'm missing?

Also, the author doesn't mention it, but you can also set a custom cache timeout with the valid=Xs option.

http://nginx.org/en/docs/http/ngx_http_core_module.html#reso...

comment 11y ago · link · parent

Another one - "prefect" should be "perfect".

comment 12y ago · link · parent

Rails works quite nicely as a REST backend. Its also much faster in my experience to render json than HTML templates. Rails is great as a general starting point, letting you choose SPA at the start or later.

comment 12y ago · link · parent

I wrote an app that has some GV-like functionality built on Twilio: https://www.getphonecard.net

comment 12y ago · link · parent

I've combined Postgres views and set returning functions in rails and had a lot of success with good performance and good maintainability, too. No custom SQL required in the application itself.

comment 12y ago · link · parent

I'm a little scared that this builds SQL statements directly. Did you consider at least using prepared statements? Was there such an awful performance hit using ActiveRecord, or something that couldn't be done with it?

comment 12y ago · link · parent

I wish I could add some comments while submitting the speed test. The wifi in my hotel is free, but the speed I'm receiving is only obtainable by using a code provided by the front desk. The normal speeds are quite a bit slower.

comment 12y ago · link · parent

Please email me your number at support@getphonecard.net and I'll manually fix it.

comment 12y ago · link · parent

PhoneCard probably didn't like your destination number (either invalid or deemed too much for the test call). If you (or anyone else) would like to give the real thing a spin in exchange for some feedback or ideas to make the app better, please email me at support@getphonecard.net and I'll give your account some free credit.

comment 12y ago · link · parent

Well, number purchases do work when you top up with credit first! :) The problem amounts to the app realizing you don't have any credit but not showing an error message. This is the top issue I'm working to fix.

FYI, pairing PhoneCard with Google Voice can require a few tries. I've had issues intermittently where Google Voice wouldn't ring for the verification call, and even then it didn't always forward to PhoneCard like it should. Then again, Google Voice often causes me to miss calls.

If anyone else has problems crop up, please email me at support@getphonecard.net.

comment 12y ago · link · parent

PhoneCard is entirely powered by Twilio.

comment 12y ago · link · parent

Actually it looks fairly similar! PhoneCard has multi-ring on incoming calls which I don't see there, but I didn't investigate deeply. How is the call quality?

comment 12y ago · link · parent

Oh, and SMS is quite a bit more limited at this time. You wouldn't be able to send SMS from Serbia to another country, or SMS within Serbia, but you could purchase a number in a destination country like the US or UK and send/receive SMS via the webapp.

comment 12y ago · link · parent

Awesome! I agree that I need to improve the cost discoverability. The problem is the matrix of rates is huge. In some countries, costs are different per mobile provider, and landlines are usually half the cost or less than mobiles. For example, calling Serbian landline to the US would be roughly $0.20 per minute. Serbian mobile to the US would be roughly $0.55 per minute. That all changes when you call somewhere else.

Of course many countries are not nearly so much. I also do plan to add voip calling within the app. This would allow you to skip the high cost of crossing Serbian boundaries when you're near a decent internet connection, but give you flexibility to make calls directly over the PSTN when needed.

comment 12y ago · link · parent

I just saw your call in the logs! It will work in Serbia, but I need to do some additional work on the backend to enable certain countries that are typically high cost to call. I had already done this, but apparently it wasn't complete.

For now, I've reset your trial call limit and it should work for you.

comment 12y ago · link · parent

Thank you for pointing me to this! To date I had not seen anything similar.

Perhaps the biggest differentiator is that PhoneCard works in the opposite direction, too. For example, you can purchase a phone number in the UK and have it forward to a US number. Also, PhoneCard calls you, while Ringo appears to make an outgoing call. In much of the world besides the US/Canada, incoming calls are free (even on a mobile/cell phone), so this means you pay for the call once instead of twice.

comment 12y ago · link · parent

Glad you like it! The service came out my own experiences trying communicate with friends or family across international boundaries. Skype and others are fine when they work, but when traveling, they often fall short. Poor or no data connections, flaky apps, or even just moving out of wifi coverage can really kill your conversation.

PhoneCard doesn't even require a smartphone, so you get that much more flexibility.

comment 12y ago · link · parent

I'm working on PhoneCard, a service to make cheap international phone calls without requiring a data connection. You enter the phone number in the webapp and it calls you.

Next time you're using poor hotel wifi or you're frustrated with skype (e.g. multiple disconnects per hour), try PhoneCard for a high-quality call.

PhoneCard can call most places in the world, and in some countries you can also purchase incoming numbers that will forward calls to you internationally.

Still very much a beta product, but check it out at https://www.getphonecard.net

Also working on an Android app which I hope to release soon.

comment 12y ago · link · parent

No revenue on my current side project, but haven't yet shared it beyond friends.

comment 13y ago · link · parent

Beyond Snowden, what is this "trend of whistleblowers"? Why haven't we seen others come out in similar ways? Or have I missed something?

comment 13y ago · link · parent

I'm hoping that Space Monkey (http://www.spacemonkey.com/) helps solve some of this. It backups up to a local appliance-style box, then syncs with other space monkey boxes in a peer to peer manner. Like cloud storage, but cheaper at $10/month for 1TB.

comment 13y ago · link · parent

> you can get the data in the shape you want, not in the shape it's stored.

If you build a database view, you can often trick an ORM into thinking its a table.

comment 13y ago · link · parent

Link to your stripe testing gem?

comment 13y ago · link · parent

So that someone between you and http://get.docker.io doesn't decide to replace the script with their own special version that runs as root on your box.

comment 13y ago · link · parent

Right, I agree with you. Its not that the strategy won't save any memory. But it won't save any memory allocations because the list still makes them. The number of allocations can put pressure on a garbage collector just as much as large allocations. Maybe even more with fragmentation and the like.

In C you explicitly choose stack vs heap allocation. In go, the runtime does this for you. I had a couple of situations where, after profiling, most of my CPU time was going to heap memory allocations. Using the strategy on slide 13 probably would have helped some to reduce the size of the allocation, but in my case only by a few bytes. Using a fixed-size slice that held references to objects made a big different in performance.

In regards to slide 13 it just seems funny to "recycle" memory by forcing a whole new allocate/deallocate cycle.

comment 13y ago · link · parent

So correct me if I'm wrong...

Slide 13 shows an example memory recycler. I understand the concept, but it uses a Go List to keep track of the elements. list.PushFront() allocates a new object on every invocation (see http://golang.org/src/pkg/container/list/list.go line 138) and list.Remove() creates garbage for the GC.

This doesn't seem like it saves much GC work.

A while back I wrote a "StackSlice" implementation to recycle memory which uses a statically allocated slice and pushes pointers to objects onto the stack. This is nice because pushes and pops don't involve any memory allocations.

comment 13y ago · link · parent

What about server security updates? How do you handle normal package updates, restarting services after an update, etc?

comment 13y ago · link · parent

For this very reason I patched a version of Rails 3.2.8 with the following patch files distributed by the ror-security mailing list[1]:

3-2-dynamic_finder_injection.patch 3-2-null_array_param.patch 3-2-xml_parsing.patch

The changelogs didn't cleanly apply but everything else did. In your Gemfile,

gem 'rails', :git => 'git://github.com/adamonduty/rails', :branch => '3.2.8_with_security_patches'

This will install version 3.2.8a. If you get a bundler error "NoMethodError: undefined method [] for nil:NilClass", try upgrading your rubygems-bundler gem to version 1.1.0.

See https://github.com/adamonduty/rails/tree/3.2.8_with_security... for the commits.

Given the number of changes and known issues in 3.2.9, I don't understand why the core team didn't perform a similar release.

[1] https://groups.google.com/forum/?fromgroups=#!topic/rubyonra...

comment 13y ago · link · parent

So I did some research about this in grad school.

I wrote a system that tried to push as many messages through a socket as possible, whether it was tcp, udp, unix domain, or posix message queue. The goal was to determine which IPC mechanism was best suited for highest concurrency rather than highest throughput, but I think the results are interesting for both.

I wanted to measure the amount of time it took to do the same amount of work (i.e. enqueue and dequeue one million items) for each IPC mechanism and how concurrency affected the performance. The system uses a single producer with a varying number of consumer processes.

The results are available for browsing here: http://queueable.herokuapp.com/

The stream socket implementations (tcp, unix domain stream socket) actually perform a minimum of two write()'s per queue item - once for the length and once for the actual content. Both of these are wrapped in loops to ensure the full content is written, so occasionally more than two write()'s might occur.

On one of the linux hosts, the TCP implementation can push 1 million messages through in roughly 0.66 seconds using a single producer thread, which corresponds pretty closely to the 2 million messages/second claim for NATS. The POSIX message queue can do it 0.48 seconds, which corresponds to more than 2 million messages/second, but POSIX messages queues are a datagram implementation that only require one mq_send() per message.

I think this shows that 2M syscalls/second is indeed possible. I made no special effort to optimize the C++ code. If you'd like to review the code or run the tests yourself, feel free to check out the code at https://github.com/adamonduty/queueable . Anyone can run the tests and submit results to view on the web interface.

Oh, and interestingly, the Macbook Pro I used to generate OS X results was the most recent hardware but among the slowest in wall-clock performance. OS X also shows a zig-zig effect as message size increases, similar to SunOS. Not sure why.