Tag Info

New answers tagged

0

So the "PHP" way to do it is via the pcntl (Process Control) extension. This extension is NOT supported on Windows, so it must be used in *nix environments only. That being said, pcntl_fork is where the magic lies. While there is a third-party extension for threading (vs. forking) in PHP, it is not officially supported, not well tested and not being ...


1

You can write a shell script to do this. Run app1 and redirect the stdout and stderr to a file. Check the exit code, if fail, exit. Same as above. for running app3 and app4 parallely, you can run it in background. To capture the output and return codes, you should take a look into bash coproc (http://wiki.bash-hackers.org/syntax/keywords/coproc). Redirect ...


2

I can think of a few reasons to expose the class and not the singleton instance. Testability of the service Reusability of the class Life cycle management of service instances If you are purposefully hiding the class constructor, how can you ever write unit tests that exercise only its code and none of its dependencies (its constructor arguments). You ...


2

Using try/catch for logical branching is not recommended in general, but there are legitimate uses. One example, when you have to query a third party API, and there is no other way to access it. To keep you code more readable, you could encapsulate the try/catch in single, isolated function like function GetSomethingFromThirdPartyApi(parameter, ...


0

MEAN.JS is a full-stack JavaScript solution that helps you build fast, robust and maintainble production web applications using MongoDB, Express, AngularJS, and Node.js. So, I suggest looking for the right node module (use npm) which can handle the S3 connection with your node.js app


1

The codependency module may be what you're looking for, or anything that does something similar to: declare optional dependencies in package.json that aren't automatically installed by npm install, say optionalPeerDependencies a custom require-style function that knows about optionalPeerDependencies and does the right thing, including throwing/warning when ...


0

I've implemented SCrypt libraries both on the clientside and serverside using js-scrypt and CryptSharp, and found the results shocking. With chrome, execution time was over twice as fast as the .net implementation. I never really paid much attention to the V8 engine until I observed these performance results, but now I have a very healthy respect for ...


10

Let's have a look at the second claim. The JavaScript reactor pattern will always handle concurrency better than any multi-threaded application. To address this claim, I'm going to assume that concurrency in this context equates to scalability, since scalability is one of the primary motivations behind Node.JS. The distinction is subtle, but ...


1

My insight in this matter might not qualify for a full answer, but I think you are comparing to valid approaches, who's differences aren't a matter of style, but of solving different problems. If you fear of trying to do C# in Javascript, maybe you should start by questioning a more essential premise of yours: In my app, obviously I need objects. ...



Top 50 recent answers are included