IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1825.67 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-15
[00:55]<rrygn606>brb
[00:55]<ymuggjtntnt>If you find a java player you can try using IKVM
[00:55]<maxgg>just windows--screw Mrs. Lee and her class of Highschool Yearbook and Desktop Publishing class in Bumville Illinois
[00:55]<maxgg>and their stupid ancient Mac SE/30s
[00:56]<ymuggjtntnt>all right you can use ActiveX to embed a flash file, I dont know if that will work in MOno though
[00:57]<rrygn606>There is a javaflash player. But its immature.
[00:57]<rrygn606>Another one requires embeddinmg the flash.dll and it doesn't have licenses etc.
[00:58]<ymuggjtntnt>hmm.. I wonder if you can use Flash as the UI instead of the default stuff?
[00:59]<maxgg>flash sucks, let's go back to the stone age
[01:00]<ymuggjtntnt>It can do some wicked animations though, can't it?
[01:00]<ymuggjtntnt>I would imagine it can make some interactive media stuff much easier than with your SWF
[01:06]<lznnvysx>Hello I have a infinite while loop which captures packet in that while loop when a packet is captured i want to put it content in database so inside while loop i will connect to database and execute query i fear in this time there can be a packet loss
[01:06]<lznnvysx>Should i use.. Threads..
[01:07]<lznnvysx>Or Make a Seprate console application with parameters which will do dbase part and will be called and executed as soon as i find some some packet..?
[01:08]<lznnvysx>Please give me feedback.../?
[01:13]<ymuggjtntnt>this isnt 1980s, use threads lol
[01:15]<rrygn606>blackhole: I dunno C# but you probably want to have one thread capturing packets and throwing them to a producer/consumer queue, and another thread reading off the queue and writing to db - bear in mind however that it might simply not be possible to write to the database fast enouhg.
[01:16]<2fracxjfn>caine607, yes that what i was thinking...
[01:16]<rrygn606>blackhole: That is, if you're getting packets at a steady enough rate eventually the number of packets you are writing to the database will exceed the capability of the database to be written too.
[01:16]<2fracxjfn>caine607, thats ok.. we have virtually infinite dbase size..
[01:17]<rrygn606>blackhole: its not size but write speed that is the issue.
[01:18]<2fracxjfn>caine607, ok tell me one thing if i make a other exe file with cmd argumnets as database type...
[01:18]<2fracxjfn>i mean dbase parametres..
[01:18]<rrygn606>blackhole: I.e. if you have a network that can handle say 1000 1kbit packets per second, but your database can only handle 500 1kbit packets per second, you're kinda out of luck. Now if its bursty, if the network occasionalyl has peaks that are too high, its ok, the packets will get buffered in the queue.
[01:18]<vufvuzn>blackhole: so I'll ask here then: what kind of packets are you receiving?
[01:18]<rrygn606>blackhole: No, having a separate exe does you no good at all.
[01:18]<vufvuzn>UDP?
[01:19]<ymuggjtntnt>is there a way to look at the last 10 loop iterations or something while debugging?
[01:19]<vufvuzn>or just chunks of something over TCP?
[01:19]<2fracxjfn>caine607, But having a seprate exe can work..
[01:19]<ymuggjtntnt>having a separate exe is great if you are doing bash scripting
[01:19]<2fracxjfn>vulture, its email packets but email traffic is huge..
[01:19]<rrygn606>blackhole: a) listen to vulture, since I know he's damn good with java and I'm presuming he knows more about C# than I do since I know practically nothing about C#. b) stop on the separate exe thing.
[01:20]<2fracxjfn>vulture, ok.. see vulture if i make seprate exe and execute in dotnet using system.diagnositic
[01:20]<2fracxjfn>vulture, each time a packet arrive we dont have to worry.. i mean a seprate exe will b executed..
[01:20]<rrygn606>blackhole: that really doesn't do you any good regardless.
[01:21]<2fracxjfn>and each process will do it work and exit..
[01:21]<rrygn606>blackhole: the limiting factor is the capability of your database to accept writes.
[01:21]<rrygn606>blackhole: using a separate exe costs you a lot, (start up time, extra memory) while not solving that limit of the database to accept writes.
[01:22]<vufvuzn>blackhole: "email packets" - and how are you receiving them?
[01:22]<vufvuzn>you are writing an SMTP server?
[01:22]<rrygn606>blackhole: Meanwhile, you can just use the extra system memory that you WOULD have used for separate exes, and make your producer/consumer queue much much bigger so it can buffer packets.
[01:22]<ymuggjtntnt>using separate EXEs is even stupider than using fork/clone
[01:22]<2fracxjfn>vulture, nope i have a sniffer that looks for SMTP packets..
[01:22]<2fracxjfn>vulture, i mean port 25 and stuff..
[01:22]<2fracxjfn>and captures it ..
[01:23]<vufvuzn>blackhole: why do you need to sniff email? (and you realise that that's not going to be reliable even if you process them quickly, right?)
[01:23]<2fracxjfn>caine607, so queuing is a good idea..
[01:23]<2fracxjfn>caine607, queue and threading..
[01:23]<rrygn606>blackhole: listen to vulture.
[01:23]<2fracxjfn>vulture, some one need to do this for them..
[01:23]<vufvuzn>for who? why?
[01:23]<ymuggjtntnt>use asynchronous reads and callback for processing it
[01:24]<2fracxjfn>vulture, i work some where they want this kind of application
[01:24]<vufvuzn>what is it that's being achieved? likely there's a more sane and reliable way to do it
[01:24]<2fracxjfn>and they think it can be reliable..
[01:24]<ymuggjtntnt>and data will get queued in the TCP buffer so don't worry
[01:24]<vufvuzn>like attaching a plugin to the mail server, rather than trying to sniff mail
[01:24]<2fracxjfn>vulture, just capturing of email of some users...
[01:24]<2fracxjfn>that pass through a gateway..
[01:24]<vufvuzn>to achieve what end?
[01:25]<vufvuzn>and if they think it's reliable it'd be your job to explain to them that it isn't
[01:25]<2fracxjfn>i dont know they want to log it.. thats it..
[01:25]<2fracxjfn>i tried but they are not technical and they said me to build it.. and then they can see..
[01:25]<2fracxjfn>vulture, now can you please guide me on how can i make it happen and what is best way to do it..
[01:26]<ymuggjtntnt>well good luck sniffing the packets, that has to be done on a pretty low level
[01:26]<2fracxjfn>idunno59595, i dont worry about that part..
[01:26]<vufvuzn>if you aren't controlling the communication (you neither initiated, nor accepted the TCP connection being used) you don't get any guarantees. (ok, so I'm exaggerating a little, since all the data does eventually have to pass through the gateway assuming there are no alternative routers available)
[01:26]<2fracxjfn>idunno59595, we have IPhelper and WinPCAP
[01:27]<2fracxjfn>vulture, ok..
[01:27]<vufvuzn>blackhole: chances are they already do some buffering, but you'd have to research them a bit
[01:27]<2fracxjfn>vulture, k..
[01:27]<ymuggjtntnt>ok so assuming you can get all the data intact, just use 1 thread to buffer the communication and another thread to process it
[01:27]<vufvuzn>but yeah, a thread queueing up emails & another thread processing them would be a first pass (ewll no, that'd be a second pass -a first pass would be a single threaded solution)
[01:28]<ymuggjtntnt>your library would have to support "select" functionality though
[01:29]<2fracxjfn>idunno59595, means..?
[01:29]<rrygn606>idunno59595: Do you mean 'select()'?
[01:29]<ymuggjtntnt>well it would need internal buffering so you dont miss anything while you are processing information
[01:29]<ymuggjtntnt>and i guess you wouldnt really need select() unless you're just doing simple listen/process
[01:30]<rrygn606>idunno59595: he already said he's using WinPCAP...
[01:30]<ymuggjtntnt>oh i am not familiar with that
[01:30]<ymuggjtntnt>I only use .NET stuff
[01:30]<2fracxjfn>idunno59595, you can have a Pinvoke for it..
[01:31]<2fracxjfn>idunno59595, anyway currently i am using Iphelper caine607
[01:31]<2fracxjfn>but i am looking to make a Pinvoke for WinPCap also
[01:32]<ymuggjtntnt>well I have no idea about that, but surely you can hand off the data to a separate thread :)
[01:32]<2fracxjfn>ok thanx all of you for urs view...s
[01:32]<ymuggjtntnt>use a synchronized delegate or a thread queue
[01:34]<2fracxjfn>idunno59595, can u just code a simple example for it..?
[01:34]<ymuggjtntnt>I'm not sure what you mean, you are asking for the common worker thread pattern
[01:35]<2fracxjfn>idunno59595, just a thread queue..
[01:35]<2fracxjfn>kind of thing ..
[01:35]<ymuggjtntnt>I haven't had the chance to use the thread queues in .NET yet but its just the same as in any other language
[01:36]<ymuggjtntnt>its the classic producer/consumer problem solved with high level functionality given by the threading queue class
[01:38]<vufvuzn>blackhole: you're the one being paid for this, not us :)
[01:38]<ymuggjtntnt>In fact if you do not need too much control over it you might use a delegate and BeginInvoke, there is a way to make it execute in the thread that created the delegate somehow.. can't remember off the top of my head
[01:42]<ymuggjtntnt>I know the Control class does that , and yuo can use ISynchronizeInvoke interface too.. heh
[01:46]<ymuggjtntnt>actually this is interesting.. does anyone know if I can use an ISynchronizeInvoke interface without a Control class?
[01:50]<ymuggjtntnt>Hmm.. weird that there isn't a class that does this on its own







