469,623 Members | 1,472 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

Flat files and ASP.NET

Hello

I am developing a system for user tracking. In this I am tracking all the
visitors that came to my website. i developed this using a HTTPModule and
storing the data in a SQL Server database. Everything worked fine till my
website gets good traffic.

When website is getting good traffic, this method is slowing down the entire
application. So I am planning to use flat files instead of SQL Server
database. My doubts are

1 - What is a flat file and how can I connect to it from my ASP.NET
application
2 - If multiple users are browsing website at same time, how can I save
data's to file, because that may be in use.
3 - Is XML files are normal flat files ?

Please help me on this issue.

Sincerly
Navaneeth
Aug 30 '07 #1
9 1715
On 30 , 10:06, Navaneeth.K.N
<Navaneeth....@discussions.microsoft.comwrote:
Hello

I am developing a system for user tracking. In this I am tracking all the
visitors that came to my website. i developed this using a HTTPModule and
storing the data in a SQL Server database. Everything worked fine till my
website gets good traffic.

When website is getting good traffic, this method is slowing down the entire
application. So I am planning to use flat files instead of SQL Server
database. My doubts are

1 - What is a flat file and how can I connect to it from my ASP.NET
application
2 - If multiple users are browsing website at same time, how can I save
data's to file, because that may be in use.
3 - Is XML files are normal flat files ?

Please help me on this issue.

Sincerly
Navaneeth
I have a doubt whether saving data to a file on the hard drive is
faster then saving data in the database. Not to mention the speed of
processing these data.

Regards,
Mykola
http://marss.co.ua

Aug 30 '07 #2
I suggest you stick with a database. Flat files will almost certainly not
give you additional speed or scalability.
Perhaps you could use some sort of a queue to save up log records and only
write to the database every so often.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Navaneeth.K.N" <Na***********@discussions.microsoft.comwrote in message
news:B9**********************************@microsof t.com...
Hello

I am developing a system for user tracking. In this I am tracking all the
visitors that came to my website. i developed this using a HTTPModule and
storing the data in a SQL Server database. Everything worked fine till my
website gets good traffic.

When website is getting good traffic, this method is slowing down the
entire
application. So I am planning to use flat files instead of SQL Server
database. My doubts are

1 - What is a flat file and how can I connect to it from my ASP.NET
application
2 - If multiple users are browsing website at same time, how can I save
data's to file, because that may be in use.
3 - Is XML files are normal flat files ?

Please help me on this issue.

Sincerly
Navaneeth
Aug 30 '07 #3
Yes, the OP could look into MSMQ, however what levels of traffic are we
talking here? If it isn't extremely heavy I can't understand why SQL would
be causing a bottleneck. I'd look into what is causing the delay before
looking for an alternative solution.

"Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <St***@Orr.netwrote in
message news:B7**********************************@microsof t.com...
>I suggest you stick with a database. Flat files will almost certainly not
give you additional speed or scalability.
Perhaps you could use some sort of a queue to save up log records and only
write to the database every so often.

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"Navaneeth.K.N" <Na***********@discussions.microsoft.comwrote in message
news:B9**********************************@microsof t.com...
>Hello

I am developing a system for user tracking. In this I am tracking all the
visitors that came to my website. i developed this using a HTTPModule and
storing the data in a SQL Server database. Everything worked fine till my
website gets good traffic.

When website is getting good traffic, this method is slowing down the
entire
application. So I am planning to use flat files instead of SQL Server
database. My doubts are

1 - What is a flat file and how can I connect to it from my ASP.NET
application
2 - If multiple users are browsing website at same time, how can I save
data's to file, because that may be in use.
3 - Is XML files are normal flat files ?

Please help me on this issue.

Sincerly
Navaneeth

Aug 30 '07 #4
"Aidy" <ai**@xxnoemailxx.comwrote in message
news:8t******************************@bt.com...
If it isn't extremely heavy I can't understand why SQL would be causing a
bottleneck.
Could be any number of reasons: poor design, no primary key / index,
inefficient use of ADO.NET, not closing connections etc...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 30 '07 #5
Could be any number of reasons: poor design, no primary key / index,
inefficient use of ADO.NET, not closing connections etc...
That's what I meant, I don't see that it can be SQL Server's fault but
something to do with the design/coding.

BTW, why would not having an index *harm* insert performance? :p
Aug 30 '07 #6
A flat file likely won't help you - ultimately your database does nothing
more than write data to a file. XML is not he right approach either.

You need to either change your approach to tracking data, using perhaps a
hidden iframe in you pages that impacts a second web server instead of your
primary - or look to scale out for load by adding web servers to create a
farm.

Ultimately, a fix is a design decision as your problem could be in the
module rather than he fact that your talking to a database, you could try to
spawn your write activities off to asynchronous threads and see if it
reduces your problems or simply load your data into the application object
and every 1000 requests or so write it to the DB.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Navaneeth.K.N" <Na***********@discussions.microsoft.comwrote in message
news:B9**********************************@microsof t.com...
Hello

I am developing a system for user tracking. In this I am tracking all the
visitors that came to my website. i developed this using a HTTPModule and
storing the data in a SQL Server database. Everything worked fine till my
website gets good traffic.

When website is getting good traffic, this method is slowing down the
entire
application. So I am planning to use flat files instead of SQL Server
database. My doubts are

1 - What is a flat file and how can I connect to it from my ASP.NET
application
2 - If multiple users are browsing website at same time, how can I save
data's to file, because that may be in use.
3 - Is XML files are normal flat files ?

Please help me on this issue.

Sincerly
Navaneeth

Aug 30 '07 #7
"Aidy" <ai**@xxnoemailxx.comwrote in message
news:lN*********************@bt.com...
BTW, why would not having an index *harm* insert performance? :p
:-)
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 30 '07 #8
Hello,

Using Application variables looks like a good solution to me. But what will
be the performance issues where Application variable grows ? And I think I
will loose unsaved data if any server crash happened
Aug 31 '07 #9
Performance clearly depends on how much data you stick in the app object
before you archive it off. You'll need to load test whatever your doing.

You always run the risk of losing data in any application crash before its
written to disk/database. What you need to work out is how many records are
you prepared to lose and make sure your write events minimise the impact.
So if you can only lose 10 records then dont wait until 100 to write to the
database.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
"Navaneeth.K.N" <Na*********@discussions.microsoft.comwrote in message
news:C2**********************************@microsof t.com...
Hello,

Using Application variables looks like a good solution to me. But what
will
be the performance issues where Application variable grows ? And I think I
will loose unsaved data if any server crash happened

Aug 31 '07 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by hakhan | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.