HN user

nexneo

729 karma

[ my public key: https://keybase.io/nexneo; my proof: https://keybase.io/nexneo/sigs/sBLmfkeJfU4KQQQug0mjzkHpPjDaoW_LAAaLqbAa65Q ]

Posts44
Comments101
View on HN
niketpatel.com 4mo ago

Why Go Can't Try

nexneo
56pts72
www.remotelabor.ai 5mo ago

Measuring AI Automation of Remote Work

nexneo
1pts0
niketpatel.com 10mo ago

AI Has Agents but No Agency

nexneo
1pts0
www.youtube.com 2y ago

Uncle Bob on automating programming (2020)

nexneo
1pts4
blog.detectify.com 6y ago

Go 1.12 runtime can cause OOM (Out of memory) error

nexneo
1pts0
www.youtube.com 6y ago

Watch Live: Landing of Chandrayaan-2 on Moon's Lunar Surface

nexneo
1pts0
interestingengineering.com 7y ago

Google's Quantum Processor May Achieve Quantum Supremacy in Months

nexneo
2pts0
sourcegraph.com 11y ago

From a Ruby monolith to microservices in Go

nexneo
116pts89
sourcegraph.com 11y ago

Moving from a monolithic Ruby app to microservices in Go

nexneo
1pts0
michaelochurch.wordpress.com 11y ago

An Adventure in the Low Status of Software Engineers

nexneo
7pts1
simonallardice.com 12y ago

Getting Started, circa 1983

nexneo
2pts0
blog.jooq.org 12y ago

Arcane magic with the SQL MERGE

nexneo
1pts0
www.shopify.com 12y ago

Sarama, a client for Kafka 0.8 written in Go

nexneo
2pts0
blog.safariflow.com 12y ago

Go as an alternative to Node.js for Very Fast Servers

nexneo
7pts0
thenextweb.com 13y ago

Apple Put too Much Focus on Design with iOS 7

nexneo
3pts0
github.com 13y ago

Show HN: Command line Time tracking built using Go

nexneo
2pts1
boundary.com 13y ago

Comparing Go and Java

nexneo
6pts0
feepingcreature.github.com 13y ago

Why single-inheritance multiple-interfaces oop is the most beautiful thing

nexneo
1pts0
trac.webkit.org 13y ago

3.7X speedup from removing a call to sleep

nexneo
150pts67
memeburn.com 14y ago

It’s official: Chrome is the web’s most popular browser | memeburn

nexneo
1pts0
tech.dropbox.com 14y ago

Using the Dropbox API from Haskell

nexneo
2pts0
code.google.com 14y ago

Playn - Cross platform game library for N≥4 platforms - Google Project Hosting

nexneo
4pts0
blog.couchbase.com 14y ago

Reinforcing Couchbase’s Commitment to Open Source and CouchDB

nexneo
1pts0
blog.couchbase.com 14y ago

Intro to Couchbase Document Design | Couchbase Blog

nexneo
2pts0
atomictrevor.wordpress.com 14y ago

People Get Mad At Apple And Apple Keeps Making More Money Than Everyone Else

nexneo
7pts1
earthquake.usgs.gov 14y ago

Magnitude 5.8 - VIRGINIA

nexneo
1pts0
www.railway.at 15y ago

Inheritance, Pseudo Classes and Mixins Gone Awray | railway

nexneo
1pts1
www.pcmag.com 15y ago

Camera That Lets You Shoot Now, Focus Later

nexneo
2pts1
www.thestreet.com 15y ago

Biggest Threat to Apple: Google Chrome OS - TheStreet

nexneo
4pts1
www.aloha-editor.org 15y ago

Aloha Editor - HTML5 WYSIWYG Editor

nexneo
3pts0

You have to make all code threadsafe that execute from Job or you have to decouple Job code and App code.(which probably be required anyway because I'm not sure sidekiq supports old rubies)

So, in any case you have to rewrite as much as code that I rewrote in Go and decoupled from main App. (its not lot of code, I mentioned in talk)

wkhtmltopdf and phantomjs both worked similarly, currently I'm using phantomjs.

And I'm not splitting pdf but splitting html generation work load, and then create individual pdfs from those html chunks. Then they will be joined together (using pdfunite). I found this much faster then joining html and generating large pdf.

As fast as twilio can accept and process without throttling, beyond that its not much useful.

Unicorn forking benefit is overrated, we used it and we don't see much benefit for long running processes.

Sidekiq is good alternative but that means some rewrite(for our app anyway). Secondly Sidekiq looks mature today, I started working on some of these changes 2 years ago.

Thanks, you explained it very well.

Edit: Our requirement was to process this queue as fast as possible and that means more workers. With process based concurrency that is very costly as you have explained.

Our ruby application had memory problems and thats why it needed overhaul, but instead of changing architecture and rewriting same thing in Ruby I choose Go. Sure, rewriting made it better, doing it in Go made it lot better.

One of the thing I said in presentation was "This performance numbers look impressive but ignore them, by rewriting in Ruby could have improve them may be not huge margin but still they would have been better"

I choose Go not because language was better, and not only for performance.

Simple deployment was key point and deployment is not just about deploy and forget, there are entire companies founded around deploying and maintaining Ruby apps for you because it's not simple thing for tiny startup.

Exactly right any language could have worked, and we didn't replaced Ruby, just few part of our big application is rewritten.

I did in Go not because of language is better, ecosystem and culture is better but not language part. I will suggest you to do small real life project in Go.

You exactly captured my sentiment, when I started doing this I don't realized all benefits. Because of Go's simplicity in deploying and maintaining, many small apps doesn't add much overhead. Now you can scale individual component.

Only risk is, you break things into many component then you should so balance is required.

Exactly, Ruby app was monolith so it was consuming much more then this single feature would require. Now there is double benefit Go already uses lot less memory and its microservice. Plus with Ruby we have to run multiple processes so whatever memory single process consume * # of workers.

I could have rebuilt in Ruby and that was my first thought but deploying and maintaining Ruby apps are lot harder then you can imagine. I didn't like idea of maintaining lots of small ruby apps. Once you deploy single Go application, you might not want to deploy another Ruby app.

I agree that line bit confusing, Ruby app doesn't connect with Go service directly, every requests goes through balancer and then nginx router. Nginx routes then using simple location directive. Authentication is not shared, its either token based or Go service act as proxy and send request to Ruby app and modify response received from Ruby app before sending to client(i.e covering html to pdf)

After my talk many people voiced same concerned of overhead. But I don't see it that way, overhead is not much over simplicity and familiarity benefits.

JSON has advantage of human readability and for that tooling support is required which probably you will loose with RPC. For example I use many tools to inspect requests that won't support it with RPC

Exactly. (I implemented these services) - I don't see any reason of not using JSON-RPC but JSON over http is more simple for me.

At one place "form-urlencoded" is also used, so its not only JSON.