Previewing Our New Cloud Services:

Previewing Our New Cloud Services: Earlier today at the Sourc{ conference in Split, Croatia we previewed two new cloud services from Sencha. To distinguish them from our SDK’s and tools we’re calling them “” services. The goal of services is to provide common application functionality as cloud services so that application developers (particularly mobile application developers) don’t have to reinvent the wheel every time they want to make an app. Our first two cloud services solve two common problems for app developers – resizing images for different mobile screen size/resolution combos, and making offline and collaborative data synchronization easy.

h3. Src

A diagram illustrating how Src distributes optimized images to mobile devices of any screen size.The first service we introduced was Src, which helps mobile apps resize images for the ever increasing number of mobile screen sizes. We’ve previously done a lot of work in Sencha Touch to make your UI resolution independent, io Src expands this to include your image assets. And it’s easy to use, simply add in front of your IMG tags and Src will automatically scale the image appropriately from the origin to the right size for that mobile browser. The benefits of using SRC is that the browser doesn’t have to resize a one-size-fits-all image inplace (which helps performance), or download more image than it needs (which improves latency).

Not only does Src perform automatic manipulation based on the device’s screen size, but it also has a complete API to let you customize how to scale your image, ranging from simple scales and skews to using it within data URIs. To ensure the best performance in a mobile scenario, original and resized images are cached by Src for 24 hours and the correct caching headers are sent to the mobile browser. If you’re familiar with tinySrc, Src is built on the same codebase and technology as tinySrc, which already serves millions of requests a month helping hundreds of mobile sites deliver a better experience.

Best of all, we’re excited to announce that it’s available today and at no cost for any reasonable usage. We’ll be bringing premium features to Src in the future, but rest assured that the basic service will be free forever.

If you’d like to check out Src in action, head over to Teagrams and see how the Teagrams app uses Src to dynamically resize images from Instagram. You can take a look at the source on Github as well. Teagrams is best viewed on a tablet. We’ll be be making the full documents available later this week.

h3. Sync

A diagram illustrating how Sync handles data input and output for your users on your web application. We also previewed Sync, our multi-master synchronization service that allows Sencha Touch apps to take their data offline and sync their models. We decided to start work on Sync after hearing from developers (and from our own experiences!) how unreliable mobile networks can be. Since Sencha Touch and the entire Ext JS platform is moving to a MVC pattern we realized how well built the “M” in our architecture was suited to enable apps to go offline and sync as well as to collaborate on a shared data set.

Using Sync, apps can operate offline, ensuring that all writes made to the local storage are replicated to the cloud master; apps can use Sync to backup data so the cloud has a replica of everything that’s in the client, and to recover data if the mobile data set gets lost. Better still, since Sync is multi-master, if an app expects a user to be on multiple devices, the data set can be edited and synced seamlessly between devices; or, if the app is multi-user, the same data set can be edited by multiple users from their own mobile devices.

Essentially, Sync provides the app with a distributed object store. A complete replica of the entire object store is available to each client, and each replica can receive updates and exchange updates with its peers through Sync. Think of it as peer-to-peer Sync in the cloud. If you’re interested in seeing some demos, open two browsers (e.g. Safari and Chrome) and open a tab in each for either Contacts and Crosswords. In Contacts, you can edit the data of the address book, replicate it to Sync, then hit the circle arrow in the other browser and the changes propagate. In Crosswords, each change is replicated and automatically synched between each client allowing multi-player gameplay. Sync is an state-based object replication (SOR) mechanism. There are many other flavors of replication and synchronization, but we think SOR is the most widely useful and applicable synchronization scheme that can work with a wide variety of apps. Unlike log or diff based replication, SOR can lose intermediate updates without corruption – which is handy when you’re on a semi-connected network. It’s also a more general purpose synchronization scheme than niche-ier approaches like Operational Transformation, which is most useful when doing synchronization within a list-object – for example Google Wave-style live collaborative editing.

We’re in the early stages of Sync and it’ll evolve as we work to get customer feedback. As of today Sync is in limited preview and we’re opening invitations for people who are interested. For more information and to sign up, please visit the page.

h3. Road Map

We’re excited in the coming months to share more about this new set of cloud services from Sencha. Src is available today and over the next few months we hope to expand the feature set and build out premium features that continue the mission of helping developers manage the complexity of mobile devices and enhance the speed of mobile delivery. Sync is in limited preview and we hope to role out a larger beta in the later summer.

Lastly, since this is a developer preview, please understand that everything might change. We want to make sure we’re sharing where we’re going with our community early and often so we can incorporate feedback properly. We look forward to seeing how you use the cloud services! Request an invitation today!

Written by

Aditya is Sencha's vice president of product marketing and is responsible for the product planning and strategy for Sencha's product lines. Prior to Sencha, Aditya held various senior product management roles at Adobe and Microsoft, focusing on developers and media in the mobile and consumer electronics space.


  1. says

    Just requested an invitition, was redirected to homepage after that without any confirmation message. Just a heads up that that might be a sign that the request doesn’t work? (I’m on iPad)

  2. Dmitriy Pashkevich says

    >Think of it as peer-to-peer Sync in the cloud
    I don’t get it, how come it’s p2p when it syncs _through_ a master server in the cloud?

  3. says

    Every day is a Sencha news day! Great work :).
    I really want to make some test to deeply understand how Sync can be used uinside my applications.
    @Steffen – I have been redirected to HomePage too without any message after requesting an invitation. I hope it was received successfully.

  4. Phillip Moore says

    Sounds very interesting! I can think of some good uses of Sencho.IO Sync for some of my ExtJS projects!

  5. says

    How do you handle race conditions in the Sync service? Say for instance two (or even more) people update the same object at the same time?

  6. Aditya Bansod says

    @AwesomeBob — we’re trying to keep it as simple as possible. The default rule is last write wins. In the event they’re non-conflicting changes (e.g. two JSON objects that aren’t overlapping) we do a merge against the same ID. Our goal was to not over engineer it.

  7. skeptic says

    I worry that if you guys go too broad with your product range you will become a Jack of All trades – master of none. I can see the relation to your other products, but this is pushing it. Not trying to be a downer. Glad you guys are innovating. Haven’t been disappointed yet.

  8. says

    @Justin State-based refers to the objectstore replicas exchanging assertions about their state, rather than exchanging operations that occurred at those replicas. There’s not a great deal of documentation on the web about this kind of architecture, other than general distributed systems texts, and academic papers. The most public similar system is the Xerox Bayou project in the early 90’s. It informed, or preceded at least, various implementations of multi-mastered directory servers, including Novell’s, Netscape’s, and Microsoft’s.

  9. dukeyboy says

    @skeptic I have to agree – another product from Sencha when extjs is unpolished, incomplete and poorly documented?

    These guys are doing too much and not focusing on their core, to their detriment.

  10. gkatz says

    using sencha io SRC, my PNG images were resized to a smaller size but more then quadrupled in size!!
    test was made with safari on windows. here are the results:
    original image: dims 444×323 , size on disk 21.13KB
    SRC image(changed user-agent to IOS 4): dims 320×233, size on disk 130.78KB

    is this how its suppoed to work? looks like the transcoders might not be optimized for some image or something.

  11. gkatz says

    using safari 5.0.5 and the image in address
    if you open 2 tabs, one regular and one with user-agent set to ‘Safari iOS 4.1 – iPhone’
    you can see that the image, although smaller in dims, goes from ~23KB to ~127KB

  12. says

    @gkatz – I’ve tried resizing that image in a variety of image applications, and it consistently balloons in size. Even just trimming 1 pixel off the width pushes it up to nearly 10 times the original size. I’ve also tried compressing a 443px PNG (vs the 444px), and the discrepancy remains:

    I think this is because the original bitmap is so carefully matched to the raster (if you see what I mean) – there is no antialiasing at all on the country borders, for example. The minute the image is slightly resampled, there are many more blurred edges (and also hence colors) which the PNG compression is far less efficient at handling.

    So my suggestion to you is to force to switch to using JPEG for the resized image. This is a far better format for any size (other than the original) although slightly lossy. You simply add /jpg/ to the URL like this:
    (which is 31k)

    (which is indeed 127k)

    We just rolled out the ability to set JPEG compression levels too. It defaults to 85 (e.g. above), but you could increase or decrease the quality by placing a number between 1 and 100 after the ‘jpg’ token in the URL:
    (best quality, 63k)
    (moderate quality, 16k)
    (worst quality, but only 2k ;-) )

  13. gkatz says

    Thanks James!
    I figured the complete API of Src would allow many manipulations that would help.
    As far as my PNG compression go. I dont really know the technical stuff but i would say this:
    the image was compressed using the Java Image IO package. code was written a long time ago but I did play with it a lot to get the best output i could so i can say the image was already super optimized which might support your explanation.
    thanks for the help and I am lookoing forward to working with Src.

  14. Piet Crombach ( pcr) says

    This is already done by Google. If Sencha really want to do something new create a image (png, jpg, img) to SVG server

  15. gkatz says

    @James two final questions:
    1. are Src & Sync both considered a developer preview? should I wait a bit before I roll out an app using the Src API as mentioned in the blog and your example?
    2. can you drop a word on performance of Src (with regard to transcoding time and other related asspects)?

  16. says

    @gkatz presents the same API as tinySrc ( which has been running for several years. The API and service should be considered stable and highly available. (Performance is obviously dependent upon size of payload, location, your server’s own response, and other factors) is a new addition, hence the reason it’s been launched in a preview status.

  17. says

    How would this benefit me more if I have already written my own in-house image processors and the server code to auto-detect the client details? How does this improve latency and client performance if my servers already serve the code/img optimized for the presentation device?

    I’m assuming you’re attempting to compete directly with TinyURL/TinySrc services. Neither of which I have need of.

  18. gkatz says

    @James, does your server support gif images? it seems like when trying to access gif images your server will transcode it to PNG…

  19. ken says

    It sure takes a long time to load Contacts in chrome. Contacts & Crosswords doesn’t load in firefox.

  20. ken says

    Thx for your reply. From the above article
    >If you’re interested in seeing some demos, open two browsers (e.g. Safari and Chrome)
    Maybe change that sentence to “webkit” browsers and/or do a browser-detect in the apps.

  21. says

    Hi, Sync is very interesting and certainly an area ripe for development.

    My query is – can I run my own instance of Sync? What if I have data that I don’t want to entrust to go through your servers? This is a very common requirement and very poorly serviced by Cloud providers.

    Regards, Julian Knight

  22. says

    @Julian, there are no plans to provide this as a product for yourself, since we think its most valuable for those times when there is only a thin server or none at all (e.g. web apps in a store). Nevertheless, most server languages and frameworks have image resizing libraries, such as ImageMagick, libgd, PIL etc that would let you do this under your own control (and DeviceAtlas can also be installed locally)

  23. says

    @Julian Sorry – I misread your question as regarding the src service, not sync :-)

    Currently the same limitations apply however. It is only available as a service, not a standalone product.

  24. gkatz says

    Hi guys;
    so i have an app that uses sencha io for image manipulation.
    works perfect with iPhone and Samsung galaxy but it seems like on Motorola phone (specifically milestone) the picture returns blurry as hell. i guess its because sencha io manhandles it to the point its un-viewable. do you guys know anything about this behavior? i don’t have any Motorola phone at my disposal so its hard for me to check (but i got several complaints already – all from Motorola phone users).
    thanks in advance.

  25. says

    @gkatz, the most important thing is to determine the user-agent of the device. In the meantime, I’ll push an update to the device capabilities database to see if that helps resolve things for you

  26. gkatz says

    thanks guys;
    @James, can you comment once the update is pushed?
    also, I will have access to one of the devices with the problem later today and will try to extract data from it

  27. gkatz says

    if I give you the exact hour of request to images that “went wrong” will yoiu be able to look it up inyour server’s logs?
    also, when you forward the request to you forward it with the original user-agent? if so, I will be able to look it up in my server logs also,.

  28. says

    @gkatz hi, yes, we keep logs, so if you can give me the domain of your site or URL of the target image, I should be able to narrow it down. Timestamp would be very useful.

    PS the latest device database update was pushed yesterday

  29. gkatz says

    checked again with the motorola phone – picture is still blurry to the point of unusable even after your push.
    on July 6th, I have requested aproax 4 pics from sencha IO, all pics urls have the token ‘newNavy.gif’ in the original URL.
    the time of the requests was approax 22:03 (GMT +3).
    hope this helps.

    I also took a look at my server’s access logs and If I understand my server logs correctly I see the following strange behavior:
    1. JSON request is made to get a list of images, the request is as follows: – – [06/Jul/2011:19:03:32 +0000] “GET /json/navyService?_dc=1309979011589 HTTP/1.1” 200 560 “-” “Mozilla/5.0 (Linux; U; Android 2.1-update1; he-il; MB525 Build/JRDNEM_U3_2.59.0) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17”
    2. then the image request is as follows: – – [06/Jul/2011:19:03:36 +0000] “GET /chart?filename=newNavy2253958538123485090.gif HTTP/1.1” 200 18135 “-” “AppEngine-Google; (+; appid: tinysrc)”

    it is very strange – looks like the image is loaded from a diferent user-agent than the one that requested the json data (even though they are supposed to be the same. is this a know thing?
    can this cause the problem? I am not a 100% sure of my analisys (there are a lot of logs so I had to really dig into this)
    thanks in advance

  30. James Pearce says

    @gkatz I updated the API and that UA is being detected now as having a width of 320px (rather than 120px) so that should help you. I can’t test your exact example without knowing your domain name :-) but I think you’ll see it resolved – at least once any caching expires.

  31. Fabio says


    Thanks for your great work but what do you mean exactly by “at no cost for any reasonable usage” about SRC ?


  32. Aditya Bansod says

    @Fabio — for most web sites, both commercial and personal, Src is available free of charge. We don’t plan on charging for the basic image resizing service, but I say “most” as it covers us in case of abuse of the service.

  33. Fabio says

    @Aditya—Thanks for your answer but it would be great to define what “abuse” is. For example, if I plan using your service for a 1 billion images loaded per month, is it abuse ?

  34. Aditya Bansod says

    @Fabio — we’re looking to publish an acceptable use policy soon. In the mean time if you have specific needs, contact me at aditya [at] sencha [.] com.

Leave a Reply

Your email address will not be published. Required fields are marked *