.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
abhays
Clintonzz
arronlee
mattyclown
cathyhill345
Post New Web Links

Lazy and WCF

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :WCF
 

Has anyone developed code that would return a collection or array of Lazy<T> objects and have T be associated with a proxy so that when the client accesses one of the Lazy<T>.Value the proxy is evaluated and a call to the WCF server is made. So in essence two calls are made to the WCF server. The performance of this process hinges on bet that the client will only access a small percentage of the collection or array of Lazy<T> objects returned. One immediate question would be serializing the collection of Lazy<T> objects. The other question would be ensuring that T has the appropriate ties with the proxy to make the call to the sever. Finally putting this altogether in a buildable solution seems complicated.

Kevin


Kevin Burton


View Complete Post


More Related Resource Links

Cutting Edge: Don't Worry, Be Lazy

  

Being lazy in software development can be a good thing, but until the Microsoft .NET Framework 4, coders had to implement lazy behavior themselves. Dino Esposito shows how to use the new Lazy class to maximize your resources.

Dino Esposito

MSDN Magazine August 2010


Entity Framework POCO and WCF Data Service - Lazy-loading (expand?) related entities?

  
I've followed ScottGu article on creating an Entity Framework POCO classes for NerdDinners (right now there are only 2 classes, Dinner and RSVP. I then created a WCF Data Service class, which points to my EF class (NerdDinner), everything is working fine, except I can't lazy-load or expand related entities. For example, I want to get all load all the Dinners and their related RSVPs, something like this throw an error:var result = (from d in db.Dinners.Expand("RSVPs")                      select d);The error is a null reference error:at System.Data.Services.Serializers.SyndicationSerializer.WriteObjectProperties(IExpandedResult expanded, Object customObject, ResourceType resourceType, Uri absoluteUri, String relativeUri, SyndicationItem item, DictionaryContent content, EpmSourcePathSegment currentSourceRoot) at System.Data.Services.Serializers.SyndicationSerializer.WriteEntryElement(IExpandedResult expanded, Object element, ResourceType expectedType, Uri absoluteUri, String relativeUri, SyndicationItem target) ... ... ...Any idea why or what I need to do to load related contents?Thank you very much.

Can we do Lazy Loading using ajax toolkit TabContainer control ?

  
Hello,At present we are using <ajax:TabContainer> to load tabs. I have 5 user controls inside <ajax:TabPanel>.The problem is that all the data on these 5 pages gets loaded at once and increases the loading time as well as it is very hard to debug.Can we do lazy loading uisng TabContainer control? so that only the data of the current tab is loaded and when we click on the other tab then that's control data gets loaded.Kindly Advice. THANKS.

Issue seen Implementing Search in WPF TreeView having both Virtualization and LoadOnDemand/Lazy load

  
We need to use Virualization and LoadonDemand for performance reasons. We are facing some issues in implenting a search Node capability. The issue has been described in detail by our Developer at the following link. A Sample code is also attached to the link below. http://social.msdn.microsoft.com/Forums/en/wpf/thread/ff5ab305-26f0-49a1-b1c8-3254e7edcd15

Loading dropdownlist on click of the dropdown's arrow/lazy loading of dropdown

  
Hi all, I have a situation where on a page there are 7-8 dropdowns, which have large amount of data to be binded. I have a radiobutton list having 2 choices and on selecting any of them, the i get the data from cache and bind all the dropdowns which takes about 6-7 seconds.But, i dont use all the dropdown everytime as basic functionality is based on a date range. So i was thinking , if i could load the dropdown on demand, i.e. on click of dropdown arrow, i would bind the dropdown, the it would be better and user does not have to wait for those 6-7 seconds while switching between th radiobuttonlist choices. i tried calling a JS fuction on dropdown's onClick and from there firing one button's event. I am getting the data populated on dropdown's click but, the dropdown gets collapsed as soon as the data is binded, and user have to click again to select from dropdownlist items.I was just wondering if anyone can give me an idea so that the dropdown wont collapse and stays after binding, or else a full idea of lazy loading of the dropdown.I have also specified some of my code from my POC.<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1- transitional.dtd&quo

Different matches starting at the same index (combination of lazy and greedy)

  
Hello everyone

My question is:

when catching a regex pattern that has a quantifier like * or +, it matches the greedy way, and by adding ? we can match it the lazy way. is there a way that we can match both of them, including all the matches on the way? in other words, is it possible at all for two different matches to start at the same index?
for example

for the input:
a something something b blah blah b blah blah b

we want to have all the 3 matches:
- a something something b
- a something something b blah blah b
- a something something b blah blah b blah blah b

so is it possible (our platform is .NET if it has any meaning)

thank
Michael

Deep Clone (copy) Lazy type of objects

  

For deep cloning (copy) objects there is a many ways. One good document for cloning is here http://www.csharp411.com/c-object-clone-wars/ . The document shows six different ways to clone objects.

In our architecture we can’t use memorystreams for serializing and deserializing objects because some classes are part of the WCF datacontract and Serializable attribute on classes will force DatacontractSerializer to act way that we don’t want.

For cloning objects we use reflection technic. We create new object based on source object type and then loop all object field and copy source objects values to the copy. Everything works fine until we implement System.Lazy variables in our classes. How to deep c

While processing large cubes, various file system errors: "the background thread running lazy writer

  

 

We consistently get these I/O errors when processing large OLAP databases.  After a reboot, I can usually get a database to process a few times, but then suddenly reprocessing will fail with errors similar to the one shown below, when nothing changed (no data or structure changes).  The specific file(s) it reports are always different.  Also, sometimes it crashes the msmdsrv.exe process, which seems to intermittently affect other server functions as well (killing the ability to RDP into the server, or the ability to open Event Viewer).

 

<error message>

File system error: The background thread running lazy writer encountered an I/O error.
Physical file: \\?\D:\OLAPData\SSAS1\SA1.166.db\SA1 Data Source View 1.238.cub\Fact Subject.231.det\Fact Subject.221.prt\271.Aspect.Source Key.fact.map.hdr.
Logical file: .
File system error: The following error occurred while writing to the file 'LazyWriter Stream':
Insufficient system resources exist to complete the requested service. .
File system error: The background thread running lazy writer encountered an I/O error.
Physical file: \\?\D:\OLAPData\SSAS1\SA1.166.db\SA1 Data

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend