Skip to main content

Best Can Still Be Improved

In my project, I am also one of the guys working on re-architecting one component. In fact we saw this component performaning very well when we put it in use, but still we wanted this to be more powerful, faster and robust. You can say, we are religiously following the saying “Best can still be improved”. Our component is now able to process 34 records in 1 second, but our expectation is to boost this up to 60-70 records per second. We have few challenges to operate on now, optimal performance, scalability, loosely coupled for easy integration with other components/applications.It is like, tie your hands behind your back and fight! If I am thinking of loose coupling, I have to compromise with performance, if I ignore scalability, I will have simple design which will have less layers (tightly coupled) and execute faster. I term this as a circular problem, if you do one thing other will get screwed and if I take care of other, main thing may not work as expected. But, what’s the fun if problem is not rigid? Right now, performance is the highest priority for us. We are identifying the areas where we can improve performance and later we can think of scalability. As of now, we are tweaking the code written and optimizing for less memory and CPU cycle consumption, efficient multithreading where ever it fits properly, because creating too many threads may give negative results (too much is too bad), creating isolated application domains for better stability, creating shared components and making sure it is of single instance irrespective of how many clients refer it, avoid too many method calls, use try-catch blocks intelligently, have single database connection and reuse it efficiently, make minimum database calls…what else..? We are thinking and exploring…

Comments

Popular posts from this blog

Windows forgets visual effects settings on log-out or reboot for non-administrator account

Steps given here worked for me with Windows 7 SP1. Hope you may find it useful.

Start -> Run-> cmd (press enter) -> type SystemPropertiesPerformance.exeThis gets you the "System Properties" window, go to  Advanced tab -> Performance Settings -> Visual Effects tab and choose "Adjust for best performance" and click OK. Note: While doing all these UAC doesn't show-up as all changes you are doing will be saved in your logged-in profile account.

Reference material used: http://msdn.microsoft.com/en-us/library/ee330866.aspx

Feel free to comment your findings.

Why Akbar was Great?

I have fanatical interest to be acquainted with what made Indian emperors take influential decisions during their reign. Few great kings’ valuable decisions created a remarkable history.

When Akbar accepts the marriage proposal of Hindu King (Bharmal of Amer), he wishes to make an attempt to set an example for two culture and religions and convey the message of peace. Later, destiny takes him to the critical path of life having most depraved political and family oriented problems. Being a true great emperor, Akbar learns and conclude challenges by demonstrating his exceptional leadership qualities. With his verdicts, Akbar stands as an incomparable king of all time. “Jodha Akbar” – brings 16th-century incidents to life and shows beginning part of Akbar’s married life which was, in fact, a deal for political gain. This decision slowly unleashes Akbar’s loving life, internal dreadful politics, painfully desirous people around him and betraying family members.

Jalaluddin Mohammad Akbar is…

Hangfire with ASP.Net MVC : Simplest Code To Start with

It seems many are looking for using Hangfire with ASP.Net MVC 4 / 5+ SQL Server here is the simplest code example for you to start quick.

I am using Visual Studio 2017 Community Edition

1) Create ASP.Net MVC 4/5 Projects
2) <add key="owin:AutomaticAppStartup" value="false" /> in web.config file
3)Run Install-Package HangFire -Version 1.6.17 or visit here for latest version: https://www.nuget.org/packages/Hangfire/1.6.17
4) From the sample code, make sure you create database in SQL Server DB and update the connection string.
5) I am simply updating a table with a primary key (auto incremented), and string field "StampTime" with current date and time.
6) Open Global.asax.cs and put this code.
7) Run the app and check the database.

The example code also showcase a hack on how to run jobs with few seconds interval.

namespace HangFireDemo { publicstaticclassMyTasks { publicstaticasync Task<int> MinuteTick() { awa…