
Developer Preview: RethinkDB Now Available for Windows - coffeemug
http://rethinkdb.com/blog/rethinkdb-windows-preview/
======
zenlikethat
Congratualations to the RethinkDB team on this! I'm sure it was no small feat
to get RethinkDB running on Windows and between this and the Jepsen results,
they are clearly doing very well right now.

~~~
hardwaresofton
The only problem seems to still be name recognition, though I assume that will
come with time.

Not enough people know that Rethink exists, and is a fantastic choice for
those looking to use a document store in their architectures.

~~~
ssmoot
Just my take:

I really don't like RQL. Why couldn't it just be a document flavored SQL?
Having a DSL for writing in-database procedures is fine. But tying all
external queries to a Builder is, from a purely aesthetic POV, pretty ugly
IMO.

But that can be addressed down the line I'm sure. If nothing else by other
people just building new DSLs on top of the Builder interfaces.

(Note: Yes, I realize the Builder supports map/reduce as well. In practice I'm
skeptical how well that works in an on-demand fashion.)

Having only one fully-managed host available is a minor negative. Though we
use Cloudant right now so that's a bit hypocritical perhaps.

Lack of integrated full-text search makes things (application-side) a lot more
complex than Cloudant or a traditional RDBMS with integrated full-text search.
Maybe not in a "look what I can do" prototype-ish phase, but definitely in a
"what would Jepsen do to my system" sort of scenario (see the "Warning" here:
[https://www.rethinkdb.com/docs/elasticsearch/](https://www.rethinkdb.com/docs/elasticsearch/)).

That means you're going to want to routinely compare and reindex. Which ugh.

That's just my 2c on why I'm not super excited about RethinkDB. Doesn't seem a
whole lot to differentiate it from other NoSQL databases outside of being a
better MongoDB. It doesn't integrate full-text-search like Cloudant. It
doesn't have transactions. It's got this streaming thing. Which seems like a
pretty niche feature. But maybe that's just me.

It is free though, so that's definitely something. If I were a cash-strapped
startup that might be enough to move it near the top of my list. OTOH if I'm
paying for a fully managed, hosted service that matters a whole lot less.

Feel free to educate me. :-)

~~~
hardwaresofton
I've said a lot on the subject, but for me the top benefits that come to mind
are:

\- Built to be distrubted (sharding and replication are super ez to use)

\- Easy to use admin interface comes built in

\- RQL (which is a minus for you, as you noted)

\- Joins

\- Streaming (you're right, but I think this niche grows bigger by the day)

\- Functional chaining interface, with lots of nice utility functions

\- Geospatial commands (this is oft overlooked, and another really awesome
thing it does, check out
[http://rethinkdb.com/api/javascript/#circle](http://rethinkdb.com/api/javascript/#circle))

If I were to summarize your points:

\- RQL is not that compelling, DSL is preferable

\- No full text search

\- No transactions

(please correct if I've missed anything)

The DSL problem is probably relatively straightforwardly fixed (just write a
DSL that translates to builder calls), but I think that RQL sprung up from a
disdain of DSLs that were built by mongo (and probably in some part SQL), that
often become overly complicated, hard to use, and sometimes use obtuse/hard-
to-remember terminology.

The other missing-add-on points are valid of course, but they're just about as
equally valid for any document store you can find. I don't speak for
RethinkDB, but as far as I can see they do not claim to offer those things, so
I don't know if it should be held against them that they don't. Of course, it
makes sense that you're not super excited for it because of those missing
features you want.

However, I think you'd be hardpressed to find another document store that has
gotten the rest of the things it does as right as RDB has gotten them. RDB has
iterated their way to a really high quality document store, yet (I find) does
not get the press to match how well it performs (and how many big pitfalls it
avoided).

~~~
rdslw
> However, I think you'd be hardpressed to find another document store that
> [...]

CouchDB. Older by 6 yrs, so probably can't compete with RethinkDB on wow-yet-
another-new-fresh-backed-tool-with-fancy-webpage-and-admin-ui scale ;)

In everthing else couchdb has more features than rethinkDB. And is much more
mature, but somehow this word is understood backwards these days. Technology
ageism I suppose ;)

p.s. I'm not couchdb dev/supporter etc.

~~~
ssmoot
CouchDB doesn't do joins, which can impose serious schema design changes
depending on your application. map/reduce is done at index time. You wouldn't
ever want to do it on the fly.

The base CouchDB also wasn't clustered last I looked (a year ago maybe?); you
had to use BigCouch, which was an OSS contribution by Cloudant that lagged
both Cloudant's own offering and CouchDB releases. It was supposed to get
merged into head though so there's a good chance that actually happened while
I wasn't looking.

If you're just looking at CouchDB though and not Cloudant, it's not all that
compelling (IMO). No clustering. No integrated search. No transactions. No
joins. Pretty shallow server metrics in the dashboard. CouchDB doesn't even
really have queries AFAIK. Just index scans.

------
talles
Not in love with MongoDB, DocumentDB is Azure only. Finally a (great) document
database option for me (I work in a .NET shop). Kudos to you guys.

But... but... what's with that C# API? It doesn't look like typical C# at all.

~~~
coffeemug
Slava @ RethinkDB here.

You might want to look at [https://github.com/mfenniak/rethinkdb-
net](https://github.com/mfenniak/rethinkdb-net) (this is an alternative C#
driver with a different API). We'd love to get an official C# driver in soon,
so if the community has suggestions on how to improve the API (and which
driver feels more idiomatic), we're all ears!

~~~
talles
From a quick glance, this one you just posted feels way more idiomatic than
the Java port.

The ultimate idiomatic thing to do would be to expose rethink as an
IQueryable<T>, but implementing it can get hard/tricky.

[https://msdn.microsoft.com/library/System.Linq.IQueryable](https://msdn.microsoft.com/library/System.Linq.IQueryable)

~~~
skrebbel
That would be amazing, but potentially also misleading.

My 2 cents for Slava & co: The idea of IQueryable<T> is that it implements all
LINQ "operators" (a weird LINQ term; they're just methods on an interface)
just like IEnumerable<T> does it on in-memory data structures. But internally
IQueryable<T> implementations typically build an SQL query instead.

So IQueryable<T> is designed for a use case somewhere halfway between an SQL
query builder and an ORM.

I don't know ReQL well enough, so you'll have to assess this yourselves: If
you can map all or most LINQ operators into ReQL, then you _have to_ do the
effort and implement IQueryable, it's too awesome an opportunity to let go.

But if the match is only, say, 50%, plus there's a couple of things Rethink
can do that isn't easy to express with LINQ, I'd _strongly recommend_ not
implementing it at all, but designing your own, C#-flavored, query interface
that just _resembles_ the LINQ operators wherever possible (e.g. use "Where"
instead of "filter").

Thing is, developers expect that anything they do on an IQueryable is
transformed into a single gigantic query and optimized and executed once, on
the database. Maybe Rethink can't guarantee the same performance
characteristics, simply because it's no relational SQL-ish database. It would
have to implement certain parts of IQueryable in client-side memory just to be
compatible. Do that, and you'll end up fooling a lot of developers and they'll
have a hard time finding out where their speed went. The other option is
runtime NotImplementedExceptions for all unsupported methods, which really is
just as unfriendly.

~~~
coffeemug
Thanks guys, that helps a lot!

------
giancarlostoro
This is one of those databases I wanted to eventually arrive on Windows, I
really enjoyed the look of it and wanted to try it out, and although I have
used from time to time Linux as my main OS I just don't feel comfortable using
a database I can't run on multiple platforms, it seems like a barrier not
being able to use it locally from Windows, although Vagrant and vagrant boxes
like Scotch Box are making this "issue" a little less relevant these days,
it's still nice to be able to run a database without installing an entire OS.
Thanks for the work and time invested in bringing Rethink into Windows, it is
truly appreciated.

------
pjmlp
As mostly a Windows developer nowadays, many thanks and congratulations.

------
fucsia
_many of the underlying design decisions in libuv clash with decisions that
we’ve made in the RethinkDB core_

Can you expand on this please?

~~~
atnnn
RethinkDB uses custom abstractions to hide the lower-level OS-specific code.
We were able to port the low-level code to Windows with very little changes in
these abstractions, and thus minimal changes to the rest of the code base.

The proper way to use libuv would be to replace those abstractions with
libuv's own, which would affect a lot more code and possibly break a lot of
implicit invariants.

In retrospect, perhaps we should have given alternatives like libuv, libevent
or boost::asio more consideration.

------
iheartmemcache
I love how they're reaching out to C# users (and conversely I love how MS is
reaching out to Linux and OS X users by opening sourcing their CLR, giving
away their IDE, integrating Node.js and JSX as first-class citizens, etc!) but
Rethink-ers if you're reading this - I briefly perused your source code and to
a C#'er (who has written his fair share of JS, both in the "Visual Studio
ASP.NET and SharePoint" style, as well as the "node.js" style) -- this doesn't
read like idiomatic C# at all. I'm sure it works well, but the API feels like
someone who writes JS for a living was given a deadline to add this feature
and tacked it on half-heartedly.

There's no reason in this day and age that you should be have any deps on
stuff like Cygwin, which you claim you don't: >> _You won’t find any POSIX
compatibility layers or other similar hacks–RethinkDB uses native Windows APIs
on the Windows platform._ It looks like you do[1] from the whole Cygwin
section and the env var's you have to add to PATH (in a somewhat inelegant
way). That dependency "tree" is... extensive to say the least and a lot of it
can be eliminated or eased with a combination of NuGet and chocolatey. Having
in your instruction notes to build Goog's RE2:

>> _Build it somehow (I forgot to record how)_ [2]

doesn't really make me too confident that you're going to support Windows as a
first party platform.

The API exposed to the end-user should be conventionally written in a more
LINQ-y way - I.e. Fluent style code should be written with
Object.Blah().Filter(x => x % 2).ToList() or whatever. Just little idiomatic
things like that are pretty pervasive.

Regardless, thanks for investing the time on working for this. As a curmudgeon
and someone who spends his spare time reading journal papers in the ACM about
concurrency models from hardware transactional locks to ICFP papers which
implement similar concepts on the exact opposite side of the spectrum, it's my
duty to be wary of new technologies and slow to adopt them into production--
but RDB and VoltDB are two products I really think are technically sound.
Contact me if you want a more thorough critique to make this more idiomatic,
because your product really is great!

[1]
[https://github.com/rethinkdb/rethinkdb/blob/a90bb08051603621...](https://github.com/rethinkdb/rethinkdb/blob/a90bb0805160362125a03024eb9f309e578408c0/WINDOWS.md)
(Errata: see _edit_ )

[2] See [1]: RE2

Edit: I was referring to this revision of _Windows.md_ , which at the time was
what was available on their master branch. My critique largely revolves around
that version. Proceeding my post, another branch's version was swapped in, to
a more clean version in which the build phases of the dependencies are
removed, and replaced with pre-compiled binaries as you now see:
[https://github.com/rethinkdb/rethinkdb/blob/next/WINDOWS.md](https://github.com/rethinkdb/rethinkdb/blob/next/WINDOWS.md)
This solves the aesthetics issue but just pushes the problem into another
domain. You're using binary deps (some of which are cygwin'd afaik, but I
haven't taken IDA to it so I can't say definitively) but if you want to build
from "source" a la the FreeBSD ports way -- where every single .c or .cc is
available for one to see and modify as their environment demands -- the
problem's still there just pushed under the rug.

~~~
danielmewes
You might want to check out the new Windows build instructions here:
[https://github.com/rethinkdb/rethinkdb/blob/atnnn/windows2/W...](https://github.com/rethinkdb/rethinkdb/blob/atnnn/windows2/WINDOWS.md)

We've since simplified the build process, and it can now build most
dependencies automatically. The only exception right now are the web UI assets
which still need to be downloaded separately or copied from Linux (building
these on Windows will come later).

We don't link or compile in any Cygwin code, and use all Windows APIs
directly. The build system uses some Cygwin tools though. Incidentally we
considered using Cygwin to achieve Windows compatibility at some point, but
found that it didn't implement some of the lower-level APIs that RethinkDB
uses on Linux.

------
gkya
A little bit off topic but what is the meaning of "developer preview" in the
context of an open source developer tool project?

edit: speling

~~~
coffeemug
Slava @ RethinkDB here.

"Developer preview" means we're still going through internal testing
processes. The code review is still in progress (the windows port hasn't been
merged into next yet), and the build hasn't been widely tested in the wild.

Everything seems stable and there aren't major known bugs, but there is still
work to do before we can label the windows port production ready.

~~~
gkya
A developer preview is a prerelease of a user software package that's
potentially a platform for other software, targeted for developers who would
potentially build applications for the package's user base. An OS like windows
may have development previews, as tgerr would be developers who would want to
start early to develop apps on tge platform. Sublime text may release a
development preview in order to allow developers of plugins to start early to
update thir plugins to the new version. But a database is not a user
application, it is a developer's tool or a component of an application. Thus a
developer preview of a thing that will never directly face a user is not
logical. You want to say release candidate or simply beta instead. Developer
preview implies extensible user application.

~~~
vvpan
It's a preview and it's for developers.

~~~
gkya
Bravo, you're smart enough to read. Now try to think.

I thought that the phrase was misleading, and I gave feedback. No need to join
in with a _cool_ slap to me.

------
dylz
your mascot is adorable.

~~~
SamReidHughes
Wait 'til it puts on its robe and wizard hat!

~~~
dylz
haha, it's more that it's rare that I see such detail put into ui/ux/branding
in many/most products, especially ones that aren't geared toward common end
users. big kudos :)

------
polskibus
Does it make any sense from licensing point of view to host database on
windows if there is a Linux version available? As far as I understand each
user hitting that database directly or indirectly via an app needs a CAL for
that Windows Server. Outside of an enterprise (ie. Cloud) it gets veery
expensive quickly.

Enterprises embraced Linux long ago so not sure if rethinkdb will have much
ROI on this effort.

~~~
skrebbel
The HN filter bubble sometimes forgets this, but there are a lot of developers
out there who use Windows (even if they don't always deploy to Windows).

Not having to set up a vagrant box just to give Rethink a try may seriously
influence developer adoption in this space.

~~~
Already__Taken
Also while I might personally be able to get by running my DB on a linux VM
some friends I'd like to share my apps to run for themselves aren't OK with
linux at all.

The docker rethinkdb images made this a breeze but only helps my development.

