Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

Opinions on complexity

Thread view: 
_Hobbes - 11 Dec 2005 15:54 GMT
I am thinking of developing a network application for my PhD, and it
involves (among other stuff) my own implementation of the TCP/IP
protocols. So, at the state the Java 1.5 version is, I need the use of
JNI for the RAW sockets. (Although the use of Java is not a MUST, I am
more experienced at it than I am at C/C++ or other useful programming
language.)

By now, I've managed to almost-implement the Ping: I send the
appropiate ICMP Echo Request to 127.0.0.1 (with its well-formed IP
header, ICMP header and data, based on the RFCs), but I still don't
"hear" the ICMP Echo Reply from my application, (although I can see
this ICMP Echo Reply going back when I capture the network traffic of
my loopback interface with Ethereal). But it's not the point of my
entry in this group to find a solution on this (it must be something
odd in the C native code I have to fix).

The thing is that, although I find this project feasible, I don't
really know how complex may it become (I am sure the TCP/IP stack is
not a trivial thing) and, unfortunately, I cannot spend as much time as
I would like on this (you sure know how it works: I've got a job from 8
to 17:30, which is not bad at all, but it doesn't let me too much spare
time).

So here goes my question: do you think it is a feasible project for
developing it on my own in a reasonable time?, do you recommend me
"opening" it on sourceforge or something like that, and share it with
other thinking heads?, are you one of those thinking heads :) ?.

Thanks in advance for your comments,

_Hobbes.
____________________________
"I must've put my finger on it." - Calvin
IchBin - 11 Dec 2005 16:14 GMT
[snip]

 do you recommend me
> "opening" it on sourceforge or something like that, and share it with
> other thinking heads?

IMHO - I do not think using the public for feedback and suggestions
justifies YOUR thesis work. This is the point of thesis work. That is,
research.. I could be wrong. My thesis work was in a different field,
psychology.

Signature

Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________

'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor,  Regular Guy (1952-)

_Hobbes - 11 Dec 2005 20:37 GMT
Yes, IchBin, you're completely right, I wrote the wrong words. I
clearly know what I want to do, so I would be the "thinking head" in
the project (just a way of saying it) and, what I'm really looking for,
are some hands with programming experience, that could follow my
guidelines and help me with the programming.

So, the idea would be: me making the research and posting in
soruceforge the work I have done till now, and people that find it
interesting making the programming I ask for. I don't know how
efficiently will it work, or even if it is the purpose of a
sourceforge-style Web site.
Chris Smith - 11 Dec 2005 16:57 GMT
> I am thinking of developing a network application for my PhD, and it
> involves (among other stuff) my own implementation of the TCP/IP
> protocols. So, at the state the Java 1.5 version is, I need the use of
> JNI for the RAW sockets. (Although the use of Java is not a MUST, I am
> more experienced at it than I am at C/C++ or other useful programming
> language.)

I'm unsure why you feel the need to re-implement TCP/IP.  It's generally
implemented fairly well by your operating system.  Implementing a toy
TCP/IP stack may be within your reach, but a production quality TCP/IP
stack is a mess of compromises between various denial of service
vulnerabilities, and could take a team of several people several years
to get right.  (Or it could take less time; because of differences
between people in levels of skill and aptitude, which are generally one
to two orders of magnitude, no definitive answer can ever be given to a
question of that sort.)

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Tris Orendorff - 11 Dec 2005 20:26 GMT
> I am thinking of developing a network application for my PhD, and it
> involves (among other stuff) my own implementation of the TCP/IP
> protocols. So, at the state the Java 1.5 version is, I need the use of
> JNI for the RAW sockets. (Although the use of Java is not a MUST, I am
> more experienced at it than I am at C/C++ or other useful programming
> language.)

Are you planning to make changes to the TCP/IP protocol?  If not, a mere
reimplementation of TCP/IP would not be suitable for a PhD thesis.  You
should pick a unanswered topic in comp-sci and attempt to find a solution.  
There is no requirement to "optimally solve" the problem but you should be
able to show why it doesn't work and propose ideas for others to further
the research.

Remember: "If I have seen farther than others, it is because I was standing
on the shoulders of giants." Sir Issac Newton.

Signature

Sincerely,

