i am trying to design a simulation with java for my project title location-aware communication to achieve social inclusion and social responsibility which is a telecommunication project which conveys messages to subscribers that are mostly affected or benefited by the piece of information and shows boosters that are necessary to make this possible.
Im facing one problem in streaming data capture for reading the broadcast during multithreading, pls help if u get time,
Actually there is one class which is reading data from one of the udp socket another class is their which accepts the tcp connection from every client request and creates a thread for every client and request the same udp class for data the thing is working with 1st thread which gets created but when i request with another client from another pc/ip the packets get losted to the 2nd client/thread
I have made a workaround by creating a list where im storing the Threads outputstream object
and looping it to send the data to all the client but this is just temporary as it ll delay the packets if clients/connections gets increased
there is one class which is reading data from one of the udp socket another class is their which accepts the tcp connection from every client request and creates a thread for every client and request the same udp class
So which is it: TCP or UDP? There is a difference and it affects how your program needs to operate.
TCP is accepting connections from client requests , and create a thread which internally calls a class in run method of thread which create a udp connection and continously receives the data from the udp port and writes it to the tcp connection outputstream object
You have UDP port which recieves data.
You have TCP listener which accepts client connections.
Once you have a client connection you want to send some or all of the data from the UDP port to those clients (it doesn't matter whether it is some or all as that is a different problem.)
Solution to the above.
1. Create a thread safe pipe which allows for a single input and allows for multiple readers. This has NOTHING to do with UPD nor TCP.
2. Test it.
3. Test it again using threads.
1. Creaet a UPD port
2. Set up the UPD port to write messages (data collected from port into something meaningful) to the pipe.
3. Test this. Note that this has NOTHING to do with TCP.
1. Create a TCP listener
2. For each listener request hook up as a reader to the pipe.
3. Test this. Note that this has NOTHING to do with UDP.
I will look after a few days on the developement of an application jee a little big but I decided to devote one week prior to document more about IDEs and frameworks
then after my little research, I found netbeans for me the most because I like it more than eclipse and I will rely on the tutorial application full e-commerce to the doc netbeans to make my application,
but on the use of framework, I have not a clue what to do
is that because this is the first application I must not do all even if it is large
or I have to use because it facilitates the work
what do you advise me
and if I have to use them: to which you can direct me: JSF, Spring, Struct ......
You can use Eclipse RCP as a framework for your application. It is working fine and also pretty well documented. The Framework provides a lot of features that one otherwise has to develop oneself.
You have to develop under Eclipse, but that is anyway the most common used IDE. With a little experience you'll begin to love it because it's so simple and structured.
Java EE spread in a wide range, like JSF, JSP, Spring, etc... So its all depend on what you really want to do. My advice is take the only tutorial and work on with that. With the time you can have a better understanding about the subject matter.
Don't stick with one IDE. Each and every has there own advantages and disadvantages. In almost all the IDEs you can easily attach the Java DOC and refer any time you want.
Using JDK 1.6 with the Cryptix encryption libs, I get this error: Error:java.lang.RuntimeException: NYI. I've updated the Security jars with many different version, but still get the same error. Suggestions please?
I am asking this question because I recently installed and then uninstalled eclipse IDE because it put me under lots of troubles for java whereas NetBeans is running quite smoothly with lots of support.There are lots of problems with JDBC driver with Eclipse (as far as I know) and no search engine even their own FAQ's don't provide the exact solution
Always believe in God and never let misfortunes make you give up
I use Netbeans and I like it. Others may disagree as it is a mater of preference as far as I'm concerned.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DDEthel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett