ccr

CCR, Yield and VB.net

I've been trying to get my head around the CCR (Concurrency And Coordination Runtime) to see if it is worth learning. I program mostly in Vb.net and in most of the examples of using the CCR use the Yield keyword. How essential is Yield for using the CCR? Are there workarounds? Will VB.net Get the Yield command? (If Not WHY NOT?) ...

Using the CCR with ASynchronous WCF Service

I'm learning how to use the CCR (Concurrency and Coordination Runtime) in conjunction with a Asynchronous WCF Web Service. This is the Test WCF Service: public class Service : IService { private Accounts.Manager accountManager = new Accounts.Manager(); public IAsyncResult BeginGetAccount(int id, AsyncCallback ca...

Asynchronous SQLCommand and CCR

I have been playing with the demo code from this msdn article by Jeffrey Richter. I have added a new function to his ApmToCcrAdapters to handle the SqlCommand.BeginExecuteReader. Only it is closing the reader before I can read it. The following code is used to provide a FromIteratorHandler: private static IEnumerator<ITask> Asy...

SQLConnection Pooling - Handling InvalidOperationExceptions

I am designing a Highly Concurrent CCR Application in which it is imperative that I DO NOT Block or Send to sleep a Thread. I am hitting SQLConnection Pool issues - Specifically getting InvalidOperationExceptions when trying to call SqlConnection.Open I can potentially retry a hand full of times, but this isn't really solving the probl...

Concurrency and Coordination Runtime (CCR) Learning Resources

I have recently been learning the in's and out's of the Concurrency and Coordination Runtime (CCR). Finding good learning resources for this relatively new technology has been quite difficult. (A quick google search brings up "Creedence Clearwater Revival" as the top result!) Some of the resources I have found: Free e-book chapter fr...

Detecting Blocked Threads

I have a theory regarding trouble shooting a Asynchronous Application (I'm using the CCR) and I wonder if someone can confirm my logic. If a CCR based multi-threaded application using the default number of threads (i.e. one per core) is slower than the same application with double the threads specified - does this means that threads are...

Why does using Causalities in CCR result in memory leaks?

Does anyone have information about using Causalities? I have tried unsuccessfully to use these on my project as they appeared to be causing massive memory loads. Is this unusual? Beyond the normal (aka overly simple) examples given in the documentation, there isn't a heck of a lot of information about using Causalities in CCR code. ...

Question about CCR and WCF integration

Regardind this solution http://stackoverflow.com/questions/494463/using-the-ccr-with-asynchronous-wcf-service Why do you need to do this : ThreadPool.QueueUserWorkItem(s => callback(this)); instead of just calling callback(this) ? Isn't QueueUserWorkItem going to use yet another thread ? ...

Microsoft's CCR vs Task Parallel Library

Microsoft has at least two different approches to improved support for concurrent operations. 1) Is the Concurrency Coordination Runtime (CCR) which is part of Microsoft Robotics Studio and CCR & DSS Toolkit 2) Task Paralell Library (TPL) (Part of .NET 4.0 and now in Beta 1 release) I would like to know if anyone has experience with...

Setup for MS Robotics Studio on 64 bit WIndows

What is the best way to setup Microsoft Robotics Studio 2.0 on 64 bit Windows Vista? Appearently something needs to be done beyond the default installation to get it to run properly. ...

How does CCR & DSS toolkit model compare to other scalability & concurency approaches?

I'm interested to comparison between various approaches to scalability & concurrency including CCR & DSS framework model. I would be especially interested with comparison with Hadoop and Erlang style concurency ...

how can i pass a parameter to EnqueueTimer in the .net ccr

Unclear if there are ccr gurus here but let's try anyway. I have this function in my code: dq.EnqueueTimer(TimeSpan.FromMilliseconds(TIMEOUT), timeOutFn); which will call my function after the timeout. However since I need this timer on a lot of open sockets, I would like to pass a parameter(or ID) to the timer function. How do you ...

Is there a .Net equivalent to java.util.concurrent.Executor ?

Hello, Have a long running set of discrete tasks: parsing 10s of thousands of lines from a text file, hydrating into objects, manipulating, and persisting. If I were implementing this in Java, I suppose I might add a new task to an Executor for each line in the file or task per X lines (i.e. chunks). For .Net, which is what I am usi...

How do I abort CCR threads\tasks?

I want to implement a timeout on the execution of tasks in a project that uses the CCR. Basically when I post an item to a Port or enqueue a Task to a DispatcherQueue I want to be able to abort the task or the thread that its running on if it takes longer than some configured time. How can I do this? ...

Is Microsoft CCR gaining any traction?

Microsoft's Concurrency and Coordination Runtime quite literally saved a project that was running into major issues with deadlocking. Since then I find that I use it more and more frequently for almost anything that requires asynchronous coding producing results that run lighter and faster than before. I can honestly state that it has tr...

CCR: Best practice for handling errors using causalities

Having a complex sequence of tasks, implementing error handling can quickly bloat the code when using try/catch blocks and stuff like Choice receivers on PortSet<ActualResult, Exception> for every little task. Thankfully the CCR seems to offer a mechanism to handle exceptions in a more general way for a graph of tasks: causalities. A ty...

Why does C# say that the CCR's IterativeTask is non-generic?

I'm using the Concurrency and Coordination Runtime and am writing code similar to what is described in the documentation. The following line fails to compile: yield return new IterativeTask<string,Object,Object,long[]>("Hi",a,b,ls, itfunc); The compiler gives this error message: The non-generic type 'Microsoft.Ccr.Core.IterativeTask'...

Interthread communication time

I am chaining together 15 async operations through ports and receivers. This has left me very concerned with the interthread messaging time, specifically the time it takes between a task posting data to a port, and a new task begins processing that same data on a different thread. Assuming best case situation where each thread is idle at...

How to use PortMode.OptimizedSingleReissueReceiver in an Interleave? (Microsoft CCR)

Hi, I have read a post on the Microsoft CCR forum on reducing the overhead of calls to Port.Post() [ref.: PortElement Instantiation in the CCR] and I was wondering if there is a similar way to bind a port to its receiver in order to use the port in OptimizedSingleReissueReceiver mode in an interleave arbiter? I have implemented the fol...

batching remote calls (to database or service)

Hi all, Hope some of you can give some pointers on this one. I generate code where i have to make calls to remote resources like webservices or databases. Consider this piece of code class Parent{ IEnumerable<Child> Children; int SumChildren() { // note the AsParallel return Children.AsParallel().Su...