How to create distributed file system [closed] - distributed

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Just for self education I decided to implement "hello world" distributed file system. The simplest one. And decide to read about theory under this subject.
But... when I asking google about this it shows answers like "how to configure hdfs" or "how to set distributed fs on windows" what is not what I interested in...
Could someone please point me on some good articles or books on this subject.
Thanks a lot!

Well, if you really decided to implement such a file system, you must start with distributed systems. I recommend reading the Tanenbaum reference book http://www.distributed-systems.net/index.php?id=distributed-systems-principles-and-paradigms
Careful, the subject is really complex and distributed systems are all but simple to implement.
If you want to have a look to some already implemented distributed file systems, you may have a look to GFS/GFS2 (from RedHat). You may also have a look to ocfs2 from oracle.
You may also have a look to gluster https://fr.wikipedia.org/wiki/GlusterFS
You may also be able to find some white papers on the google file system (when it was still a university work).
The main problem of such distributed system is the failure detection (detect when a node crashes while writing on the file system => need to make sure there are no corruptions). There are multiple strategy, one may be to implement a journal which is protected by a distributed lock.
Another great (classical) problem is the 'split brain' problem, when the cluster is split in two groups because of a network failure (imagine a switch that is broken). Both groups 'think' that the other one is dead (they cannot communicate with it) but there is no way to make sure that the distant group is not writing data causing the data to diverge.
Hope you find what you want with all this.
Edit:
Now GFS is deprecated, redhat is using and developing 'Ceph'

Related

