Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we do networking by java programs like Manage switches do?  RSS feed

 
Mandar Khire
Ranch Hand
Posts: 575
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using Java program with few Embedded boards which has c program as firmware written in c by my friend.
Java program send & receive frames from those embedded boards by socket programming. Embedded boards also send & receive frames from Java program with help of its firmware.
Each board has connected to manage switch(i called as member switches). Each board has only 1 Ethernet port.
All member switches connected to one Main manage switch which has connected to PC where Java program runs.
Network topology is Daisy chain topology which support Redundancy in networking till 1 link failure.

Now i am thinking i can change in Java & my friend can change in firmware so we can remove all manage switches from whole network.
So if i connect 2 network cards in my pc so i get 2 Ethernet ports & try to take control it by my program, then all work done by Manage switches can be handle by Java program!
For that i think Each embedded board also need 2 Ethernet ports. So we can manage same topology but without any kind of manage switches.

For functionality implementation which similar to manage switches has like Redundancy.
I try to figure out requirements related to this as follows:-
I have to at-least 5 programs like below:-
1. Message Identification :- When some board or java program send frame, then till reach to its destination it go via few boards or Java program so it should be handle like if i am board then 'this message not for me but for abc so i forward it to my neighbour & i will not repeat this so message flood not happens'.

2. Handling Port behaviour :- Physical network port should work as we need example sending port, receiver port, or bi-directional port.

3. Maintaining Routing & other Tables:- In networking switches maintain Routing & other tables thats why we not have head-ache about how our data goes to sender to receiver. Something like this i need to implement in java program.

4. Finding Shortest path:- Like Dijkstra's algorithm or OSPF, RIP etc something should implement in program.

5. Message Transferring :- As message goes to sender to receiver there might be few nodes comes in the path, as manage switches cross verify those messages for whom, if not for it or related to its connected board then it transfers to someone who in the path. Similarly i have to implement in program.

As we have 2 people, 1 for java & 2nd for C. I have to take lead in this so all thinking should done by me!
I need help for my thoughts!

Now question for this forum is as follows:-
1. Is my thinking is in right direction?
2. By Java, can i manage all above theories? As till date i use simple socket programming where i not bother what happens after

3. If yes then any expert guidance?
4. If no then Reasons?
5. Any other thing missing in this?

Please i need clue/help/guidance!
 
Henry Wong
author
Sheriff
Posts: 23284
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mandar Khire wrote:
Now i am thinking i can change in Java & my friend can change in firmware so we can remove all manage switches from whole network.
So if i connect 2 network cards in my pc so i get 2 Ethernet ports & try to take control it by my program, then all work done by Manage switches can be handle by Java program!
For that i think Each embedded board also need 2 Ethernet ports. So we can manage same topology but without any kind of manage switches.


Hmmm.... how would you connect computers together with only two NICs on each computer and no switch? The only way that I can see it happening is a layout like a token ring network, which in my opinion, is a really poor design (shame on you IBM).

Henry
 
Mandar Khire
Ranch Hand
Posts: 575
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry Wong,
Hmmm.... how would you connect computers together with only two NICs on each computer and no switch? The only way that I can see it happening is a layout like a token ring network, which in my opinion, is a really poor design (shame on you IBM).


As you say i can assume you are visualising as follows:-


But in above gif, we can see each node connect to switch/bridge which handles communication.
My point is java program(in pc) + c program(firmware in embedded board) handle all networking communication!
There is no bridge/switch etc in whole network! But look like above image!

As Token ring/IEEE 802.5 but my current manage switches use IEEE standards as follows:-

So java program & c program also should work as those manage switches! Can this possible?
What should i take steps?
 
Henry Wong
author
Sheriff
Posts: 23284
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

As I already mentioned, token ring is a pretty poor design and you don't need me to explain why...

But if you want to try it out yourself, sure go ahead -- go for it.

Henry
 
Mandar Khire
Ranch Hand
Posts: 575
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks once again Henry Wong,
As I already mentioned, token ring is a pretty poor design and you don't need me to explain why...

I found same. Poor design.
But then how i can solve problem?
1. Fix thing...Remove all switches & bridges...done all with java & c program! How can i?
Now real confusion happens.
 
Henry Wong
author
Sheriff
Posts: 23284
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mandar Khire wrote:
1. Fix thing...Remove all switches & bridges...done all with java & c program! How can i?
Now real confusion happens.


Can't help you here. You are considering re-engineering what the folks at IBM took probably more than 10 years doing. This is not exactly an easy task.

Personally, I would probably start to see if you need twisted pair cables. Some NICs, particularly the older ones, assume that it is always connected to a switch. Newer ones are smart enough to detect that it is connected to another NIC and adjust accordingly. If you are using older NICs (or very cheap ones), you probably need to use twisted pair cables.

Henry
 
Mandar Khire
Ranch Hand
Posts: 575
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry Wong once again,

Can't help you here. You are considering re-engineering what the folks at IBM took probably more than 10 years doing. This is not exactly an easy task.

I proud that something i got to do which consider such a way by author such as you.

If i use 1 manageable switch which connected between pc which has java program & all embedded boards(connected with first board & last board in whole topology).
But then by java & c program how can i manage the networking things?
Because as
Some NICs, particularly the older ones, assume that it is always connected to a switch.

If i use NIC in embedded boards, it needs switch & Un-manage switches flood the messages, though 1 manage switch try to stop flood as its end but between boards connectivity flood is there.
Newer ones are smart enough to detect that it is connected to another NIC and adjust accordingly.

If i consider these, then how can i all networking stuff handle in java & c program? I have to show smartness of networking in java & c only!
If you are using older NICs (or very cheap ones), you probably need to use twisted pair cables.

I can have facility to use any kind of network cable but have to do all things in java & c which done by manage switches currently.
Once again needed help!
If as
Can't help you here.

Then where?
 
Henry Wong
author
Sheriff
Posts: 23284
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mandar Khire wrote:
Can't help you here.

Then where?


No idea. But good luck on the project.

Henry
 
Mandar Khire
Ranch Hand
Posts: 575
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry Wong!
I will share if i get success in this project or task!
I always wonder how people wants something which not easily available! By manage switches which easily available in market i shown perfect thing. But no, without that needs perfect things.
Perfect...That's call Life!
If some other person has solution...Welcome otherwise i will try & share updates!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!