After learning the kind of problems people were having with mofowallet we decided to take a good hard look at what is actually going on in this enormous pile of code that we wrote and designed in the short period that it took (6/7 weeks in total). Such a short period for the amount of code that is mofowallet is probably as short as you can get it and it is no surprise that there were/are bugs.
As you may have noticed (or not) mofo has been a bit slow to work with, it's not snappy so to say.
A major design flaw that we didn't foresee was to rely on the browser to manage the starting, stopping and queueing of network requests (AJAX requests) this works fine for smaller projects but not for a network hogging beast like mofowallet. Until both FIM and NXT JSON API's are optimized for mofowallet (in some rare cases) mofowallet simply cannot display all the info that should go on a page without doing 20 or more AJAX requests. That said the second time you view that same page the data will be there instantly because of the use of the client side IndexedDB database. But lets continue.. The slowness of mofo was due to a pile up of (AJAX) requests that quickly consumed large parts of the browsers memory. So far, not good.
A second shortcoming was the inability to either prioritize or compartmentalize (AJAX) requests. Let me explain.
If you're on a slow connection and you just opened a page in the mofowallet blockexplorer you could easily kick off 20 to 30 (really small) network requests, each weighing some bytes each. No problem there, just let it load. But what if I click on an asset in the blockexplorer or on an account? If the clicked item's data is not in the database it means we have to fetch that from the network (from one of the public nodes) in the old situation the request for that data that you want to see now
had to wait until all previous 20 to 30 requests were done loading. Not ideal, not snappy.
A third shortcoming was the quality of the public nodes, some were down some were on forks, in short a mess. But thank god for that mess! Since now we have solution for that that will keep working even when people start adding their own public nodes. (Did you know mofowallet workded like that? There is not one single NXT or FIM API server, in fact there are many. Mofowallet comes loaded with 14 public FIM nodes and it's easy to add your own. Mofo will optimize communications between those servers to give the best experience possible on a thin client).
Sow how did we solve that?
1.) Mofowallet no longer relies on the browser to schedule it's Ajax requests. There is a service for that now (for the scripters out there; there is a copy of that service here http://paste.ubuntu.com/8952187/
- the prose about podiums and actors is something I use to conceptualize the problem in my mind) the service only runs 6 simultaneous Ajax requests at a time and allows for full control over all pending and active requests.
2.) The new request handling service allows to prioritize requests based on a priority value you give each request. Requests with a higher priority get executed before requests with a lower priority. To compartmentalize requests we introduced the concept of a podium (the requests are the actors that perform on a podium) this was needed to quickly give priority to or completely delete a podium. Such an action can be expected when you navigate from one block in the blockexplorer to another, the requests for loading the transactions in a block go in their own podium. When you navigate to the next block all remaining transaction requests are instantly destroyed. This way prioritizing what a user needs now
3.) To solve the public node badness and the forking problems we introduced another new service in mofowallet. The startup service, other modules (or plugins that you write) can register with the startup service to do things before mofowallet is fully started (the startup service will show a nice progress window). One of the first startup modules we added was the Fork Scanner
this code will ping all registered public nodes and builds an in-memory graph from the data it gets back. It then calculates a median height shared by most nodes and then does a second scan but now for a specific block height. The returned data tells us exactly on what forks each public node is. We then blacklist those nodes and that solves a lot of weird behavior.
You can check out the new mofowallet online only for now. I'll prepare a desktop version tomorrow or the day after. For now please try it out (especially the blockexplorer) and let us know if it works better for you. There are more speed ups of mofo on the way since the new priority feature for requests has not been turned on everywhere.
I have indicated a week ago that around this time we would release an Asset Exchange enabled mofowallet. Unfortunately this has to come later because of the mandatory fixes I described above. We figured that since everything builds on top of the networking layer it had to be done first before continuing with the rest of mofo.
New version here http://mofowallet.com
, online only. Download will follow in the coming days.
It could be your browser cache keeps showing the old version. in most browsers/OS's you can hit CTRL+F5 to refresh your browser cache.
If you have any problems loading pages or you have to wait a long time.. Simply refresh your browser, refreshing your browser will scan the public nodes again that could have been blacklisted the last time you loaded that page. If in doubt look in the Settings / Node
section to see if the public nodes are considered to be on a fork