﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ryan Roberts commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Wasn't there talk on the remotion / relinq project of using javascript as an intermediate format for sending linq expressions over the wire?
  
  
Can't see anything in the codebase though and the oloh page has changed since I last remember it. It's a shame as I would kill puppies for a linq expression to js translator.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment25</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment25</guid><pubDate>Fri, 12 Mar 2010 16:16:21 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>I am aware of that,and the name was changed
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment24</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment24</guid><pubDate>Wed, 03 Mar 2010 13:28:18 GMT</pubDate></item><item><title>Khalid Abuhakmeh commented on Rhino DivanDB – A full coding sample – Embedded</title><description>I was actually curious as to why you called it DivanDB and then I did a google search on Divan. That's pretty funny, it's a play off of CouchDB. There is a library that allows you to do linq queries over WCF 
[http://interlinq.codeplex.com/](http://interlinq.codeplex.com/) check it out it might give you some ideas.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment23</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment23</guid><pubDate>Wed, 03 Mar 2010 13:12:00 GMT</pubDate></item><item><title>o_o commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Expression Tree Serialization: 
[http://code.msdn.microsoft.com/exprserialization](http://code.msdn.microsoft.com/exprserialization)</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment22</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment22</guid><pubDate>Wed, 03 Mar 2010 11:55:31 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Rafal,
  
It is compiled and run on the server.
  
The results are JSON docs
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment21</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment21</guid><pubDate>Tue, 02 Mar 2010 18:42:53 GMT</pubDate></item><item><title>Rafal commented on Rhino DivanDB – A full coding sample – Embedded</title><description>But why use LINQ syntax if you put it in a string anyway?  Is it C# that is compiled and executed server side, or some expression language that only mimics C#? And what happens to projection objects produced by the query - are they persisted somehow, or just used to stuff Lucene Document with data fields?
  
One more question: what are the results returned by query? Full documents or just the 'title' column? How are they returned - as strings?
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment20</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment20</guid><pubDate>Tue, 02 Mar 2010 18:30:40 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Not in a way that allow you to recompile it, though
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment19</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment19</guid><pubDate>Tue, 02 Mar 2010 18:11:55 GMT</pubDate></item><item><title>Dan Finch commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Expression.ToString() returns the actual expression (sort of), that may be helpful.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment18</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment18</guid><pubDate>Tue, 02 Mar 2010 17:48:46 GMT</pubDate></item><item><title>Jeff Handley commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Ayende,
  
  
You might want to look at DynamicQueryable.  Scott Hanselman and Marcin Dobosz have blogged about it recently.  I have used a flavor of DynamicQuerable to serialize and deserialize LINQ expressions very well.
  
  
Here's Hanselman's recent post:
  
  
[www.hanselman.com/.../...INQExpressionsEasier.aspx](http://www.hanselman.com/blog/TheWeeklySourceCode48DynamicQueryableMakesCustomLINQExpressionsEasier.aspx)  
  
And Marcin's:
  
  
[blogs.msdn.com/.../...-DynamicQueryable_2E00_.aspx](http://blogs.msdn.com/marcinon/archive/2010/01/14/Building-custom-LINQ-expressions-made-easy-with-DynamicQueryable_2E00_.aspx)  
  
And ScottGu's post from long ago:
  
  
[weblogs.asp.net/.../...-dynamic-query-library.aspx](http://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library.aspx)  
  
At the very least, DynamicQueryable could give you a good starting point for the (de)serialization of the expression - that's what it did for me.
  
  
-Jeff
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment17</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment17</guid><pubDate>Tue, 02 Mar 2010 16:23:20 GMT</pubDate></item><item><title>Chris commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Looks good - can't wait to play with it.  Now I see the programming interface, I can almost see how it works.
  
  
Regarding all the moaning about stale results and blocking; It is NICE that consistency is OPTIONALLY enforceable (by waiting).  For the stuff I do, it is useful to make that distinction.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment16</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment16</guid><pubDate>Tue, 02 Mar 2010 16:05:52 GMT</pubDate></item><item><title>Roy commented on Rhino DivanDB – A full coding sample – Embedded</title><description>True, and I guess introducing refactorability using expressions is nice, but not if it comes at the cost of adding a lot of complexity.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment15</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment15</guid><pubDate>Tue, 02 Mar 2010 15:23:50 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Roy,
  
This isn't a query, this is building an index.
  
Those are different things
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment14</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment14</guid><pubDate>Tue, 02 Mar 2010 15:18:58 GMT</pubDate></item><item><title>Roy commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Oh, some tags got clipped, but AddView should be a generic of type "Doc". But that's assuming you even want to have domain objects defined in that way.
  
  
Meh, that seems like a fiddly solution anyway.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment13</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment13</guid><pubDate>Tue, 02 Mar 2010 14:38:58 GMT</pubDate></item><item><title>Roy commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Maybe then the parameters could be passed in as lambdas? So, something like:
  
  
db.AddView
&lt;doc(@"var pagesByTitle = [snip] select new {0}", doc =&gt; doc.Title);
&gt;</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment12</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment12</guid><pubDate>Tue, 02 Mar 2010 14:29:06 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Roy,
  
That is likely to be _very_ hard.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment11</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment11</guid><pubDate>Tue, 02 Mar 2010 14:10:02 GMT</pubDate></item><item><title>Andrew Stewart commented on Rhino DivanDB – A full coding sample – Embedded</title><description>@Roy,
  
  
I'm hoping we can do this, I'm going to be working on something like that shortly.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment10</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment10</guid><pubDate>Tue, 02 Mar 2010 13:47:23 GMT</pubDate></item><item><title>Roy commented on Rhino DivanDB – A full coding sample – Embedded</title><description>But wouldn't it still be possible to create the expression on the client side, and before it goes on the wire have it converted to something serializable? That way, the client code still has the benefit of compile-time checking.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment9</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment9</guid><pubDate>Tue, 02 Mar 2010 13:31:17 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Darius,
  
You shouldn't, this is a client/server thing, you can't pass live isntances along the wire.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment8</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment8</guid><pubDate>Tue, 02 Mar 2010 13:09:54 GMT</pubDate></item><item><title>Darius Damalakas commented on Rhino DivanDB – A full coding sample – Embedded</title><description>I am really supprised to see that a call to db.AddView accepts some kind of string, which is not validated at compile time.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment7</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment7</guid><pubDate>Tue, 02 Mar 2010 12:48:22 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Configurator,
  
This is a unit test, and I know that I'll wait for ~ms or so, because I know the entire context.
  
As for waiting with scaling, you put waits, or if you accept potentially stale results
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment6</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment6</guid><pubDate>Tue, 02 Mar 2010 12:42:19 GMT</pubDate></item><item><title>configurator commented on Rhino DivanDB – A full coding sample – Embedded</title><description>So why did you busy wait here, on your first full example?
  
Do you have an idea how to actually wait for queries to be not-stale without busy waiting?
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment5</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment5</guid><pubDate>Tue, 02 Mar 2010 12:35:05 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Bruce,
  
Try passing expression tree on the wire, and making sense of them on the other side.
  
And Query doesn't know how long to wait.
  
Busy waiting is NOT something that I want to do, talk about DoS yourself
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment4</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment4</guid><pubDate>Tue, 02 Mar 2010 10:59:43 GMT</pubDate></item><item><title>Bruce Boughton commented on Rhino DivanDB – A full coding sample – Embedded</title><description>Out of interest: why do you pass the views as strings instead of expression trees? Also, why not provide an overload to Query that does the do... while for you to ensure non stale results? Is this just an early preview of the API?
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment3</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment3</guid><pubDate>Tue, 02 Mar 2010 10:52:28 GMT</pubDate></item><item><title>Ayende Rahien commented on Rhino DivanDB – A full coding sample – Embedded</title><description>addys,
  
I am doing some funky things there.
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment2</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment2</guid><pubDate>Tue, 02 Mar 2010 10:33:35 GMT</pubDate></item><item><title>addys commented on Rhino DivanDB – A full coding sample – Embedded</title><description>curious:  are you using a library for parsing the linq string into an expression tree, or did you cook up your own parser?
</description><link>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment1</link><guid>http://ayende.com/4416/rhino-divandb-a-full-coding-sample-embedded#comment1</guid><pubDate>Tue, 02 Mar 2010 10:32:23 GMT</pubDate></item></channel></rss>