am developing one application for tracking vehicles. am using mvc3 and entity framework 4.1. we developed one service for communicatting devices what we connected in vehicles. if the sevice and mvcapplication simultaniously using one table is there any
chance for database performance or database accesiblity problem.
sudheesh
Please click 'Mark as Answer' if my reply has assisted you
It depends on what is reading and what is writing. If everything is reading you will be ok. If there are inserts/updates happening then things might get more complicated, but there is no absolute answer...it depends on your tables and what is happening
in them. However if performance is critical to you then I'd probably not bother with Entity Framework, or even Linq to SQL.
Entity Framework 5 has much needed improvements in performance. If your service and mvcapplication can read without an issue, if they need to update/insert, you could accomplish in a few ways.
1. If the chance of update/insert collision is very low (maybe one in a million updates could cause a conflict) you would leave both as is.
2. if chance of collision is highly possible do one of the following
add a bit to the tables, flip it when doing an update, flip it back when completed. then just queue up and watch for that bit to flip back before attempting to write.
setup all CRUD operations in the service and have the mvc application go thorugh the service to read/write from the database.
sudhiprclind...
Member
82 Points
54 Posts
Entity Framework
Aug 21, 2012 09:54 AM|LINK
Hi,
am developing one application for tracking vehicles. am using mvc3 and entity framework 4.1. we developed one service for communicatting devices what we connected in vehicles. if the sevice and mvcapplication simultaniously using one table is there any chance for database performance or database accesiblity problem.
sudheesh
Sudheesh
AidyF
Star
9204 Points
1570 Posts
Re: Entity Framework
Aug 21, 2012 10:15 AM|LINK
It depends on what is reading and what is writing. If everything is reading you will be ok. If there are inserts/updates happening then things might get more complicated, but there is no absolute answer...it depends on your tables and what is happening in them. However if performance is critical to you then I'd probably not bother with Entity Framework, or even Linq to SQL.
pittel
Member
51 Points
10 Posts
Re: Entity Framework
Aug 21, 2012 02:02 PM|LINK
Entity Framework 5 has much needed improvements in performance. If your service and mvcapplication can read without an issue, if they need to update/insert, you could accomplish in a few ways.
1. If the chance of update/insert collision is very low (maybe one in a million updates could cause a conflict) you would leave both as is.
2. if chance of collision is highly possible do one of the following
@chadit
CodeHobo
All-Star
18647 Points
2647 Posts
Re: Entity Framework
Aug 21, 2012 03:32 PM|LINK
You need to use transactions.
http://msdn.microsoft.com/en-us/library/bb896325.aspx
http://msdn.microsoft.com/en-us/library/ms188929.aspx
It all depends on how big of an application and how rapidly data is being changed.
Blog | Twitter : @Hattan