Tag Info

New answers tagged

2

It's about scheduling overhead, and about how some solutions fit specific problems better than others. Scheduling is the activity of deciding who is executing right now, and switching between processes/threads. Cooperative scheduling is simple to implement, and requires that each participating thread must yield to the scheduler when a sensible pause state ...


1

All thing being equal, user space will have fewer layer of abstraction to work through. OS thread will require relatively slow calls through the kernel. User space, done correctly will avoid these abstractions. This results in the opportunity for higher performance.


0

What you're describing is a reverse proxy. CORS allows cross-origin reading of resources, but it does not allow cross-origin iframe reads. However, if your reverse proxy serves permissive CORS headers (e.g., Access-Control-Allow-Origin: *), then the contents of your reverse proxy will be readable with an Ajax request. You simply need to make an Ajax request ...


0

How to safely make a specific port on your computer accessible to the outside world is dependent upon a bunch of things in your computing environment and requires configuration changes specific to that environment. Here are some of the issues you will have to deal with: You need a non-changing public IP address that can be used to reach your host. Most ...


0

HTML as well as JSON are not "programming languages". HTML is a Markup Language, and JSON is more of a "Data structure". They are "standard ways" to organize information. They're not the tool to organize it. Since you are considering JSON and HTML, JavaScript seems like a pretty good approach (Albeit you could use PHP or Ruby or whatever). For starters, ...


0

The right way to do this is move to a CI server which produces minified code upon every commit. Bundle the code up in some sort of archive (tar/zip/whatever) and stash that somewhere like S3. Now you use those artifacts across all environments, from dev up to prod. If you run unminified code in dev and QA, minifying only before deploying to prod, then you ...


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 ...



Top 50 recent answers are included