reliability

What will it take for Transactional Memory to be viable?

痞子三分冷 提交于 2019-12-04 11:00:49
I've been doing some work on transactional memory and its viability for systems programming (databases, operating systems, servers, etc.). My own experience employing transactions, together with having seen how few communities use transactions in real code, has raised a question: What would convince you, a developer writing production code, to employ transactional memory in your work? Would it be general adoption? High speed? Improved reliability? By how much? For those that haven't seen them, memory transactions act like database transactions: operations proceed (apparently) in parallel, and

Copy and move files in Java, explanation and comparison of different approaches

扶醉桌前 提交于 2019-12-04 05:27:23
问题 I implement a file manipulation functionality, and I paid attention that Java provides multiple techniques to copy and move files. Below you can find code snippets, briefly describing these approaches: Approach #1: File from = new File(src.getPath()); File to = new File(dst.getPath()); from.renameTo(to); Approach #2: FileChannel inChannel = new FileInputStream(src).getChannel(); FileChannel outChannel = new FileOutputStream(dst).getChannel(); inChannel.transferTo(0, inChannel.size(),

Coding for high reliability/availability/security - what standards do I read?

时光毁灭记忆、已成空白 提交于 2019-12-03 10:10:17
问题 I've heard that the automotive industry has something called MISRA C. What are the relevant standards for other high reliability/availability/security industries, such as Space Aircraft Banking/financial Automotive Medical Defense/Military ??? -Adam 回答1: Check out the Goddard Space Flight Center and its coding standards. One of the C standards, which I've adopted in my own code, is that headers must be self-contained, and they provide a simple way to enforce that -- a module's header must be

WCF Reliable session without transport security will not faulted event on time

浪尽此生 提交于 2019-12-03 07:33:15
I have encountered a very interesting behavior of reliable session. I am using netTcp binding + duplex channel + reliable session. When I am trying to listen on channel.faulted , if there is security mode is set to transport , faulted event would fire immediately when client disconnects. However when I set binding's security mode to None or Message, faulted event no longer fires in the same situation. They will eventually get faulted half of ReciveTimeout on server side which I understands as reliable session would send a heart beat message at that time. The question is: Why the wcf binding

Are Erlang/OTP messages reliable? Can messages be duplicated?

痴心易碎 提交于 2019-12-03 00:42:04
问题 Long version: I'm new to erlang, and considering using it for a scalable architecture. I've found many proponents of the platform touting its reliability and fault tolerance. However, I'm struggling to understand exactly how fault-tolerance is achieved in this system where messages are queued in transient memory. I understand that a supervisor hierarchy can be arranged to respawn deceased processes, but I've been unable to find much discussion of the implications of respawning on works-in

Coding for high reliability/availability/security - what standards do I read?

偶尔善良 提交于 2019-12-02 23:32:57
I've heard that the automotive industry has something called MISRA C. What are the relevant standards for other high reliability/availability/security industries, such as Space Aircraft Banking/financial Automotive Medical Defense/Military ??? -Adam Check out the Goddard Space Flight Center and its coding standards . One of the C standards, which I've adopted in my own code, is that headers must be self-contained, and they provide a simple way to enforce that -- a module's header must be the first file included in the module, so if the file is not self-contained, it won't compile. if you're

Failure rate of a system

ⅰ亾dé卋堺 提交于 2019-12-02 10:48:53
In a Microsoft interview I was asked the following question: A system is guaranteed to fail 10% of a time within any given hour, what's the failure rate after two hours ? after a million hour ? I'm not very experienced in Reliability theory and Failure rates, but any input on this question will be very much appreciated. 1-(.9^h), where h is the number of hours 来源: https://stackoverflow.com/questions/6819334/failure-rate-of-a-system

Copy and move files in Java, explanation and comparison of different approaches

£可爱£侵袭症+ 提交于 2019-12-02 05:48:16
I implement a file manipulation functionality, and I paid attention that Java provides multiple techniques to copy and move files. Below you can find code snippets, briefly describing these approaches: Approach #1: File from = new File(src.getPath()); File to = new File(dst.getPath()); from.renameTo(to); Approach #2: FileChannel inChannel = new FileInputStream(src).getChannel(); FileChannel outChannel = new FileOutputStream(dst).getChannel(); inChannel.transferTo(0, inChannel.size(), outChannel); Approach #3: InputStream in = getContentResolver().openInputStream(selectedImageUri); OutputStream

How do I detect unexpected worker role failures and reprocess data in those cases?

回眸只為那壹抹淺笑 提交于 2019-12-02 00:03:33
I want to create a web service hosted in Windows Azure. The clients will upload files for processing, the cloud will process those files, produce resulting files, the client will download them. I guess I'll use web roles for handling HTTP requests and worker roles for actual processing and something like Azure Queue or Azure Table Storage for tracking requests. Let's pretend it'll be Azure Table Storage - one "request" record per user uploaded file. A major design problem is processing a single file can take anywhere from one second to say ten hours. So I expect the following case: a worker

CA2000 passing object reference to base constructor in C#

耗尽温柔 提交于 2019-12-01 03:16:26
I receive a warning when I run some code through Visual Studio's Code Analysis utility which I'm not sure how to resolve. Perhaps someone here has come across a similar issue, resolved it, and is willing to share their insight. I'm programming a custom-painted cell used in a DataGridView control. The code resembles: public class DataGridViewMyCustomColumn : DataGridViewColumn { public DataGridViewMyCustomColumn() : base(new DataGridViewMyCustomCell()) { } It generates the following warning: CA2000 : Microsoft.Reliability : In method 'DataGridViewMyCustomColumn.DataGridViewMyCustomColumn()'