?
Solved

Multi-threading and the MVC Framework

Posted on 2009-04-19
8
Medium Priority
?
1,069 Views
Last Modified: 2013-12-17
When writing an MVC application, what multi-threading issues might there be?  If I let users only be logged in once, doesn't that solve any threading issues?

I'm new to this but want to solve problems before they bite me.

I'm interested in hearing your thoughts and experiences with Multi-threading and the MVC Framework.


Thanks,
newbieweb
0
Comment
Question by:newbieweb
  • 3
  • 3
  • 2
8 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24182799
It depends on what sort of multithreading you are to do. Does it involve any common in memory structures or variables?
0
 

Author Comment

by:newbieweb
ID: 24183197
I hadn't planned on doing any.  But wondered if it was something I needed to consider doing.

When can you imagine the need for multi-threading?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 1400 total points
ID: 24183566
Multithreading is useful when you need to do some task which would required some processing and may lock the user interface while doing that task. For example, in my CRM project, when an error occurs, i send an email to myself with the details of the error. I do this in a separate thread because if i do this in the main program, it would freeze the UI for a few seconds while the email is relayed.
0
Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

 

Author Comment

by:newbieweb
ID: 24189511
right. I need that.

Are there preferred methods of using multi-threading with the MVC Framework?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 24192021
I dont know of any such preference. Clearly you would stay within the bounds of model view controller. I mean if you start a thread in the view, it should not directly access the controller or model etc.
0
 
LVL 23

Assisted Solution

by:Tony McCreath
Tony McCreath earned 600 total points
ID: 24192447
I'm a little confused with your question.

An MVC is a single user application so I don't understand where the multiple users loging in is part of it?

Is there a database or some common data storage involved?

Regarding MVC, multithreading normally relates to worker process being used so that the GUI does not freeze while work is being done.
0
 

Author Comment

by:newbieweb
ID: 24193200
No, I meant that if I restrict users to logging in, they won't be running multiple versions of the website against the same data/user profile.

I'll need to play with threading in the coming weeks.

Thanks,
newbieweb
0
 
LVL 23

Expert Comment

by:Tony McCreath
ID: 24194469
I just read that microsoft now has an ASP.Net MVC framework, so you are talking about websites, which are multithreaded.

By multithreading, I believe you are talking about 2 seperate people logging in as the same user and accessing the same data. This is not what first comes to mind with software developers!

Your login idea will work. You would need to keep track of all currently logged in users and block logins for users on the list. Maybe by using a static collection


0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question