4 stories
·
0 followers

Amazon turns Cloud Drive into a Dropbox rival with file syncing

1 Comment and 4 Shares

Amazon's Cloud Drive was unveiled two years ago for the primary purpose of letting customers store music files purchased from Amazon. Although you could upload other files to Cloud Drive, it wasn't a replacement for cloud storage services like Dropbox because it didn't automatically sync files from one computer to another.

Today, that limitation is gone. "The new app for Windows and Mac now includes File Sync, which lets users easily store and access files in the Amazon Cloud from a folder on their computer," an Amazon spokesperson told Ars in an e-mail. "Files in this folder are automatically stored in Cloud Drive and can be accessed from a computer or the Web. When you install the app on a second computer all of your synced files are available there as well. The updated app makes it simple for users to put files in Cloud Drive and to access them from any of their computers, ensuring that they always have access to the latest version of their files from home and on the road."

Like Dropbox, Google Drive, or Microsoft's SkyDrive, the Cloud Drive desktop application (download it here) creates a new folder in your file manager. The desktop application supports all Windows versions from XP to 8 and Mac OS X 10.6, 10.7, and 10.8.

Read 4 remaining paragraphs | Comments

Read the whole story
mirkokiefer
4035 days ago
reply
Germany
Share this story
Delete
1 public comment
bodam
4036 days ago
reply
Just what I need, another cloud storage solution.
Southern California

Part I: How to Choose a JavaScript Engine for iOS and Android Development

1 Share

DISCLAIMER: the post contains my personal opinions on the subject. I would appreciate it if you could correct my mistakes.

Back to the time when I started OpenAphid-Engine, there were already several similar iOS/Android projects. These projects, either commercial or open source, expose their core features by JavaScript language. For instance, Titanium and PhoneGap allow developers to use JavaScript to build native iOS/Android apps; ngCore enables building cross platform games by pure JavaScript. JavaScript language has been chosen as a first-class citizen as it’s one of the most popular programming language. It eases the learning curve and easily attracts developers into a new product ecosystem.

How to Support JavaScript on iOS/Android

There are two main approaches to support JavaScript in an iOS/Android app. One method is to leverage the system browser component, UIWebView on iOS and WebView on Android; the other way is to compile and integrate a full-featured JavaScript engine.

Using the system component is easy to implement but it’s inflexible and inefficient. WebView provides addJavascriptInterface to inject Java classes into JavaScript context. But it only supports primitive data types which brings restrictions to API design; it’s also unstable and crashes on Android simulator 2.3 and some real devices according to issue #12987. Things are worse on iOS, UIWebView doesn’t have public APIs to support direct interaction from JavaScript to Objective-C (You have to use private APIs to achieve the same functionality of addJavascriptInterface).

PhoneGap is the most famous project that is built upon UIWebView and WebView. Developers are forced to use callbacks to retrieve return values from its JavaScript APIs, which is complex and inefficient especially for games.

Some earlier versions of ngCore also relied on UIWebView in order to support iOS. This mechanism has been replaced because of the awful performance.

In order to get better performance, flexibility and compatibility, it becomes popular by embedding a full featured JavaScript engine in native apps.

Choices of JavaScript Engines

As far as I know, four JavaScript engines could be built and ran on iOS or Android: JavaScriptCore, SpiderMonkey, V8 and Rhino. The table below lists their compatibilities on iOS and Android.

iOS Android
JavaScriptCore Interpreter only Interpreter and JIT
SpiderMonkey Interpreter only Interpreter and JIT
V8 JIT only for jailbroken devices JIT
Rhino Unsupported Interpreter

When I was searching for the right JavaScript engine for OpenAphid-Engine, my evaluation focused on the following metrics:

  • Compatibility. The engine should support both iOS and Android, and work on both simulators and devices, which requires it support both ARM and x86.

  • Stability. It should stably work on both platforms and supported CPU architectures.

  • Extensibility. Extending the engine to add native features should be easy. For example, OpenAphid-Engine required a bridge layer to access OpenGL ES from JavaScript.

  • Performance. It’s boiled down to two primary factors: fast JavaScript evaluation, and efficient binding mechanism with low overhead. OpenAphid-Engine may trigger hundreds of OpenGL ES calls from JavaScript to render a single frame. The rendering would be slow if the overhead is much more significant than normal JavaScript routines.

  • Small footprint. The memory footprint and binary size of the executable file should be small.

