Archive for February, 2011
Nirvana 6 – What’s new?
My-channels is currently working on version 6 of Nirvana which should be released end Q1/beginning Q2. I’m going to quickly run through the new features:
Direct Data Delivery
Direct Data Delivery (DDD) is the main new addition to the product, it is a new message delivery paradigm.
Before starting, a bit of background: as you may know Nirvana is used by several banks within their SDP (Single Dealer Platform). What is a SDP you may ask? Most of the financial institutions offer to their clients trading applications available on the Web, generally via a Rich Internet Application (Silverlight, Flex, HTML, etc.) or a Rich Client (Java, .NET). Clients can see bank’s prices and trade in real-time. In these environments you have pretty serious requirements for messaging: you need to:
- push prices over internet (HTTP generally mandatory to cross firewalls and proxies) to clients,
- have guaranteed message delivery for trade execution and order management.
Nirvana covers these requirements but it is still challenging to design and implement the price distribution.
Why?
- because prices are generally distributed by tier levels associated to client groups or even with specific price per client. Mapping this distribution topology to JMS Topics (called Channels in Nirvana) is not always easy: if a client can only see one level of tiering you need to make sure he can’t see other levels by defining properly Channels granularity and ACLs.
- you may have to dynamically create channels or queues at runtime, this requires Nirvana admin API, adding a bit of complexity in the system.
- to summarize the JMS model fits pretty well when you need to communicate between server side applications in LAN or WAN. You just have to define a static Channel/Queue schema with static ACLs. But when you are dealing with external users it’s different: you have to grant them ACLs dynamically when they are authenticating.
Direct Data Delivery (DDD) is going to be very useful for these kind of scenarios, let me explain how it works: when the client API connects to the realm it can choose to subscribe to a Data Stream; clients can have only one Data Stream per active Nirvana session. On publisher side you can create, with required ACLs, an other type of resource called Data Group and associate different clients data streams with these data groups. You can then publish messages to a data group and Nirvana will automatically deliver them to clients contained within the group.
How does it helps in the SDP scenario?
- no need to create dynamically channels with the Admin API: data groups can be created dynamically with the Nirvana client API,
- client-side implementation is simplified: you no longer have to subscribe to the different channels used for price distribution, every thing can be managed server-side securely.
- it’s very easy to change client’s from one tiering group to another: remove it’s data stream from one data group and add it to an other one
- DDD will support all the useful features required to distribute price efficiently: last tick cache with delta delivery enabled (snapshot + partial updates) and conflation
API Batching
The client API now provides batching for find and find + subscribes to channels. Very useful again with client scenarios (latency is higher over internet than in LAN so batching is always helpful).
A new .NET API with RX Extensions
Nirvana is a Java product and the .NET API has been designed based on the Java API, so it looks a bit ‘”Java” from the eyes of a .NET developer ;-)
The new .NET API has been redesigned to provide a better experience for .NET developers and also provides access to the DDD and batching functionalities.
On top of that you can plug Rx (Microsoft Reactive Extensions) to get Nirvana event streams exposed as IObservable. I’m not going to explain here what is Rx, you can find lots of information on the DevLabs web site, on the forum or for instance on blogs of some of my mates here and here.
Stay tuned…
1 commentHardware, Parallel computing and stuff…
About one month ago I watched a video describing the architecture of LMAX (Financial Exchange) and realized that I did not know that much about hardware. I made some researches and found really good documents, blogs and videos and I thought it may be a good idea to share my findings…
First I would recommend to have a look at LMAX - How to Do 100K TPS at Less than 1ms Latency presented by Martin Thompson and Michael Barker, in about one hour it gives a pretty good overview of the challenges you have to face when building a HPC system with high level of contended concurrency. Comments below the video also worth having a look to get more details on there architecture.
Then there is an excellent paper from Ulrich Drepper (Red Hat): What Every Programmer Should Know About Memory. It presents current commodity hardware architectures focusing on :
- RAM - don’t be afraid by this first part, you can skip most of it,
- CPU Caches, cache coherency protocols, etc. – very interesting and important to understand too
- Virtual memory
- the second half of the document focuses on “what programmers can do” (must read) and “Memory performance tools” (relevant if you are working on Linux systems).
Paul E. McKenney, working on Linux kernel, is writing a book on parallel programing: Is Parallel Programming Hard, And, If So, What Can You Do About It? I won’t give a feedback yet because I’ve not yet finished it yet but I can already say that it’s really worth reading.
I have read as well several white papers from Herb Sutter (one of the C++ big names), you can find them on his web site, in his books and articles section. If you prefer videos there is “Machine Architecture: Things Your Programming Language Never Told You” video on YouTube with corresponding pdf slides.
Interested by parallel programming and wants to learn more about wait-free, lock-free, obstruction free, etc.? If you are, you should really go on Dmitry Vyukov’s website 1024cores and read the introduction and articles in order, they are pretty quick to read but very informative. You will find as well lots of algorithms and data structures for parallel programming – MUST READ. You should subscribe to it’s blog as well.
All documents and videos above are presented from the perspective of Linux/C++/Java but are very relevant even for a Windows/.NET developer.
Now if you want to learn more about Windows and .NET I would recommend:
- Joe Duffy’s blog and book are must read for parallel programming on Windows,
- Interested by internals of .NET Garbage collector? Maoni Stephens, working on the GC, presents latest evolutions of the .NET 4 GC in a Channel9 video, read here blog for more details.
- Patrick Dussud, one of the Microsoft Technical Fellows, and one of the CLR founders and chief architect of the .NET Garbage Collector, has some videos on the .NET GC internals here and here. You will notice that I’m not the only French guy with an horrible English accent ;)
- I’ve downloaded as well the open source code of the .NET platform (Rotor). You should really have a look. For instance you can find the C++ source code of the execution engine (\sscli20\clr\src\vm) and the corresponding BCL code in .NET (\sscli20\clr\src\bcl\system). Did you ever wondered how .NET objects are stored internally? Where is the implementation of “extern” methods for the BCL classes? It’s there! The document Object Internals is a good companion to start browsing this large code base.
- CLR: Vance Morrison blog and Jeffrey Richter’s blog and book CLR via CSharp
- Windows internals: Mark Russinovich, Technical Fellow and Windows Kernel guru, has a good video “Inside Windows 7” on Channel9 and his book Windows Internals, the absolute reference for Windows’ OS core.
Other interesting stuff to read:
- Ring Buffer implementations (CPU Cache friendly + optimisations): MCRingBuffer and LibertyQueue white papers,
- False sharing: here and here (Herb Sutter strikes back)
Last thing to say: I’ve been reading quite a lot lately and it’s pretty hard to keep track of what you have read, what you would like to read, etc.
- I’ve found Read It Later service extremely useful: it integrates with your browser (Chrome for me), a single click and you have added a document to your list of stuff to read and your mobile devices (iPhone, iPad for me) get synchronized automatically. It works quite well for HTML pages.
- For PDFs on Ipad/iPhone, GoodReader is a must. Note that it can connect to your DropBox if you have one, very useful to share documents between devices.
Enjoy…
No comments