Tris Orendorff
[Two antennae meet on a roof, fall in love and get married. The ceremony
wasn't much, but the reception was excellent.]

Benji - 11 Dec 2005 20:53 GMT
> Are you planning to make changes to the TCP/IP protocol?  If not, a mere
> reimplementation of TCP/IP would not be suitable for a PhD thesis.  You
> should pick a unanswered topic in comp-sci and attempt to find a solution.  
> There is no requirement to "optimally solve" the problem but you should be
> able to show why it doesn't work and propose ideas for others to further
> the research.

> Remember: "If I have seen farther than others, it is because I was standing
> on the shoulders of giants." Sir Issac Newton.

I could be wrong, but I'm pretty sure that he has a good idea of what would
make a good PhD thesis.  =P  I think he's just asking about language issues.

Signature

Of making better designs there is no end,
 and much refactoring wearies the body.

_Hobbes - 11 Dec 2005 21:47 GMT
Wow!, lot of movement here!. I DO like it :). I will try to answer all
of you:

To: Chris Smith
> Implementing a toy
> TCP/IP stack may be within your reach, but a production quality TCP/IP
[quoted text clipped - 4 lines]
> to two orders of magnitude, no definitive answer can ever be given to a
> question of that sort.)

Well, my initial idea is not developing a commercial TCP/IP stack, but
it is not making a toy implementation as well, because I will make
extensive use of it for my research. I want to develop a realist
implementation. I will not be alone in my way, because some students
will start to help me briefly, but they lack the experience I might
find somewhere else.

> I'm unsure why you feel the need to re-implement TCP/IP.

When I first wrote in this forum, I didn't find it necessary to explain
my PhD project but, as some of you have asked questions that have to do
with it, I will write down a little more about what it intends to deal
with:
I need to modify some of the values the TCP/IP protocol works with and,
the only way of being able to change them is having my own
implementation. Hacking a linux kernel and modifying the parameters is
not an option, because I need lot of control on what the protocol
internally does.

So, this answers Tris Orendorff to:
> Are you planning to make changes to the TCP/IP protocol?

And gives the whole reason to Benji when he says (thanks for entrusting
me Benji =D):
> I'm pretty sure that he has a good idea of what would make a good PhD thesis

To Roedy Green:
> Its is designed to work on an almost perfect network.  It would
> crumble if for some reason only a small fraction of the packets got
> through. Long before I had ever heard of TCP/IP I outlined a protocol
> designed to survive horrible phone lines that I was dealing with in
> the third world.  see http://mindprod.com/jgloss/sax.html

Thanks for the link, I did not know anything about SAX, but it has a
lot to do with my PhD project =)

> TCP/IP in itself is not that complicated, but DNS lookup on which it
> depends is pretty hairy.

This words give me some breath. Technically speaking, I know I can
handle it but, again, my main problem is time (I would like to end with
it before seeing the seas swallow the continents).

So, again, here comes my question: do you think sourceforge (or any
other suggested site) could help me with my "time problem"?

And, again, thanks a lot to all of you for your comments,

_Hobbes
Roedy Green - 12 Dec 2005 01:55 GMT
>This words give me some breath. Technically speaking, I know I can
>handle it but, again, my main problem is time (I would like to end with
>it before seeing the seas swallow the continents).

Read Comer's book on how TCP/IP works. There is a link to it at
http://mindprod.com/jgloss/tcpip.html

TCP/IP is peculiar in that the protocol itself is simple, but within
its rules, you can be quite clever.  TCP/IP is more like a game with
simple rules where you can invent strategies to play it well. It
leaves a fair bit of latitude for what you can do at each point. It is
not like protocols where every "move" is proscribed.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Chris Uppal - 12 Dec 2005 10:19 GMT
> Well, my initial idea is not developing a commercial TCP/IP stack, but
> it is not making a toy implementation as well, because I will make
> extensive use of it for my research. I want to develop a realist
> implementation.

Is a GC-ed language suitable for a "realistic" implementation ?  (It might be,
it depends on what /kind/ of realism you expect out of it.)

Also, if your purposes are to investigate the performance implications of
different design choices, don't you have to start from a baseline that is at
least credible by comparison with stacks that have been performance-tuned for
years ?  (That /is/ a question, btw, not an assertion phrased in rhetorical
vein.)