Rhino and V8 were out first since they don’t support iOS. I really wanted to build OpenAphid-Engine with V8, which showed great performance and elegant code structure during my preliminary experiment on Android. But I got disappointed due to the fact that V8 only employed a JIT mode while iOS doesn’t allow JIT unless on a jailbroken device. Please refer to issue #1312 if you need more technical details.

I debated a lot between JavaScriptCore and SpiderMonkey. After successfully built them on iOS and Android, I applied benchmarks and experiments to find the better one.

SpiderMonkey is available under a more friendly license, but it lost in nearly all of my measurements compared to JavaScriptCore. It generated larger binary file size (about 1.3MB larger for ARMv7); JavaScript evaluation was slower and the performance overhead of bridging JavaScript and C++ was also more significant. One more reason that pushed me away was that my build of SpiderMonkey randomly crashed on iOS simulator.

The performance of a JavaScript engine can be affected by many factors, like the version of build toolchains, the version of engines, and the OS types etc. The chart below lists the running times of several micro-benchmarks with different builds of engines on an iPod Touch 4. Please check out the Google Doc if you’re interested at the precise running times.

benchmark

  • JavaScriptCore is the clear winner by a large margin.

  • I failed to find my build of SpiderMonkey, so I used three other custom builds from Cocos2d-iPhone-2.1-beta4, Cocos2d-x-2.1-beta3 and iMonkey.

  • All test apps were built with LLVM 4.1 in release mode; all engines were running in interpreter mode restricted by iOS.

  • Explanations of some benchmarks:

    • 1m-js_loop runs an empty loop for one million times.

    • 1m-native_function invokes an injected native function for 1M times while the native function simply returns undefined.

    • 1m-js_function is similar to the one above except the function is written in JavaScript.

    • fib(30) calculates Fibonacci(30) in a recursive manner.

    • sudoku-5 solves five Sudoku problems with the algorithm from this project.

  • 1m-native_function for JavaScriptCore was implemented by its portable C APIs, which is not the most efficient way to inject native functions.

  • SpiderMonkey is fast on desktop with its advanced method tracing JIT. But it’s a whole different story on iOS devices.

  • The build from iMonkey was faster than other SpiderMonkey builds in most benchmarks.

  • It’s definitely possible to get better performance from SpiderMonkey on iOS. ngCore 1.10 for iOS managed to embed a custom build, which outperformed other SpiderMonkey variants.

Adventure with JavaScriptCore

My study proceeded further after I settled down with JavaScriptCore:

  1. The running time of 1m-native_function was over six times longer than 1m-js_function and 1m-Math.abs(0) on JavaScriptCore. I also observed the similar performance issue on accessing properties of injected native objects.

  2. The C APIs had a clean design but was lack of flexible memory management APIs. It seemed difficult to resolve issues caused by circular references without deeper cooperation with the internal garbage collector.

  3. There were many release versions of JavaScriptCore available. The best one should be fast and compact for OpenAphid-Engine.

I abandoned the original plan of using the C APIs in order to solve problem 1 and 2. The version of JSC from iOS 4.3.3 was used, as it’s faster than the version from iOS 5 in interpreter mode with a smaller binary executable file.

Engines Used in Other Products

During the development of OpenAphid-Engine, I always kept my eyes on other products. The table below summarizes the JavaScript engines they are using underneath.

iOS Android
ngCore 1.6 and above UIWebView V8
ngCore 1.7 and later SpiderMonkey V8
Titanium JavaScriptCore V8 or Rhino
PhoneGap UIWebView WebView
Cocos2D-x JavaScript SpiderMonkey SpiderMonkey
CocoonJS JavaScriptCore JavaScriptCore
Ejecta JavaScriptCore Unsupported
directCanvas JavaScriptCore No clue

Next Story in Series

I will post my opinions on comparing ngCore to OpenAphid-Engine. Stay tuned!

Read the whole story
mirkokiefer
4040 days ago
reply
Germany
Share this story
Delete

