News for hackers. Stuff that matters.
Re:Startup CTO – Premature Scaling by 1ba9115454 on Monday May 08, 2017 @08:36AM (#14290978)
If I see premature scaling it's usually at the database side of things. Inexperienced devs can be quick to dismiss a SQL database and go with something based on key value pair caching.

So I agree with the article keep it simple and easy to implement, worry about scaling later.

Re:Startup CTO – Premature Scaling by hashkb on Monday May 08, 2017 @10:01AM (#14291491)
A potential client told me he was planning on having three SQL databases. I asked him why, what each would be for, and he didn't really know. Just a vague sense that his app was going to be too much for a single db.
Re:Startup CTO – Premature Scaling by mkarliner on Monday May 08, 2017 @08:39AM (#14290997)
Yep. Not long ago I asked a dev why he had suddenly introduced Riak into the system.

'Because it's cool'

Oy.

Re:Startup CTO – Premature Scaling by mgkimsal on Monday May 08, 2017 @09:02AM (#14291107)
Similar experiences. Worked on a project, and a 'lead' guy left with .. a few weeks of a node/koa codebase in place that only he really knew. Between the rest of us we had loads of C#, PHP and Java experience (multiples years each over 3 people).

"Let's rebuild something based on what the bulk of us already know," I suggested. (Keep in mind what we had was a few weeks of prototype code that was not in production.)

"No, I really want to learn more node," was the only other input, and that 'won' the decision. 18 months later... "yeah, koa isn't really a goof fit for our use cases".

Re:Startup CTO – Premature Scaling by softawre on Monday May 08, 2017 @11:05AM (#14292110)
This is where as a tech manager you step in and push people the right way. Fun tech is fun, business is business.

C# is a great language, JVM is great w/ Kotlin/Clojure, both of those have tons of web servers.

Re:Startup CTO – Premature Scaling by cutler on Monday May 08, 2017 @06:48PM (#14296342)
Whilst the JVM may be established, ie. boring technology Kotlin and Clojure certainly aren't. It's now 8 years since Clojure 1.0 and there is a grand total of 15 Clojure jobs listed on Indeed.co.uk, 12 of which are in London. Kotlin boasts 2.
Re:Startup CTO – Premature Scaling by collyw on Monday May 08, 2017 @11:03AM (#14292095)
We have one of those guys on our team. He is friends with one of the founders so nothing he says seems to be wrong.
Re:Startup CTO – Premature Scaling by mgkimsal on Monday May 08, 2017 @11:11AM (#14292174)
edit: ack - should be "good" fit, not "goof" fit, obviously.

And yes, per another point in the replies, someone else should have stepped in to decide differently when there was a tie. I could possibly have pushed harder, but the 'bozo bit' basically was flipped on that project, and much of what I lobbied for was ignored, at least in part because I was the one saying it.

Re:Startup CTO – Premature Scaling by didip on Monday May 08, 2017 @11:52AM (#14292655)
If the LoC is low for that Koa project, you should rewrite it quickly using something that the team familiar with.

Otherwise, it will grow into a monster that nobody want to deal with.

Re:Startup CTO – Premature Scaling by mgkimsal on Monday May 08, 2017 @11:57AM (#14292710)
You'd think that, right? That was another part of my argument. And yes, it's ... not quite grown in to a monster, but few on the team really know how to deal with it. That actually came up a couple months ago - I heard a comment along the lines of "well, no one's really fully understood how to deal with that koa code since the beginning". Even the koa stuff, I think was done by someone who had used it a couple of times previously and liked it, but... no long term track record of using it in production.

So... about 2 years later, there's some traction from folks to rebuild it in something else. The latest shiny object is AWS lambda.

Re:Startup CTO – Premature Scaling by mkosmo on Monday May 08, 2017 @09:13AM (#14291161)
I've asked many devs why they chose Mongo over a RDBMS. They can never give me a technical answer. It's always 'it's cool' or because they just read something about it on some non-technical blog.

It usually only takes me a minute or two to ask them a future function question that's not reasonably attainable (and performant) with a NoSQL solution... so they wind up going back to whatever RDBMS is their standard.

Re:Startup CTO – Premature Scaling by dominotw on Monday May 08, 2017 @09:35AM (#14291305)
> It usually only takes me a minute or two to ask them a future function question that's not reasonably attainable (and performant) with a NoSQL solution.

Curious if you have an example of this.

Re:Startup CTO – Premature Scaling by xapata on Monday May 08, 2017 @11:10AM (#14292155)
Will you ever need to join X on Y?
Re:Startup CTO – Premature Scaling by SomeStupidPoint on Monday May 08, 2017 @01:03PM (#14293434)
And suddenly I have flashbacks to dev meetings where we were deciding if we should do joins in Python or denormalize our data across a dozen tables because we needed Cassandra, obviously.
Re:Startup CTO – Premature Scaling by erikpukinskis on Tuesday May 09, 2017 @02:24AM (#14298098)
The only reason I can think of is not wanting to deal with migrations when you are changing schemas all the time. As long as you can keep all of the previous schemas in your head and account for that in your code, you don't have to migrate anything.

It's not really a very nice way to go long term, but can be convenient when prototyping.

I think CouchDB had some real potential, but Mongo is like Couch without the interesting parts. Couch was like indexes on crack. You can make an index that does arbitrary transforms. Sad part was, it didn't have any smarts to pre-cache those "views" in an intelligent way, which to me would be the whole point of that endeavor. I think something like it will come back eventually, but it's still a very research-y idea.

Re:Startup CTO – Premature Scaling by HodGreeley on Tuesday May 09, 2017 @03:06PM (#14302950)
Biased opinion, but Couchbase is like CouchDB on crack. So, by extension... (Disclaimer: I work for Couchbase.)
Re:Startup CTO – Premature Scaling by erikpukinskis on Friday May 12, 2017 @11:21AM (#14324763)
Huh. I was starting to prototype some stuff with CouchDB when the transition was happening and when I looked at CouchBase it seemed like something important was being abandoned but now I can't recall what I thought that was. I'll look at it again.

As an aside, what I really wanted from CouchDB was that I could create a view and as I inserted new documents into the DB, CouchDB would automatically generate the new view documents so when I query the view, everything is already precached.

At the time I needed to implement a fire hose listener that would would sip inserts and decide which views with which parameters needed to get called, and then just hit them with REST to do the precaching. It seemed cumbersome, but it sort of made sense why it would be hard for the DB to know what queries on the view were implicated by a new document.

Has CouchBase improved the story there at all? To me that was always the killer promise of CouchDB... Storing documents in a format that made sense at creation time and having arbitrarily complex views on that data... without a cache hiccup. But that "without a cache hiccup" never seemed to quite materialize as a first class feature.

Re:Startup CTO – Premature Scaling by zzzcpan on Monday May 08, 2017 @09:24AM (#14291231)
I don't think I ever heard a good technical reason to use a traditional RDBMS. And as a default choice it is not a very good one, when something distributed can deliver an easy to maintain resilient solution pretty much out of the box.
Re:Startup CTO – Premature Scaling by SOLAR_FIELDS on Monday May 08, 2017 @09:45AM (#14291374)
I'm sure many can be produced, but the first off of the top of my head is accessibility for quasi-developers. If you ever want to hire some analyst roles you are going to find that it's a lot easier to get people that have at least some familiarity with SQL instead of having to train them on whatever custom NoSQL flavor you are using.

Of course you could solve that by having an ETL process dump your stuff into SQL (we keep our stuff in Cassandra and dump it into SQL for analysis), but that's another ETL you need to keep track of and in our case we use a quite complex data model and the ETL only supports a subset of it.

Another one just off the top of my head is joins. Some data is just inherently better suited in normal form.

[dead]
Re:Startup CTO – Premature Scaling by sctb on Monday May 08, 2017 @12:21PM (#14292997)
Please stop violating the guidelines like this.

https://news.ycombinator.com/newsguidelines.html

Re:Startup CTO – Premature Scaling by milquetoastaf on Monday May 08, 2017 @03:44PM (#14294897)
Can we add a rule that people don't post stupid bullshit that isn't true?
Re:Startup CTO – Premature Scaling by michaelmior on Monday May 08, 2017 @10:23AM (#14291680)
For a side project, that's a fairly reasonable answer. For a business, rather scary.
Re:Startup CTO – Premature Scaling by sbarre on Monday May 08, 2017 @09:27AM (#14291256)
Yup! MySQL + Redis (for query/object caching and queues) gets you the best of both worlds in a lot of scenarios, and is reasonably easy to set up and manage. And it will probably scale better than you expect at first!
Re:Startup CTO – Premature Scaling by zzzcpan on Monday May 08, 2017 @09:37AM (#14291320)
"MySQL + Redis"

I think this would be 10x more expensive to set up, manage, maintain and use than something like Riak.

Re:Startup CTO – Premature Scaling by Posibyte on Monday May 08, 2017 @10:57AM (#14292023)
Can you explain why you think that? I would imagine using two rather popular systems in a somewhat common combination would be a boon to maintainability and set up, if at least for the large pool of developers and online resources already available for it.

But then again, I could be super mistaken. I'm interested in seeing another side of it.

Re:Startup CTO – Premature Scaling by sbarre on Monday May 08, 2017 @02:05PM (#14294035)
This was also my thought when I made the comment...

I am sure that for certain use cases, there are more tailored solutions, but "SQL + keystore" seems like a fairly universal, affordable and versatile stack.

Re:Startup CTO – Premature Scaling by user5994461 on Monday May 08, 2017 @06:09PM (#14296097)
They are different databases. Riak is a key value store, not unlike the core of redis. The SQL database is obviously relational.

Ignoring the difference for a minute. If you can fit data in Redis, chances are that they can fit in riak and a RDBMS is not needed at all.

Why Riak only then?

It is one of the very few databases that can be clustered. It is sharded, multi-master, highly available, to talk in buzzwords. It is very reliable and very robust, you can add/remove nodes as you wish, replication is highly configurable, etc...

Postgre/Mysql/MariaDB + Redis have no HA. They are both the disaster in disaster recovery.

Re:Startup CTO – Premature Scaling by aries1980 on Tuesday May 09, 2017 @09:47AM (#14299923)
If you want SQL and proper master-master replication, check Couchbase.
Re:Startup CTO – Premature Scaling by libertymcateer on Monday May 08, 2017 @09:47AM (#14291386)
I am using postgres and redis - they are both trivial to set up and cost about a few lattes a month for a fairly scalable solution. If I had huge traffic, a few hundred bucks a month would be totally adequate - and this is running on the too-expensive heroku. So, unless Riak costs pennies and takes literal minutes to set up, the 10x claim won't hold.

Riak looks like it would be overpowered by my needs - but then again, I learn something new every day.

Re:Startup CTO – Premature Scaling by awinder on Monday May 08, 2017 @09:33AM (#14291294)
I always see this discussion cast as one between scalability (KV) and dev efficiency (SQL), but other reasons to adopt columnar databases include:

1. Difficulty in transitioning a system with SQL-Gone-Wild to a system that can be implemented with other dbs without complexity overdrive 2. Escalating costs to get any additional availability guarantees out of SQL (availability & cost are key business issues)

In AWS & Google Cloud, you're going to need to pay outright for capacity as well as capacity devoted db recovery (a replica / set of replicas in another availability zone). On the other side with something like dynamo / cloud datastore, your payment model is based on requests / sec and the costs for replicated data. I'm just saying that there's nothing simple to deciding where price / availability / dev productivity balances will lead you to, and you can be an inexperienced developer who chooses either side of these technologies without really understanding the full story.

Re:Startup CTO – Premature Scaling by balls187 on Monday May 08, 2017 @01:29PM (#14293681)
> Inexperienced devs can be quick to dismiss a SQL...So I agree with the article keep it simple and easy to implement

If you're inexperienced with relational databases, perhaps a Key-value store with a simple API is much simpler and easier to implement.