> I need to modify some of the values the TCP/IP protocol works with and,
> the only way of being able to change them is having my own
> implementation. Hacking a linux kernel and modifying the parameters is
> not an option, because I need lot of control on what the protocol
> internally does.

So, in what way will this be of value for anyone (except you) to work on ?  OK,
intellectual interest, but are you willing to bet your PhD on the kind of
person who would find this interesting in the first place (perfectly possible)
not finding something even /more/ interesting to play with in a couple of weeks
time ?

> This words give me some breath. Technically speaking, I know I can
> handle it but, again, my main problem is time (I would like to end with
> it before seeing the seas swallow the continents).

Might be worth scoping it out in (non-optimistic) time plan on the assumptions
that you get no help from the OS community /and/ that the students who will
(you mentioned) help will, in fact, slow you down more than they help.

> So, again, here comes my question: do you think sourceforge (or any
> other suggested site) could help me with my "time problem"?

My guess is no (for reasons as implied above); but then I'm not an OS
enthusiast (nothing against free software -- I both write it and use it -- but
the OS community often gives me a pain).  Personally I think I'd rather start
from an established stack (probably the BSD stack) -- or at least budget two or
three weeks to making a concerted effort to understand exactly what I
could/couldn't do with that implementation, before committing myself to either
a longish development that didn't actually contribute to the PhD, or a high
risk strategy of hoping someone else would do (most of) that bit for me.

BTW, you might be interested in uIP:

   http://www.sics.se/~adam/uip/ports.html

I don't know anything about that project myself, but the project seems to be
active.  (Which could be taken as evidence against my OS prejudice).

It might also be worthwhile getting in touch with the JITS people:

   http://www.lifl.fr/RD2P/JITS/TCPIP

Again, I don't know anything about it except what a bit of webaging turns up.

   -- chris
_Hobbes - 13 Dec 2005 11:44 GMT
Chris Uppal ha escrito:

> > Well, my initial idea is not developing a commercial TCP/IP stack, but
> > it is not making a toy implementation as well, because I will make
[quoted text clipped - 3 lines]
> Is a GC-ed language suitable for a "realistic" implementation ?  (It might be,
> it depends on what /kind/ of realism you expect out of it.)

I don't see the relationship between GC (it stands for "Garbage
Collection", doesn't it?) and the realism. I am not writing a
commercial implementacion of the TCP/IP, but a kind of simulation of it
for other purposes. GC will only do its job in what OOP is concerned.
Who's going to develop network applications with a Java implementacion
of the TCP/IP?

> Also, if your purposes are to investigate the performance implications of
> different design choices, don't you have to start from a baseline that is at
> least credible by comparison with stacks that have been performance-tuned for
> years ?  (That /is/ a question, btw, not an assertion phrased in rhetorical
> vein.)

The performance-tuning I want to do is not like the one you are talking
about. (Thanks for the acclaration of the "not rhetorical vein", when I
started reading your comment I was starting to remember all of your
parents :P, but I forgot about them at the end of the acclaration).

> > I need to modify some of the values the TCP/IP protocol works with and,
> > the only way of being able to change them is having my own
[quoted text clipped - 7 lines]
> not finding something even /more/ interesting to play with in a couple of weeks
> time ?

It will have practical value. It won't have a "killer application", but
it is not merely intellectual interest.

> > This words give me some breath. Technically speaking, I know I can
> > handle it but, again, my main problem is time (I would like to end with
[quoted text clipped - 3 lines]
> that you get no help from the OS community /and/ that the students who will
> (you mentioned) help will, in fact, slow you down more than they help.

You're right. Thinking about it, I agree with you: they will slow me
down more than help.

> > So, again, here comes my question: do you think sourceforge (or any
> > other suggested site) could help me with my "time problem"?
[quoted text clipped - 7 lines]
> a longish development that didn't actually contribute to the PhD, or a high
> risk strategy of hoping someone else would do (most of) that bit for me.

Yes, that was my first thought, but I am not too strong at C, and C++
is not much of my taste. Anyway, I still don't discard that
possibility.

> BTW, you might be interested in uIP:
>
[quoted text clipped - 8 lines]
>
> Again, I don't know anything about it except what a bit of webaging turns up.

Thanks for the links!

>     -- chris
Roedy Green - 11 Dec 2005 20:42 GMT
>So here goes my question: do you think it is a feasible project for
>developing it on my own in a reasonable time?, do you recommend me
>"opening" it on sourceforge or something like that, and share it with
>other thinking heads?, are you one of those thinking heads :) ?.