Frustrated with iCloud, Apple’s developer community speaks up en masse

1 Comment and 2 Shares

Apple's iCloud is marketed to us end users as a convenient and centralized way to manage data on all of our Macs and iOS devices: sync contacts and bookmarks, re-download music and apps, back up iOS devices, and sync documents and data for third-party apps as MobileMe did. The last item, syncing of documents and data, is one of the least glossy features of iCloud, but it is one of the most important, and it should be among the most straightforward. Right?

Perhaps not. Almost a year after Apple shut down MobileMe for good in favor of iCloud, third-party developers have begun to speak out about the difficulty involved in working with Apple's cloud service. A piece published at The Verge this week highlights many of those complaints, with quotes coming from well-known developers and anonymous sources alike about the challenges faced by the developer community. From data loss and corruption to unexpected Apple ID use cases, developers have seen it all—but are stymied by the persistence of problems that prevent them from shipping products with working iCloud support.

What's the big problem, exactly? According to Bare Bones Software's Rich Siegel, there are a number of moving parts to iCloud that all affect how things come out on the other end.

Read 10 remaining paragraphs | Comments

Read the whole story
mirkokiefer
4040 days ago
reply
Germany
Share this story
Delete
1 public comment

Why Developers Shouldn’t Use iCloud Syncing, Even if It Worked

4 Comments and 6 Shares

Brent Simmons, again:

Here’s the thing: half the mobile revolution is about designing and building apps for smartphones and tablets.

The other half is about writing the web services that power those apps.

How comfortable are you with outsourcing half your app to another company? The answer should be: not at all comfortable.

Don’t take Brent’s word for it. Consider Tim Cook’s doctrine: “We believe that we need to own and control the primary technologies behind the products we make.”

Read the whole story
mirkokiefer
4041 days ago
reply
Germany
Share this story
Delete
4 public comments
gkoehler
4040 days ago
reply
Yep.
satadru
4041 days ago
reply
The alternative to own and control is of course, be able to modify it as needed.. hence the usefulness of open source and a permissive open source license...
New York, NY
jtsnyc47
4041 days ago
Useful to .0001% of the population, hence the market success of the FSF movement in general.
satadru
4041 days ago
But Brent Simmons is a developer, and he's talking about having control of the technologies one is dependent upon. And because of that rationale, open source unix is extremely successful. "Of the 1.07 billion consumer computing devices shipped in 2012, Google Android took a 42% market share." And Android is not only open source, but it is run on top of linux, which is also open source. (source: http://en.wikipedia.org/wiki/Usage_share_of_operating_systems#Summary ) And that doesn't even count embedded devices, where linux reigns supreme...
jtsnyc47
4041 days ago
Android is open source? LOL. http://www.tested.com/tech/android/2693-why-critics-claim-android-os-isnt-really-open/
satadru
4041 days ago
Commercial openness is always a battle between competing interests. I'd dare say it has gotten more open in the two years since that last article. And you won't find iOS on that list at all...
jtsnyc47
4040 days ago
Even though it's also based on Unix, which is heavily drawn from Linux? A slippery slope, my friend.
satadru
4040 days ago
iOS and OS X are based upon a mach microkernel with a (fairly dated at this point) FreeBSD userland, which is BSD licensed. But the last 4 or 5 versions of OS X have gotten more and more closed. The NeXTStep based UI has never been open source, in contrast to the UI on android which is open source. Reimaginings of Android, such as Cyanogenmod, MIUI, Amazon's Android OS or even the new Firefox mobile OS are impossible using the code that is available for iOS. Which is why all of those OSes are built on Android and linux and not on iOS.
spudicus
4040 days ago
I think that there are potential problems with any cloud service that are not mitigated by open source. Unless I am running my own servers, I am relying on a third party for data storage and remote functionality and as the situation with Google Reader has proven, that can go away at any time. Thankfully google made it simple to retrieve my feed data.
steingart
4037 days ago
I think you're conflating control with open. iCloud isn't a good solution because it only works with one platform. AWS isn't open, it's just agnostic. Amazon does all sorts of stuff behind the scenes, god knows what. But it works with everything.
satadru
4037 days ago
Good point.