Managed DirectX - directx

This is a pretty deep topic I guess, so any url's with insight info is also gladly accepted.
I've been working a lot with native directx, never managed. On the other hand, mostly when developing other type of applications that don't have any need for advanced gpu rendering I usually stick to managed code such as C#. Starting to favor C# more and more, I've been thinking about trying out some managed directx.
So my question is if there are any remarkable cons and pros of using managed directx. Of course I'm mostly interested in potential drawbacks.
If I don't answer I probably had to go. Then I'll make sure to answer first thing tomorrow!
I look forward to hear your replies.
Jonas

Managed DirectX has been deprecated by Microsoft. You can still use it but it's probably not your best choice any more. Alternatives include XNA, SlimDX and the new managed wrappers in the Windows API Code Pack.

Another alternative to the now deprecated "Managed DirectX" is SharpDx. This has been benchmarked against XNA, SlimDX and the windows API code pack with favourable results.

Related

DirectCompute information

I've been trying to make use of the GPU as part of a project of mine. I've looked into both CUDA and OpenCL, but the lack of information showing you how to introduce these into a project is shocking. Even their dedicated forum groups are dead. So now, I'm looking into DirectCompute.
From what I can tell, it's simply a new type of shader file that makes use of HLSL. My question is this, does my program (aside from being DirectX 10 / 11 ) need its structure changed?
I mean, is it simply a case of creating the CS file, setting in the project like I would any other shader, and watch the magic happen?
Any information on this would be appreciated.
Yes CS fits into the usual DirectX programming structure. It works in a similar way to CUDA/OpenCL. Here is a good, simple example:
http://openvidia.sourceforge.net/index.php/DirectCompute
Personally I would suggest using CUDA/OpenCL rather than going the DirectCompute route if your project does not involve graphics. I think CUDA/OpenCL are better for general-purpose computing. It can be a little difficult to find documentation but these are the main aspects to GPU programming:
Setting up data on the CPU to pass to the GPU.
Understanding how many warps/threads need to be started on the GPU, how threads might need to communicate, etc.
Computing on the GPU, reading data back on the CPU
Another option is C++ AMP - please follow links from here for more info and feel free to post questions as you have them: http://blogs.msdn.com/b/nativeconcurrency/archive/2011/09/13/c-amp-in-a-nutshell.aspx
Easiest way - is to make project which uses CS with C# and SlimDX.
And here is good site with basics how to use CS from within C# code.
Later on you can move to full scale CS exploration with C++ and DirectX 11.

Any alternative to the Alternativa3D engine?

