Heavy App size after including ScoutMap framework - skmaps

On questioning the size of the app in development. my developer tells me that the size of the Scout Map Framework itself is 140MB which is adding to the size of the overall app.
I am not very convinced as I don't believe your own app is that large so it's a bit improbable as no one would use Scout Maps if it was that heavy.
Are we missing a trick somewhere ?

AFAIK, the demo provided from SKMaps version 3.0 includes offline region to be shown. You need to extract from assets folder. It will reduce the size if you do not want to bundle up with offline feature.

Related

VMSS Custom image pros/cons

I need to install .net framework 4.7 on my VMSS. I tried using script extension but since I need to reboot the machine after the installation, it was a bit complex.
I decided to go with custom image. I created a VM, installed the .net framework and then captured it to image. Was painless process.
My question is, it seems that if my VMSS is using custom image, I cannot update it to use a marketplace image. Are there any other things I lose by using custom images?
George! Long time no see :).
This is a great question, but I don't think it's documented anywhere. I threw together a quick blog post describing the pros and cons: https://negatblog.wordpress.com/2018/06/28/custom-vs-platform-images-for-scale-sets/. Here's the summary:
Platform images tend to allow for greater scale
Some features only support platform images
When using custom images, you control the image lifecycle, so you don't need to worry about the image being removed unexpectedly
Deployment speed can differ between the two (either way can be faster depending on the scenario)
With custom images, you can actually capture data disks along with the OS disk, allowing you to easily initialize each VM in the scale set with data
Hope this helps! :)
-Neil

Using existing database in Firefox OS app

I don't know much about FirefoxOS hence this question.
I have an android app that ships with already prepared data saved in SQLite database. In the runtime the app copies that db to the device storage and uses it for reading and writing data. This is much more efficient than creating empty DB file and inserting data when the app first starts(e.g from JSON).
I was wondering how can I achieve the same thing in Firefox OS? Is there any way I can create IndexedDB, fill it with data and then add it to the app package as an asset?
Unfortunately this behavior is not yet supported. As Fabrice Desré mentioned in bugzilla, some of the files to achieve this behaviour is specific to gaia apps, which gecko does not have access at the moment.
By now, you will have to stick with the less efficient method (depending on the size of your db, the difference isn't that big).
Hope I was able to help,
cheers

Is using Node.js or Ringojs safe for live websites?

As stated in the title, I would like to know if it's safe to develop a website using one of the actuals "omg" platforms that are Node.js and Ringo.js at their actual version.
Also, I would like to know if they support cookies/sessions and how do they deals with multi-fields post (fieldname[] in PHP).
Thank you
--Edit--
Thanks for all the links guys.
What can you tell me about Ringojs ?
Since I haven't figured which platform to start playing with. I must admit that the fact it can use Java seamlessly really impress me. The only available XSLT 2.0 library is in Java. I could use it as a templating system.
Is there anyone who had the chance to play with Ringojs?
From my experience using both, Ringo is more stable and "safer" for production use but you can comfortably deploy both. In addition to the ability to wrap existing Java libraries that you mention, you also get the benefit of being able to run it in an existing webapp container which manages the lifecycle of the application for you and ensures its availability.
That being said, it doesn't have to be an either or decision. By using my common-node package and assuming you don't use any Java libraries, it's perfectly feasible to maintain a project that runs on both without any changes to the code.
I've also included benchmarks that test the performance of Node.js vs. RingoJS the results of which you can find in the common-node/README.md. To summarize: RingoJS has slightly lower throughput than Node.js, but much lower variance in response times while using six times the RAM with default Java settings. The latter can be tweaked and brought down to as little as twice the memory usage of Node with e.g. my ringo-sunserver but at the expense of decreased performance.
Node.js is stable, so yes it's safe to use. Node.js is capable of handling cookies, sessions, and multiple fields but are not as easy to manage. Web frameworks solve this problem.
I recommend Express.js, it's an open-source web framework for Node.js which handles all of this and more.
You can download it here:
https://github.com/visionmedia/express
I hope this helped!
Examples of some of the bigger sites running Node.js
https://www.learnboost.com/
http://ge.tt/
https://gomockingbird.com/
https://secured.milewise.com/
http://voxer.com/
https://www.yammer.com/
http://cloud9ide.com/
http://beta.etherpad.org/
http://loggly.com/
http://wordsquared.com/
Yes. It is. https://github.com/joyent/node/wiki/Projects,-Applications,-and-Companies-Using-Node and https://github.com/joyent/node/wiki/modules
cookies/sessions/forms etc http://expressjs.com/ makes it easier
Ringojs is a framework developed by Hannes Wallnöver and uses rhino as it's scripting framework. There are webframeworks, templating-engines, orm-packages and many many more things already available. Have a look at the tutorial featuring a good subset of packages you may use for a simple web-application. It's not too long and straightforward.
Even thought some of those packages used within the tutorial (e.g. ringo-sqlstore]) are marked as 0.8 and come with the hint "consider this being beta" they are already very stable and bugs - if you find one - get fixed or commented on very fast.
And the power of uncountable java-libraries out there is at your fingertips - so if you already have java-knowledge this knowledge isn't wasted. Rhino - the scripting-engine - even enables you to implement interfaces and extend classes. It is possible a little more advanced but i've done it and i know of packages taking advantage of such features (like ringo-ftpserver which is a wrapper around Apache FtpServer written in java)
Another pro for me is - because ringojs is based on java - it works fairly well with multithreading with ringo/worker for example.

