27 karma · joined Dec 7, 2012 (13y ago) · 30 submissions
comment 11y ago · link · parent
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 12y ago · link · parent
comment 12y ago · link · parent
comment 12y ago · link · parent
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
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
For now, I've reset your trial call limit and it should work for you.
comment 12y ago · link · parent
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
PhoneCard doesn't even require a smartphone, so you get that much more flexibility.
comment 12y ago · link · parent
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 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
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
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
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
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.