I'm familiar with the Alternativa3D engine
To me it's quite good, but I just wondered about another 3d engine which is able to compete with it.
An engine must correspond to the following requirements:
must have a good Stage3D support
be open-source if possible (Alternativa3D is not open-source, it's the major disadvantage)
must have an adequate documentation and tutorials
There are a few good 3D engines for actionscript. Although I only know of these two that support Stage3D at the moment:
Away3D - Stage3D support from version 4.0 upwards and is open-source.
Flare3D - They are not open-source but free to use for non-commercial projects and they also have a really cool website.
Hope this helps.
You may have to compromise somewhat because Stage3D is a new resource so support and uptake especially in free open source engines is going to be scarce. You may need to be more realistic with your constraints and settle for an engine which is not open source or isn't documented as much as you would like.
http://www.flashsandy.org/
It's documented, and it's open source. I'm not sure how good it is, the samples work...

Development of a FIX engine

I am new in the FIX and have requirement to develop a small FIX engine to communicate trading system. As I know there are plenty of FIX engine available but here requirement is to develop it.
Could anyone provide me the reference on any open source or any good article to start it?
For C++ use quickfix
Java use QuickfixJ
For .NET use VersaFix
To refer to Fix message constructions.
Both the libraries(Quickfix) have the same nomenclature as mentioned in the FIX protocol standards. But they are little buggy here and there, but you can rectify them in your source code. I have used both of the libraries in a commercial project and say so after seeing the libraries work. But the code is quite simple and they have an online reference manual to work with.
But developing your own library will be a big task for only one developer, if you have a team it can be much easier. Remember other than parsing you have to incorporate network communications, configuration on how to run it and threading structures also.
Developing your own FIX engine is not easy, specially if you will be dealing with FIX session level details yourself. Synchronizing sequences through ResendRequest, GapFill and SequenceReset is not easy and it would be nice if you can just use a FIX engine that is already doing that for you.
Another problem with the FIX protocol is REPEATING GROUPS. It is not easy to parse them quickly as it requires recursion or alternatively a complex iterative implementation.
Moreover, most Java FIX engines produce a lot of garbage when they are parsing the message, which increases variance and latency due to GC overhead.
Lastly, an intuitive API design is crucial to accelerate FIX development. If you want a good example of a clean API, you can check CoralFIX.
Disclaimer: I am one of the developers of CoralFIX.
You certainly want to look at QuickFix.

DirectX in IronRuby

I'm thinking about writing a game using DirectX, and I'm considering using IronRuby.
Is IronRuby stable enough to use in production?
Does IronRuby work well with DirectX?
Yes, it is ready for production. Version 1.0 is available since April 2010. Please use it and give us feedback (link text). Regarding DirectX compatibility - I haven't tried t owrite anything but from a quick look at the managed DirextX API there seems to be no reason why it won't work. Most of the .NET APIs that are usable from C# or VB.NET are accessible from IronRuby as well. There are a few exceptions, some APIs rely on static types, but that shouldn't be the case for DirectX. We are working on enabling those as well in future versions.
I'm sorry I cannot address the IronRuby part of your question, but for managed DirectX, you could check out API Code Pack, which provides a managed wrapper for DirectX.
This question has additional details on managed DirectX Does XNA effectively replace Managed Directx?

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 transformed the way I think about multithread/multicore dev. Despite my personal love for CCR, there appears to be very little buzz surrounding it on the web and was wondering if anyone can offer any reason for this. Are there better alternatives, or is it a lack of promotion from MS, or are people simply happy with the existing tools?
I would suggest that TPL Dataflow, to be released as part of .Net 4.5, will eventually supersede the CCR. Most concepts in the CCR have an analogue in Dataflow although it isn't necessarily a straightforward porting exercise.
That said, the Robotics Studio Developer 4 Beta 2, released November 2011, does include a version of the CCR for Silverlight 4.
The licensing around it is a bit of a pain, from what I remember.
I think most people are waiting for Parallel Extensions in .NET 4.0. I know it's not quite the same thing, but it's still a lot better than what's in the framework at the moment - and although the continuations don't work the same way, at least they're there :)
I suspect that Parallel Extensions has had rather more work on it than CCR - although I'm sure the CCR work inspired some of the design of PFX as well.
I, too, have a personal love for the CCR... I certainly have not seen anything quite the equivalent of it in .NET or elsewhere. I think it's too bad that I think Jon's right and it will likely be relegated to a niche of enthusiastic fans like us, while most mainstream .NET multithreading will probably be done with the Parallel Extensions.
I'm particularly disappointed in this prognosis because I think more could be done to promote it - say maybe fit it into an enterprise reliable async message bus-type framework, which I think is lacking a coherent story in .NET. Also, from looking at the Microsoft CCR/DSS Site I would probably never have thought to try it... I don't understand why it was packaged up this way - other than the fact that several companies ripped it out of the Robotics toolkit and just ran with it before MS thought it had a purpose beyond robotics.
Anyway, you're not alone... and there are lots of other CCR 'enthusiasts' as well. Here's a neat 'flow' based CodePlex project that wraps the CCR in an interesting flow paradigm.
I have been enjoying using the CCR in two major projects so far. The first one is terrible (didn't really get the Causality pattern idea) And the second one is coming along brilliantly (Web crawler)
Both projects are utilize the message based paradigm to avoid waiting for slow running IO operations. The CCR is quite good to work with once you solve the lack of a compatable ORM mapper. (I'm considering releasing some of the plumbing code that i've written to save other people the heart ache)
Having said that, RX looks quite interesting. I'm curious how it compares in terms of Error handling, speed and reliability.
Microsoft Robotics Studio 2008 R3 is now available and now free for everyone to use.

Resources