App Fabric Cache Monitor

With the App Fabric Cache there are limits to the number of transactions per hour. Is there any way to monitor this? Firstly for testing, to find out how much cache we will need, and primarily so we don't hit the limit and have the site go down because we can't access the cache any more.
yes, you can use the Azure Application Manager as explained in this blogpost:
http://blogs.msdn.com/b/appfabric/archive/2011/06/20/introducing-windows-azure-appfabric-applications.aspx
there are some opensource tools available on codeplex as well:
http://www.codeplex.com/site/search?query=azure%20monitor&ac=3
i usually stick to the azure provided tools..
At the moment there is nothing in the management portal or in any in of the APIs that you can use to determine how many transactions you've used against the cache in any given hour (or how many connections you're using, the other limiting factor when using app fabric cache).
If this is particularly important you might try building a wrapper around cache access and use a scalable counter which increments every time you perform a transaction.

mvc-mini-profiler - working with a load balanced web role (azure et al)

I believe that the mvc mini profiler is a bit of a 'God-send'
I have incorporated it in a new MVC project which is targeting the Azure platform.
My question is - how to handle profiling across server (role instance) barriers?
Is this is even possible?
I don't understand why you would need to profile these apps any differently. You want to profile how your app behaves on the production server - go ahead and do it.
A single request will still be executed on a single instance, and you'll get the data from that same instance. If you want to profile services located on a different physical tier as well, that would require different approaches; involving communication through internal endpoints which I'm sure the mini profiler doesn't support out of the box. However, the modification shouldn't be that complicated.
However, would you want to profile physically separated tiers, I would go about it in a different way. Specifically, profile each tier independantly. Because that's how I would go about optimizing it. If you wrap the call to your other tier in a profiler statement, you can see where the problem lies and still be able to solve it.
By default the mvc-mini-profiler stores and delivers its results using HttpRuntime.Cache. This is going to cause some problems in a multi-instance environment.
If you are using multiple instances, then some ways you might be able to make this work are:
to change the Http Cache to an AppFabric Cache implementation (or some MemCached implementation)
to use an alternative Storage strategy for your profile results (the code includes SqlServerStorage as an example?)
Obviously, whichever strategy you choose will require more time/resources than just the single instance implementation.

Resources