Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 08 | Comments: 18

filter by tags archive

LightSwitch on the wire

time to read 2 min | 265 words

This is going to be my last LightSwitch post for a while.

I wanted to talk about something that I found which was at once both very surprising and Doh! at the same time.

Take a look here:

image_thumb[1]

What you don’t know is this was generated from a request similar to this one:

wget http://localhost:22940/Services/LSTest-Implementation-ApplicationDataDomainService.svc/binary/AnimalsSet_All?$orderby=it.Id&$take=45&$includeTotalCount=

What made me choke was that the size of the response for this was 2.3 MB.

Can you guess why?

The image took up most of the data, obviously. In fact, I just dropped an image from my camera, so it was a pretty big one.

And that lead to another problem. It is obviously a really bad idea to send that image on the wire all the time, but LightSwitch make is so easy, indeed, even after I noticed the size of the request, it took me a while to understand what exactly is causing the issue.

And there doesn’t seems to be any easy way to tell LightSwitch that we want to put the property here, but only load it in certain circumstances. For that matter, I would generally want to make the image accessible via HTTP, which means that I gain advantages such as parallel downloads, caching, etc.

But there doesn’t seems to be any (obvious) way to do something as simple as binding a property to an Image control’s Url property.


Comments

Steve

Come on now, are you serious? So they promote the ability to add pictures, but they expect it to be delivered in this manner?

So far, you've figure out that there are plenty of potential bottlenecks from network to database to unnecessary transactions to even source control problems (a single file could cause problems for a team if there are any merging issues for example).

Everything written in this series makes it seem like Light Switch was built by a single developer running everything locally...but I know that can't possibly be the case, but it just feels that way. I'm already waiting for the "but it works on my machine!" complaints.

Ayende Rahien

Steve,

That was pretty much my concern. The ability to handle pictures in this fashion is crucial, especially when you make this such a core part of your API.

When every entity is 2MB in size, your app is going to be even slower than your select n+1 will indicate

Steve

Looking into my magic ball, I can see many developers getting "Hey, I built this application in Light Switch and it was working pretty well for me for a few weeks but now it's slow as hell, can you take a look?" requests in the future.

But the problem is going to be that there won't be much they can do about it without re-writing the application from scratch.

From what you've shown in the last few posts Light Switch is actually worse than I imagined it would be.

James

So, yeah, as usual, Microsoft makes it easy to build demo applications that will never in a million years scale.

LightSwitch = MS Word based web development, take 2.

Morten Jacobsen

Ayende, thanks a lot for your brilliant comments on LightSwitch. It almost let me to drop it. But yesterday I saw the channel9 discussion at ecn.channel9.msdn.com/.../...deLightSwitch_ch9.mp4 by the developers, and I have to say; there is a lot into it.

I´m an accounting domain expert and am now on the verge to release my 8th commercial fincacial product. And what these guy shows and talk goes stright to my heart, and it will be ideal for my ninth product.

So I wil ask you. What actions can I take not to get this N+1? Or, how can I use the tool in a way that make it perform reasonably well on a large scale?

And to make you think twice, if it is a success will you go west across the Mediterean Sea and come to La Vila, Alicante, Spain to help us make it work even better?

/mortjac

Arnis L.

@Morten

Those guys in vid ain't bad at marketing for sure. I foresee that governments, project managers and people that do not code in general will buy in real easily (<-- count how much times You can hear that word and synonyms of it about lightswitch in video. add that heap of quite random info and basically - You got what is called gypsy hypnosis).

I myself, if I will be forced to use it, will just quit whatever casualties will be. The same with Sharepoint and some other friends. In my reality these things are falsehood.

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. Concurrent max value - 3 hours from now
  2. Production postmortem: The case of the memory eater and high load - 3 days from now
  3. Production postmortem: The case of the lying configuration file - 4 days from now
  4. Production postmortem: The industry at large - 5 days from now
  5. The insidious cost of allocations - 6 days from now

And 5 more posts are pending...

There are posts all the way to Sep 10, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    14 Aug 2015 - The case of the man in the middle
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats