|
Tell me where do i argued, i say thanks to his valuable suggestions and is my questions are pointless , no not they are. if he doesn't say anything to me then y your azz is itching.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: Well first of all thanks for your valuable suggestions but as you are MVP and you say
Colin Angus Mackay wrote:
I give up.
But Something for you.
How about this. He's good at what he does because he recognizes that to keep working on a futile solution is a pointless.
|
|
|
|
|
|
Mogaambo wrote: more fast then previous one
Probably because you are not thrashing the virtual memory's page file.
|
|
|
|
|
Mogaambo wrote: Yes I did , but check yourself what answers i received, are they fruitful
no no no no
Uhhh, yes they are. And you were told exactly why your approach wouldn't work. You simply ARE running the machine out of memory trying to read and retain all that data at once. You have no choice but to either read and process the data in small chunks, or farm the entire job out to SQL Server to do it for you.
|
|
|
|
|
Hello everyone,
I am designing a library which client side could use it to retrieve content from a remote cache server, through Http/Web Services communication.
My current issues and concerns are,
- I want to let client side library to start multiple threads to work efficiently to request for multiple content at the same time other than a single thread pattern;
- But I do not want to hit the server too hard and I also do not want to the library to consume too much resources (memory/threads) on client side to block other work of the client. The library is delivered as a DLL, so loaded into client side process, and will compete for resources of the same process.
Are there any good design patterns for such issues?
thanks in advance,
George
|
|
|
|
|
George_George wrote: Are there any good design patterns for such issues?
Hello George. At this point it is difficult to believe that you even comprehend what Design Patterns are. If you are asking if there is some magical solution for using threads that will absolve you, the developer, from responsibility to ensure the very requirements you speak of, the answer is NO. The developer has to actually know what they are doing and do it in a way that will achieve the requirements.
That said, the history of your posts, as far as I can tell, does not indicate that you are prepared to undertake a multi-threaded project. However I imagine that you will do so none the less. Logically we can expect to see many many future threads from you wondering why your multi-threading code doesn't work.
led mike
|
|
|
|
|
Thanks led mike,
My current situation is,
1. I can create many threads on client side to get data from server as fast as possible, but it may hit server too hard -- like DoS attack;
2. I can limit the number of threads of client side, in this situation server is not hit too hard, but client may not get data very efficiently.
I want to find solution to balance such situation. Any ideas?
regards,
George
|
|
|
|
|
George_George wrote: I can create many threads on client side to get data from server as fast as possible
You can? Really? Why because your client machine has unlimited processors? What vendor did you buy that from? I really need to get me one of those!
George, pay attention. You cannot learn about multi-threading in 5 minutes. Furthermore people have written entire books on the subject because that's how large and difficult the subject is, so why would I, or anyone else, attempt to provide an explanation in an internet forum? Wouldn't the be illogical?
If you don't have access to such books, people have posted such writing on the internet and they are freely available. However to find and read them one has to not spend all one's time in internet forums. If you really are interested in reading what is known in the industry about multi-threading, load and scaling, I strongly suggest you stop typing questions into internet forums and start using Google to find what known leaders in the industry have to say about the subject.
The truth is out there
led mike
|
|
|
|
|
Thanks led mike,
Please trust me I understand multi-threading, and also IOCP concept.
It is appreciated if you could recommend some good tutorials or books for me to read -- not about multi-threading, but the issue I described in this question about data access pattern issues. Any suggestions?
regards,
George
|
|
|
|
|
George_George wrote: Please trust me I understand multi-threading, and also IOCP concept.
That's not going to happen.
led mike
|
|
|
|
|
Hi led mike,
You mean what is not going to happen? Any issues with IOCP or?
regards,
George
|
|
|
|
|
George_George wrote: You mean what is not going to happen?
I am not about to believe you understand those things, and as my post in the other thread states, I believe you are being deliberately obtuse. I'm not impressed.
led mike
|
|
|
|
|
Hi led mike,
I am sorry for any inconvenience before -- everyone improves skills from time to time. My question is do you have any related materials to recommend?
regards,
George
|
|
|
|
|
George_George wrote: do you have any related materials to recommend?
Advanced Windows[^] if you think you are ready for advanced subjects. Based on your posting history you are not read, and likely never will be, but go ahead and take it for a spin if you like.
led mike
|
|
|
|
|
Hi led mike,
It is a good book about Windows internals. But what I am asking is the best practices for data access patterns, do you have related books to refer?
have a good weekend,
George
|
|
|
|
|
George_George wrote: But what I am asking is the best practices for data access patterns
Now that is just a bald faced lie!
Your original post (below) is clearly asking about multi-threading issues. The chapters in Richters book covering threading and threading issues is the best material I have ever read on threading. Read it or don't, it's up to you but I am done playing your stupid game of changing topics in the middle of a conversation. I don't know who the hell you are or why you enjoy playing these stupid games. Maybe you should try to get a girl friend.
George_George wrote: - I want to let client side library to start multiple threads to work efficiently to request for multiple content at the same time other than a single thread pattern;
- But I do not want to hit the server too hard and I also do not want to the library to consume too much resources (memory/threads) on client side to block other work of the client. The library is delivered as a DLL, so loaded into client side process, and will compete for resources of the same process.
Are there any good design patterns for such issues?
led mike
|
|
|
|
|
Thanks for your advice, led mike!
I am sorry for inconvenience.
regards,
George
|
|
|
|
|
I have three tables related in the following way
TABLE1:
<font color="#ff0000">ID (PK)</font>
NAME
<hr>
TABLE2:
<font color="#00ff00">ID (PK)</font>
NAME
<font color="#ff0000">TABLE1_ID(FK)</font>
<hr>
TABLE3:
ID (PK)
NAME
<font color="#00ff00">TABLE2_ID (FK)</font></hr></hr>
How do you populate them in a tree view, I wrote some bad nested loop that I dont want you to see and get confused
Please help me with your clear logic!
Thanks guys!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
If your ugly nested code works, just go with it. Sometimes, ugly nested code is the only way.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanx, but do you all do it that way?? I mean using ugly nested loops?? I really wanna see how others do it!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
I don't understand when someone comes along and doesn't understand that a little work is involved in getting things done. Many times, the ugliness of the code is directly proportional to the difficulty in its implementation. Remember, if it works and you're on a release schedule, button up the code and move on.
Without seeing your code and being made privy to ALL of the requirements, we can't possibly help you improve it.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Ok, thanks John, I'm happy with it now and this's how it looks:
private DataTable GenDT(string strSelect)
{
DataTable _dt = new DataTable();
new OracleDataAdapter(strSelect, oraCONNECTION).Fill(_dt);
return _dt;
}
private void Populate_treeView1()
{
DataTable dt1, dt2, dt3;
int ID;
string sep, seperator;
sep = ":";
#region Table1
dt1 = GenDT("SELECT * FROM Table1");
for (int x = 0; x < dt1.Rows.Count; x++)
{
ID = int.Parse(dt1.Rows[x]["ID"].ToString());
Name = dt1.Rows[x]["NAME"].ToString();
treeView1.Nodes.Add(Name + sep + ID.ToString(), Name);
#region Table2
dt2 = GenDT("SELECT * FROM Table2 WHERE T2_Table1_ID = " + ID);
for (int y = 0; y < dt2.Rows.Count; y++)
{
ID = int.Parse(dt2.Rows[y]["ID"].ToString());
Name = dt2.Rows[y]["NAME"].ToString();
treeView1.Nodes[x].Nodes.Add(Name + sep + ID.ToString(), Name);
#region Table3
dt3 = GenDT("SELECT * FROM Table3 WHERE T3_Table2_ID = " + ID);
for (int z = 0; z < dt3.Rows.Count; z++)
{
ID = int.Parse(dt3.Rows[z]["ID"].ToString());
Name = dt3.Rows[z]["NAME"].ToString();
treeView1.Nodes[x].Nodes[y].Nodes.Add(Name + sep + ID.ToString(), Name);
}
#endregion
}
#endregion
}
#endregion
treeView1.ExpandAll();
}
Thanks for your time!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hello,
I want to set values in Vista registry (in UAC enabled mode) on this (HKEY_LOCAL_MACHINE\SOFTWARE\MyFolder) path but the values are set on diffrent (HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\MyFolder) path.
How to set values in that (HKEY_LOCAL_MACHINE\SOFTWARE\MyFolder) path if UAC is enabled.
Plz help me
|
|
|
|
|
You can't write to (or edit) keys under HKEY_LOCAL_MACHINE unless you're in the administrator group.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|