The problem with Java is it does not give you access to the packet
level underlying TCP/IP.  TCP/IP from a bits and bytes point of view
simple and elegant. See http://mindprod.com/jgloss/tcpip.html
You will need JNI for the lowest level.

Its is designed to work on an almost perfect network.  It would
crumble if for some reason only a small fraction of the packets got
through. Long before I had ever heard of TCP/IP I outlined a protocol
designed to survive horrible phone lines that I was dealing with in
the third world.  see http://mindprod.com/jgloss/sax.html

TCP/IP in itself is not that complicated, but DNS lookup on which it
depends is pretty hairy.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Thomas Weidenfeller - 12 Dec 2005 08:30 GMT
> I am thinking of developing a network application for my PhD,
[...]
> The thing is that, although I find this project feasible, I don't
> really know how complex may it become

Isn't that the point of a PhD thesis? To demonstrate that you can do
something non-trivial and complex?

> (I am sure the TCP/IP stack is
> not a trivial thing)

Compared to "real" telecommunications protocols it is a piece of cake.
Its simplicity is the reason why it go so popular compared e.g. to the
once rivaling OSI protocol stack.

> do you recommend me
> "opening" it on sourceforge or something like that, and share it with
> other thinking heads?, are you one of those thinking heads :) ?.

Aren't you supposed to do your PhD thesis on your own? Something smells
fishy here. What's the name of your university?

/Thomas
Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/

_Hobbes - 12 Dec 2005 15:08 GMT
Thomas Weidenfeller ha escrito:

> > I am thinking of developing a network application for my PhD,
> [...]
[quoted text clipped - 3 lines]
> Isn't that the point of a PhD thesis? To demonstrate that you can do
> something non-trivial and complex?

Yes, it is, but what I would like to demonstrate with this PhD is NOT
that I am capable of developing the TCP/IP stack in Java, but to reach
conclusions with its implementation. As I said in a previous message, I
need a total control of what the TCP/IP internally does, but the goal
is to conclude things based on some tests.
It seems that this thread is converting in "what a PhD should
demonstrate" or "why the hell do you want to do that". I DO know what I
want to do, I'm just asking about the best way of doing it so, please,
stop writing comments like this, that drive nowhere.

> > (I am sure the TCP/IP stack is
> > not a trivial thing)
>
> Compared to "real" telecommunications protocols it is a piece of cake.
> Its simplicity is the reason why it go so popular compared e.g. to the
> once rivaling OSI protocol stack.

I don't agree. It was pure merchandising: just a race on which one made
the best efforts in becoming a standard. TCP/IP is not so simple, it is
just a subset of the OSI stack, and both share the same background
ideas, which are not trivial.

> > do you recommend me
> > "opening" it on sourceforge or something like that, and share it with
> > other thinking heads?, are you one of those thinking heads :) ?.
>
> Aren't you supposed to do your PhD thesis on your own? Something smells
> fishy here. What's the name of your university?

The same as I told you a couple paragraphs before.

> /Thomas
> --
> The comp.lang.java.gui FAQ:
> ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
> http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
_Hobbes - 12 Dec 2005 15:09 GMT
Thomas Weidenfeller ha escrito:

> > I am thinking of developing a network application for my PhD,
> [...]
[quoted text clipped - 3 lines]
> Isn't that the point of a PhD thesis? To demonstrate that you can do
> something non-trivial and complex?

Yes, it is, but what I would like to demonstrate with this PhD is NOT
that I am capable of developing the TCP/IP stack in Java, but to reach
conclusions with its implementation. As I said in a previous message, I
need a total control of what the TCP/IP internally does, but the goal
is to conclude things based on some tests.
It seems that this thread is converting in "what a PhD should
demonstrate" or "why the hell do you want to do that". I DO know what I
want to do, I'm just asking about the best way of doing it so, please,
stop writing comments like this, that drive nowhere.

