Nope there is a OS (Earth) running several large business programms (Cities). The hotel is one of many subsystems of said program. And it should make sure that it will continue working because cost of hour of idling is larger than my yearly payment.
I thought the Earth was the basement with all the servers (cities) in it?
MiiNiPaa wrote:
But how should program handle sudden HDD failure in a middle of writing several days works result? And should it?
It shouldn't, because it shouldn't be saving several days of work - it should save more often than that and not overwrite existing data. That way a worst-case non-recoverable failure is not a setback of several days, but of only an hour or less, depending on the size of the data being saved and the optimizations to minimize that.
I thought the Earth was the basement with all the servers (cities) in it?
It will be universe.
it should save more often than that and not overwrite existing data
That was a real example. System in question in in the middle of forest and you have to drive to in once a week and dump data on portable storage using COM cable. No GSM coverage, no possibility to connect it to the network, no budget to place storage device and power it, no way to change hardware (to make it at least suppot USB)
> I thought the Earth was the basement with all the servers (cities) in it?
It will be universe.
I thought the universe was the company that owned the basement with all the servers in it?
MiiNiPaa wrote:
That was a real example. System in question in in the middle of forest and you have to drive to in once a week and dump data on portable storage using COM cable. No GSM coverage, no possibility to connect it to the network, no budget to place storage device and power it, no way to change hardware (to make it at least suppot USB)
Wouldn't you be copying the already-saved data? Where does it store it in the first place?
I thought the universe was the company that owned the basement with all the servers in it?
It will be some highe dimensional world...
Where does it store it in the first place?
RAM. It does not any actual storage aside from ROM where program is written. System should be restarted regulary to do hardware self-test and reset some data which cannot be accessed programmatically. COM-IDE HDD rack was old as hell and could disconnect because of slight tilt.
We actually rip HDD out of it after successful writing and connect it to the laptop to backup data if said HDD decides to die before we return to the institute. And if it dies before backup we should connect to the system and prevent it from rebooting in 1-minute grace period after dumping data; and quickly search for new one. In the middle of forest. We increased it to 5 minutes when we get permission to update program, so we had not to be in a rush.
they seem like another novelty feature, not totally necessary. ANy high performance app doesn't use throw or exceptions especially in the game iindustry. Assert() with logging is a better alternative imo. I can see how exceptions can be useful in business type apps where you deal with users typing invalid sh!t.
ANy high performance app doesn't use throw or exceptions especially in the game iindustry
LOL. Exceptions, at least how implemented in Java, don't incur any runtime overhead when they are not thrown, contrary to Assert with logging.
I can see how exceptions can be useful in business type apps where you deal with users typing invalid sh!t.
Yeah, and then we see games that hang or crash if a user has wrong version of DirectX, unsupported hardware or his game DVD is scratched and the game can't read the textures. Instead of displaying nice error message with instructions how to fix that. ;)
Exceptions are usually used for something more exceptional than dealing with users typing invalid sh!t. You don't use exceptions for something very probable like that.
@rapidcoder Actually Exceptions (the try block) does cause quite a significant amount of overhead. One of my population models is 100% faster when I disable exceptions. This brings runtime down from 2 seconds to 1 second. Which in an MCMC saves 11 days run time...
@DeXecipher is correct that they are not preferred for high performance computing because of the overhead.