Are there well-established design patterns on implementing a user prompt? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm working on a embedded project which reads a joystick and moves an actuator within a 3d space accordingly. Now I would like to provide a user prompt available over serial line as an alternative option as user input. User input will be G-Code.
https://en.wikipedia.org/wiki/G-code.
I'm not unexperienced with creating C code, however, I never had to deal with text input before. Are there any well established design patterns on how software of this kind is implemented in a easy-to-read/maintanable way?
No, there is no "design pattern" for a user prompt.
Design patterns are of marginal value, at best. They were created in arm-flapping response to the evident catastrophe that most programmers are unable to think for themselves. Consequently, they are given a lengthy catalogue of previous thoughts, along with finely detailed instructions about how to map their thoughts to these cast-in-stone homologues.
Here's a brilliant example of a "design pattern": it's somehow EVIL to use a global variable. So, instead, instantiate a Singleton class (which--if you're not careful--will require you to employ the brokered services of a SingletonFactory [but I digress]) and provide "getter" and "setter" methods that access the encapsulated datum. Result: instead of one line of code that's out there, on the ledge, provide fifteen lines of code that are out there, on the ledge. HOGWASH!
Many will take offense at this statement. If they but thought about it, they would realize that they have fallen victim to a sham. Design patterns are like rubrics in a "Common Core" English essay assignment: assume that the student is utterly unable to generate creative, properly structured English by himself, and so provide ridiculously detailed "guidance" on just what to say and just how to say it.
Think for yourself. That's the best advice anyone can give you, anywhere, ever.

Generator of "mind map" from files.c [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I started a while ago to learn the C language, and has spent several hours I search THE miracle software.
I am looking for software that import sources of software in C (files.c) and generates a "mind map" of the code with all files, functions, variables, etc ...
Do you know if it exists? It'll help me a lot to understand the architecture of complex software.
Thank you very much for all your answers.
Take a look at the "call graph". This sort of visualization should get you started.
As the comment suggests, Doxygen is a good open-source tool. Take a look at some output here. Doxygen is straight-forward to configure for call-graph generation under *nix. It's a little more complex for Windows. First, check out this SO post: how to get doxygen to produce call & caller graphs for c functions. Doxygen's HTML output provides a number of nice cross-referencing features (files, variables, structs, etc.) in addition to caller/callee graphs.
On the commercial side, Understand for C/C++ has first-rate visualization features. Google "c call graph diagram" for other commercial and open-source options.
Finally, there are some older SO posts, like this one Tools to get a pictorial function call graph of code. Take a look at it.
Look into the program ctags. It is an indexer of names and functions based on the structure of the programming language.
It is quite mature, and has integration with a number of other tools. I use it with an older (but very nice) text editor called vi, but it can be used independently from the command line.
It does not generate a graphical view of the connections. However, in my estimation there are probably too many connections in most C programs to display visually without creating a large amount of information overload.
This answer differs from Throwback's answer in some interesting ways. A call graph can mean a few things. One thing it can mean is the path a running program took through a section of code, and another is the combination of all paths a running program might take through the code, and another is the combination of all paths in the code (whether they can be reached or not).
Your needs will drive which tool you should use.

FUSE - detailed documentation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
trying to get my own filesystem working using fuse (filesystem in user space, linux) im really curious on where to get detailed up to date documentation of the operations used?
most time i search for other file system implementations and see what they do, but some operations seem to be not widely used like poll/ioctl or bmap.
and the documentation of the fuse api doesnt help much, cause e.g. the parameters and return values of the operations are not documented thus i have to guess how to use em
so the question is where do i get better information about how such exotic operations are supposed to be implemented?
thx
Yes, you are right, many places you can read that comment saying there is little documentation on FUSE. Perhaps that's because there is so little to document. Or perhaps the implementation is only meant for those who understand the tradeoff of userspace filesystem well enough. So perhaps you can refer to the following documentation, tutorials, slides or even sample codes for more information:
FUSE Design Document (original documentation from Sun?):
http://www.youblisher.com/p/31627-fuse/
http://wr.informatik.uni-hamburg.de/_media/research/labs/2008/2008-03-michael_kuhn-container_library_and_fuse_container_file_system-report.pdf
http://www.oug.org/files/presentations/losug-fuse.pdf
http://sar.informatik.hu-berlin.de/teaching/2013-w/2013w_osp2/lab/Lab-4-FUSE/lab-FUSE_.pdf
http://www.cs.hmc.edu/~geoff/classes/hmc.cs135.201001/homework/fuse/fuse_doc.html (tutorials)
http://www.cs.cmu.edu/~./fp/courses/15213-s07/lectures/15-filesys/index.html
http://www.cs.nmsu.edu/~pfeiffer/fuse-tutorial/
Sample code:
http://fuse.sourceforge.net/helloworld.html
And perhaps this is more research-oriented:
http://www.msrsas.org/docs/sastech_journals/archives/May2011/2.pdf
https://code.google.com/p/s3fs/wiki/FuseOverAmazon
But generally there is a lot of problems/issues (which may be solved through some complex algorithm) with implementing filesystem in userspace, which is why Linus has commented it as "toy":
https://ceph.com/dev-notes/linus-vs-fuse/
15Apr2015 update:
I just found this (and many other slides - just look at the right hand side of this webpage):
http://www.slideshare.net/adorepump/fuse-developing-fillesystems-in-userspace

Looking for a cross platform small footprint database [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have the following scenario. I need a db to store XML messages that have been created by a reader. I then want to use a transport (wcf) to read the db external to the populating app and send the messages to a central db Generally the db needs to run on mono, and windows.
I did look at sqlite3, and it seemed to fit all my requirements, but i'm reading its not so good on multi process access and t's moving away from my sweet spot, these last couple of days.
Thanks.
Have you considered just using XML to store the data? It doesn't get any more portable than that and will work fine as long your client-side storage needs are simple. E.g. not a large amount of many domain objects that need to be stored.
Additionally using an XML data store solves a lot of setup and installation headaches. You simply reference a file (or files) relative to your executable. You don't need to worry about installing db engines for a variety of platforms and then worry about upgrading.
WOuld it be feasible to give each process their own sqlite3 database? They all ultimately use the central database anyway, right?
Have a look at Firebird.
You can use it as an embedded engine just like SQLite, but it can scale to a full blown server as well.
The only drawback is, that the documentation is a mess

Decoding scuba dive computer log files [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Does anyone know of any libraries that decode one or more of the multitude of different scuba dive computer log file formats?
DAN DL7
IRIS / DRAK
Suunto
Oceanlog
Citizen
ProDive
NiTek Logic
DCDS
Ideally I'm looking for code that'll run in .NET, but I'm willing to transcode from other languages if that's the only option.
Links to articles describing formats is appreciated as well. Sample log files would be handy.
I'm considering creating an open source project for this if no such library already exists. If you'd like to contribute, please mention so as a comment or in your answer.
I have no experience with this but Google turned up the library libdivecomputer.
It supports a number of devices and platforms, and the library is LGPL licensed. However, not all brands you mention appear to be supported.
You can always try contacting the manufacturers to get the data. You might have better luck contacting the engineers specifically, if you can find them.
I don't know much about the industry, but I would suspect you can make a case for opening up their formats, because they are primarily hardware manufacturers.

Resources