> > (I am sure the TCP/IP stack is
> > not a trivial thing)
>
> Compared to "real" telecommunications protocols it is a piece of cake.
> Its simplicity is the reason why it go so popular compared e.g. to the
> once rivaling OSI protocol stack.

I don't agree. It was pure merchandising: just a race on which one made
the best efforts in becoming a standard. TCP/IP is not so simple, it is
just a subset of the OSI stack, and both share the same background
ideas, which are not trivial.

> > do you recommend me
> > "opening" it on sourceforge or something like that, and share it with
> > other thinking heads?, are you one of those thinking heads :) ?.
>
> Aren't you supposed to do your PhD thesis on your own? Something smells
> fishy here. What's the name of your university?

The same as I told you a couple paragraphs before.

> /Thomas
> --
> The comp.lang.java.gui FAQ:
> ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
> http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Chris Smith - 13 Dec 2005 15:11 GMT
> Isn't that the point of a PhD thesis? To demonstrate that you can do
> something non-trivial and complex?

Absolutely not.  Or rather, it shouldn't be.  I'm not familiar with the
general standards for giving out the Ph.D. degree by graduate computer
science departments.

Demonstrating the ability to implement a fairly complex project might be
the point of a senior project for a Bachelor's degree.  A Ph.D. thesis
is intended to demonstrate the ability to contribute theoretically
interesting work to a field.  Whether the code is complex is
immaterial... although clearly it's necessary that the problem itself be
non-trivial, which implies a certain level of complexity of the code.

Sounds to me like the OP wants a configurable TCP/IP stack to work with,
so that he could then perform interesting theoretical work with it.  If
so, and if that interesting work really is interesting, then I can't see
one whit why it would matter to someone evaluating the thesis work how
difficult it was to implement the configurable TCP/IP stack.

> > do you recommend me
> > "opening" it on sourceforge or something like that, and share it with
> > other thinking heads?, are you one of those thinking heads :) ?.
>
> Aren't you supposed to do your PhD thesis on your own? Something smells
> fishy here. What's the name of your university?

Nothing smells fishy to me about the "supposed to do your own" concern.  
Lots of open source projects were originally created for research
purposes, and some number were explicitly designed to make research
easier.  One that comes to mind from a Java perspective is Intel's ORP
from a few years back, which explicitly rejected optimizations that
complicated the JIT and GC interfaces, so as to make it easier for
researchers.

What does seem unlikely about this particular idea is that the OP will
be able to start a working open-source project without contributing the
initial code for version 1.  My advice here is the same as always.  The
first step to starting a thriving open source project is to have working
code, NOT an idea.  Lots of people have ideas.  Once you have code
that's useful to someone, they will THEN use it and, possibly, come back
with enhancements.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Thomas Weidenfeller - 13 Dec 2005 20:02 GMT
>>Isn't that the point of a PhD thesis? To demonstrate that you can do
>>something non-trivial and complex?
>
> Absolutely not.  Or rather, it shouldn't be.
[...]
> Demonstrating the ability to implement a fairly complex project might be
> the point of a senior project for a Bachelor's degree.

I didn't mention "implementation". I just wrote "doing something". The
OP sounds as if his "something" is "implementation":

OP> I am thinking of developing a network application for my PhD, and it
OP> involves (among other stuff) my own implementation of the TCP/IP
OP> protocols.

If implementing that application (including the TCP/IP stack) is his PhD
thesis (your guess is as good as mine ...), then I would expect that he
has to do it on his own.

/Thomas
_Hobbes - 13 Dec 2005 21:57 GMT
Thomas Weidenfeller ha escrito:

> >>Isn't that the point of a PhD thesis? To demonstrate that you can do
> >>something non-trivial and complex?
[quoted text clipped - 14 lines]
> thesis (your guess is as good as mine ...), then I would expect that he
> has to do it on his own.

Ummm, yes, it might be misunderstood (as it has been). I'm sorry for
the way I started this thread. The thing is that the objective is not
the development of the application (as someone has said in this same
thread, it would be fine for a computer science project at university,
but NOT for a PhD). The objective is the analysis of communication
protocols in several ways, and one of the "collateral damages" is the
development of an application that helps me understand these protocols,
and play a little bit with them. Finally, one of the steps for creating
that application, is the implementation of the TCP/IP stack. I chose
Java because it is the language I know the best.

