Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have a monitoring web application which has a .Net Backend and a Silverlight frontend. The application crunchs big chunks of data, process them and presentates to user. Then user can interact with the data to see different graphs of log. He/She can unselect dimensions, group some values, choose metrics like transaction count, transaction amount(dollars) etc.

Currently, I combine log data into 3 minute chunks. Then making a lookup from it and sending to clientside. With this raw form of data it's size is optimized for network. On clientside I have a lot of business logic to process this data for presentation. Also when user changes options clientside processes the data according to user's choices.

We have chosen this path to serve this application only from one server. We don't have to scale with the user amount in the company because the whole thing happens on the clientside. This is good but we are sacrificing performance.

I'm really curious about what is going to happen if I choose to do the all computation for user's choices on raw data at the serverside.

-Is it going to be faster? -Do I need to scale immediately? -Is Fetching the data only once on the server then caching it something like redis than doing the computations according to user requests better solution? -If clientside approach is good, do I need to switch to Javascript and Javascript client side MVC frameworks like AngularJS?

And I really don't know how to write the my whole business logic in Javascript at the moment.

Extra Info

Average desktop has 2gb ram and a dual core cpu which is core to duo.

Our servers are in VM cluster. They have scalable ram min 8gb. And 8 core xeon cpus.

100-150 concurrent users can use it.

Every user can do different manipulations on the data. That's why they all have their own data on the clientside.

Thanks

share|improve this question
    
We need more information here I think. How much faster is your server than the average desktop? Are the users all doing roughly the same operations on the data, or is every user different? How many users could be manipulating data at once? –  Ampt Jul 26 '13 at 22:14
1  
Hi, you can find extra info now :) –  Xelom Jul 26 '13 at 22:30

3 Answers 3

up vote 0 down vote accepted

About Offloading processing to client side: Can the client machines handle the business logic processing smoothly? Does other applications (outlook, VS, eclipse, etc) suffer because of the heavy silverlight application?

If the client machines have trouble running the silverlight application, then you need to take some processing to server side, maybe do some conversions from the raw data and send more streamlined data (e.g. JSON/XML) to the clients.

If the silverlight application works fine without impeding your users' work, then it's perfectly OK to offload the business logic to clients since you are saving server side resources.

To answer your questions:

Is it going to be faster?

It will be faster on client side but slower on server side. You might need to upgrade the VMs.

Do I need to scale immediately?

Your server will be processing more data than it used to, so you might have to scale if you see its getting slower.

Is Fetching the data only once on the server then caching it something like redis than doing the computations according to user requests better solution?

If different user requests fetch the exact same data into the server multiple times, and if fetching is a slow operation, then it is a very good idea to cache it. Based on the amount of data you might use storage systems like Redis.

If clientside approach is good, do I need to switch to Javascript and Javascript client side MVC frameworks like AngularJS?

If you have a standardized set of client machines, then Silverlight is good. You might have to think about javascript based clients if you have Linux, Mac, or Windows systems without Silverlight. Plus, Silverlight and other RIA frameworks are much faster than javascript when you are implementing heavy business logic on the client side.

share|improve this answer

How you are sacrificing performance? By sending data to clients? I think it is a lot easier to feed clients with data then spent time on task switching. You have 100 to 150 users, ehm I would go with saying "paralelize when you must not when you want". On server you would have to check probably for some thread stuff like deadlocks and other, just send data to clients and those having 2 gigs of ram and stuff would be happy.

Other way upgrading clients with hardware would be probably cheaper than using developers time to move logic from client to server, specially if you would get into "weird things" and as you said, you would have to change to JS which you are do not know what to do. Think about time cost also, but probably manages do not care about it, but if you would tell them to upgrade clients hardware they would go creazy.

share|improve this answer

It probably won't be faster to do the analysis on the server and would recommend keeping as is unless there are some other pressures to do otherwise. You would increase the load on your servers if it is doing a lot of computationally-intensive operations.

On the client side you could delay moving to JavaScript until there is a real need (for example tablets) but if it's now only used on Windows desktop applications there wouldn't be any compelling reason to do this quickly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.