I am not alone at my PhD: I have a tutor that accepted my proposal of
investigation, so I assume it is valuable for a PhD. The only thing I
was asking for, was some advice on the TCP/IP stack implementation. My
question has finally turned (more or less) in an discussion
(constructive in its own way :P) about what a PhD should deal of.

Anyway, I think I have extracted some good conclusions, and it has
helped me on deciding my next steps. However, any further comments are
still welcomed =)

> /Thomas
Monique Y. Mudama - 13 Dec 2005 22:54 GMT
> Ummm, yes, it might be misunderstood (as it has been). I'm sorry for
> the way I started this thread. The thing is that the objective is
[quoted text clipped - 18 lines]
> helped me on deciding my next steps. However, any further comments
> are still welcomed =)

My comment is that I think you're probably better off implementing
TCP/IP in C or similar.  I know that you know Java better, but it's
really not suited to this task.  And you can probably find any number
of open source TCP/IP implementations in which you can easily tweak
the parameters you want to change; I just doubt you'll find them in
Java.

To be honest, it surprises me to read about a PhD candidate choosing a
particular language just because he knows it best.  I thought the whole
point of getting a CS degree, as opposed to picking up "Learn this
language in 21 days" books, is to understand computer science on a deep
enough level that you're not tied to any particular language.  It makes
me wonder if the only reason you're avoiding C/C++ is dealing with
memory allocation.  And that makes me think you really ought to
implement it in one of those languages, because a person with a PhD in
CS really ought to at least get some experience with that kind of thing.
Especially if his interest is in low-level stuff like communication
protocols.

Signature

monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

Joseph Dionne - 16 Dec 2005 13:17 GMT
> Thomas Weidenfeller ha escrito:
>
[quoted text clipped - 41 lines]
>
>>/Thomas

For what it is worth, I offer my two cents.

I assume your analysis of communications protocol, namely TCP over IP, will
encompass throughput performance.  In this regard, Java's JVM performance will
have a big affect on overall communications performance.  Perhaps Java, or any
interpreted language, is not ideal for this purpose.

With that said, and as many have others have said, there are many TCP/IP
stacks in c in the public domain.  Here is another resource for some micro
stacks, and combined with the RFCs for the protocol will speed your development.

http://my.execpc.com/~geezer/osd/net/

But, if Java is your choice, you really only need to JNI the low level socket
functions that give you access to the interface device, writing you protocol
stack in pure java.   I would recommend creating a JNI library of bit diddling
 functions, and even JNI functions to move packet streams to Java variables
simply for speed.

If you are less familiar with c/c++ than Java, I recommend you code a little
as possible in JNI.  I assume again you are comfortable with JNI, and you will
spend more time coding Java than JNIs.  I suspect your JNI library will have
less than a dozen native functions.

Joseph
Roedy Green - 16 Dec 2005 14:48 GMT
> Perhaps Java, or any
>interpreted language, is not ideal for this purpose.

Java is not just an interpreted language. It is interpreted, hot
spotted, jitted and AOTed and perhaps a few others I have not heard
of.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Luc The Perverse - 17 Dec 2005 01:49 GMT
>> Perhaps Java, or any
>>interpreted language, is not ideal for this purpose.
>
> Java is not just an interpreted language. It is interpreted, hot
> spotted, jitted and AOTed and perhaps a few others I have not heard
> of.

LOL - Well that is definitely one way to put it

--
LTP

:)
ricky.clarkson@gmail.com - 13 Dec 2005 14:35 GMT
I have implemented a 'toy' IP stack as part of Netsim [1].  The version
available online is a little old now, but it's still in very active
development.  The source is closed, but that is not a fixed situation.
The main reason not to release source is so that students don't steal
it.  I disagree with the reason, but haven't argued much because nobody
has expressed real interest in the source.

I've considered extending it to send out real packets, and yes, JNI is
one option.

There are some libraries available to help with this [2] [3], which I
presume use JNI.  Another option is IPC.  You could have a (relatively)
simple C program to which your Java program connects, and when you send
the C program a packet it will send it to the OS.

Of course, either way loses some of the portability that Java tries to
offer.

[1] www.netsim.info
[2] http://sourceforge.net/projects/jpcap/
[3] http://www.jopdesign.com/ejip/index.jsp


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.