Re: What is a best way of decoding variable size records?
Hello Andrei, I think the CumulativeProtocolDecoder is the way to go. You don't necessarily have to throw away all the work, since your decoder could be stateful. When it has partially decoded a record, it can store this data and when more data becomes available, continue from there. How does your existing code determine that you have enough data to decode a record ? Maarten On 9/26/07, Andrei Palskoi [EMAIL PROTECTED] wrote: Hi, I am new to this forum. I have some code that converts COBOL copybook records, which can have variable length, into Java objects. For some reasons the byte length of the record cannot be passed up front. So my existing code uses blocking I/O (buffered InputStream) and it works pretty well. I have a server around it that was built on top of Apache Phoenix code. The Phoenix project is no longer supported so I've decided to move to Apache MINA which looks pretty cool too. However, I am not sure what is the best way of integrating my code into it. As far as I can see, there are two ways: 1) Implement a subclass of StreamIoHandler and get back to good old blocking I/O. But I can see that experts here recommend not doing so unless absolutely necessary. Also, why Handler and not Filter? 2) Implement a subclass of CumulativeProtocolDecoder that will try to decode message and if there is not enough bytes available yet, return false so that MINA comes back with more data. Well, that seems highly ineffective, especially when working with large records - you have to throw away all the work and redo it again when more data becomes available. Suggestions? Thanks, Andrei -- View this message in context: http://www.nabble.com/What-is-a-best-way-of-decoding-variable-size-records--tf4518931s16868.html#a12890468 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: ASyncWeb v/s Tomcat 5.5.20 Performance issues
My test may not be right, I was trying to simulate a larger number of concurrent HTTP conections. Could you review my test methodology and suggest a more meaningful NIO test? jgenender wrote: A few considerations for you... Be sure to tweak your TCP IP parameters or you will hit a wall very quickly with AsyncWeb. You need to significantly up your socket queue lengths and significantly decrease your TCP time wait. Otherwise you will fill your IP queue and your server will probably appear to hang for a while waiting for the TIME_WAIT and SYN_RECV to clear. There are probably several changes you need to tweak your IP stack. Google on tuning IP parameters for your OS and you should find lots of articles on how to. Also be sure you have a large enough acceptCount size to be sure it will handle the load, or you will get rejected connections. I would tweak the acceptCount to equal your maximum concurrent connections. Also...something else to keep in mind...AsyncWeb is really going to shine in concurrent connections, not necessarily transactions per second. This means it could handle a lot more load than a single threaded connector on Tomcat could. Thus speed is not necessarily a good way to measure scalability. Jeff Deepak J wrote: Perhaps not the right forum to post these results. But just wanted your opinion on the tests. S/W versions: Tomcat 5.5.20 ASyncWeb 0.8.2 JRE 1.5.0._06 Test Methodology: A multi thread client constructs HTTP/POST messages (headers + content). The size of each message is ~160KB. The client can be pointed either at Tomcat or at ASyncWeb server. The number of client threads and iterations per thread is configurable. Thus a config of thread=10 iterations=1000 will result in 1 HTTP/POST. Keep-Alive functionality is not being tested hence after each HTTP connection there is a call to disconnect(). A static counter is incremented after a 200 OK. After all client threads complete execution a result is printed indicating total time taken for the test, number of 200 OK received total connections/sec The server code, which resides in the Tomcat Servlet and ASyncWeb stand-alone app is identical in functionality in both places. When a request is received the Content-Length header is fetched. Data from the InputStream is read in a while loop and writtern in byte chunks of size 1024 to a byte array output stream. Once the stream has been read, the size of the byte array is compared with the content-length and a log is printed if they don't match. On successful completion a 200 OK is returned. Test Results: NoThreads Iterations Tomcat 5.5.20 ASyncWeb 0.8.2 - 1 10 1000 Test duration = 138626 millis Test duration = 901996 millis Total Connections = 9995 Total Connections = 1 Connections/Sec = 72 Connections/Sec = 11 2 1002 Test duration = 2878 millis Test duration = 20892 millis Total Connections = 200 Total Connections = 200 Connections/Sec = 69 Connections/Sec = 9 3 500 10Test duration = 41796 millis OutOfMemory in Server Total Connections = 5000 Connections/Sec = 119 - Now I am wondering if there are tweeks needed to get better number. Should AsyncWeb not perform better that Tomcat's One-Thread-Per-Connection model? -- View this message in context: http://www.nabble.com/ASyncWeb-v-s-Tomcat-5.5.20-Performance-issues-tf4504220s16868.html#a12895391 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: Problem with slf4j and log4j
When PropertyConfigurator is loaded at the entry point of the application such as in the main() method, will other classes used the same properties configuration as well? Thank You! Emmanuel Lecharny-3 wrote: http://www.slf4j.org/manual.html On 9/25/07, kwtan [EMAIL PROTECTED] wrote: I have a big problem using slf4j with log4j! I am not sure which jar to use in the classpath. How do I log it into a file using log4j properties file. how do I load the properties file? many questions, I can't find a good documentation to solve my problem! Mina is lack of documentation! Can somebody help me, where to find the resources? a simple sample is appriciated, Thank you. -- View this message in context: http://www.nabble.com/Problem-with-slf4j-and-log4j-tf4517137s16868.html#a12884970 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com. -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com -- View this message in context: http://www.nabble.com/Problem-with-slf4j-and-log4j-tf4517137s16868.html#a12896966 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: Asynchronous timeout/sleep/delay/etc.
yz wrote: It requires another thread. It requires a thread that is dedicated to managing scheduling as a daemon, but it certainly is not blocking anything else. I believe this is probably one of the components that is best suited for scheduling a timeout as it scales incredibly well. I have written some that handle 1000s of concurrent connections and have no issues at all. When you send a message, you would create a Future task via the SchedulerExecutorService in your messageSent(), with an ioSession as a member of the Future task. This requires nearly no overhead and has absolutely no blocking associated with it. If you receive a response w/in the allotted time, you cancel the timeout. If not, your task fires, and you can close the connection or do other actions. If you expect many many connections, you can use a thread pool to handle the firing of the tasks. If using a scheduler is not working for you, then you could make use of the session idler, but then you still are using an internal thread that is monitoring the idling time (which happens anyways), as a daemon. You are not going to get around something that polls something else, its the nature of the IO beast in just about any programming language. In any case, I do not see any reason why a ScheduledExecutorService is a bad thing. Jeff jgenender wrote: How is the ScheduledExecutorService a blocking mechanism? Jeff yz wrote: I just started playing around with Mina, and I tried searching the archives for a discussion about this, but I noticed a glaring lack of any asynchronous scheduling of callbacks. I.e., we can't schedule a timeout/sleep/delay within this framework. Is this accurate? Is there some reason why this relatively straightforward and standard feature is not available in this framework? As a workaround, it seems that we must resort to synchronous, blocking timeout mechanisms (e.g. ScheduledExecutorService). Is the general approach here to simply save the IoSession (while inside one of the IoHandler callbacks) and use it (a) from other threads (b) at any time in the future? If this is the case, meaning the IoSession never changes across the IoHandler callbacks, then why is IoSession continually passed back into those callbacks? IoSession says it's thread-safe (I assume this implies the thread-safety of the reactor core as well) but the Filters may not be. How do I tell if a particular filter is thread-safe? In particular, I'm interested in LoggingFilter and ProtocolCodecFilter with ObjectSerializationCodec, but for these there's no mention in the docs regarding their thread-safety. Thanks in advance for your answers.
DatagramConnector - broadcast message sending problem
I've written a simple datagram broadcast sender application using Mina 1.1.2. It works correctly but after ~1 minute the IoSession.write() always throws an org.apache.mina.common.RuntimeIOException exception. There is exactly one IoSession instance during the application lifecycle. The full stacktrace is shown bellow: org.apache.mina.common.RuntimeIOException: java.net.SocketException: Socket operation on nonsocket: sun.nio.ch.Net.setIntOption at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:262) at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl.write(DatagramSessionImpl.java:163) at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:136) at hu.infomatix.mango.ox.daemon.mail.test.DatagramBroadcastSender.main(DatagramBroadcastSender.java:65) Caused by: java.net.SocketException: Socket operation on nonsocket: sun.nio.ch.Net.setIntOption at sun.nio.ch.Net.getIntOption0(Native Method) at sun.nio.ch.Net.getIntOption(Unknown Source) at sun.nio.ch.DatagramChannelImpl$1.getInt(Unknown Source) at sun.nio.ch.SocketOptsImpl.getBoolean(Unknown Source) at sun.nio.ch.SocketOptsImpl.broadcast(Unknown Source) at sun.nio.ch.OptionAdaptor.getBroadcast(Unknown Source) at sun.nio.ch.DatagramSocketAdaptor.getBroadcast(Unknown Source) at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:260) ... 3 more How could i get rid of this error? Thanks in advance for your answers. -- View this message in context: http://www.nabble.com/DatagramConnector---broadcast-message-sending-problem-tf4522509s16868.html#a12901404 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
[jira] Commented: (DIRMINA-353) Import AsyncWeb from Safehaus
[ https://issues.apache.org/jira/browse/DIRMINA-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530460 ] Dan Diephouse commented on DIRMINA-353: --- Anyone still working on this? :-) Import AsyncWeb from Safehaus - Key: DIRMINA-353 URL: https://issues.apache.org/jira/browse/DIRMINA-353 Project: MINA Issue Type: Task Reporter: Cameron Taggart From the [EMAIL PROTECTED] mailing list where AsyncWeb currently is: (1) Trustin as the MINA chair needs to check that the software grant has been filed by the ASF Secretary after receiving it via fax from LogicaCMG. (2) The MINA TLP must complete the IP Clearance process to enable an import into their SVN repository: http://incubator.apache.org/ip-clearance/index.html HTH, Alex James Im wrote: I'm afraid I don't understand the process (I'm not involved in it, just curious). Who needs to do what now? Alex Karasulu wrote: Cameron Taggart wrote: Alex, did you receive the ASF release grant that Dave is referring to? Isn't that that only thing keeping it from being moved over under MINA? I reported the notification the LogicaCMG lawyers gave me then ping'd the MINA PMC to watch the software grants file for commits by the ASF secretary. My job was to make that happen. I think it has someone just needs to check the software grants file. Alex -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: What is a best way of decoding variable size records?
Well, the problem is that my parser uses recursive calls (records can have subrecords which can be collections of subrecords...) and if it hits the end of available data, it is pretty hard to bookmark its state and make it jump back to the same point once more data is available. Or so I think - it's been a while since I wrote it... The way how the code knows how much data is needed is pretty tricky. Basically, at any node in a record tree it can tell how many children will follow, and for each child it will be able to tell whether its byte size is fixed or dynamic (i.e. it can have variable number of descendant nodes itself). It's the same as parsing a huge XML file using streaming API. If you have a state engine, you can come back to the same point with more data. But my parser simply tries to read as much data from the InputStream as needed and throws EOFException if SO_TIMEOUT on read() has been exceeded. I guess I better add some statefulness to it. Maarten Bosteels-4 wrote: Hello Andrei, I think the CumulativeProtocolDecoder is the way to go. You don't necessarily have to throw away all the work, since your decoder could be stateful. When it has partially decoded a record, it can store this data and when more data becomes available, continue from there. How does your existing code determine that you have enough data to decode a record ? Maarten On 9/26/07, Andrei Palskoi [EMAIL PROTECTED] wrote: Hi, I am new to this forum. I have some code that converts COBOL copybook records, which can have variable length, into Java objects. For some reasons the byte length of the record cannot be passed up front. So my existing code uses blocking I/O (buffered InputStream) and it works pretty well. I have a server around it that was built on top of Apache Phoenix code. The Phoenix project is no longer supported so I've decided to move to Apache MINA which looks pretty cool too. However, I am not sure what is the best way of integrating my code into it. As far as I can see, there are two ways: 1) Implement a subclass of StreamIoHandler and get back to good old blocking I/O. But I can see that experts here recommend not doing so unless absolutely necessary. Also, why Handler and not Filter? 2) Implement a subclass of CumulativeProtocolDecoder that will try to decode message and if there is not enough bytes available yet, return false so that MINA comes back with more data. Well, that seems highly ineffective, especially when working with large records - you have to throw away all the work and redo it again when more data becomes available. Suggestions? Thanks, Andrei -- View this message in context: http://www.nabble.com/What-is-a-best-way-of-decoding-variable-size-records--tf4518931s16868.html#a12890468 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/What-is-a-best-way-of-decoding-variable-size-records--tf4518931s16868.html#a12903011 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: DatagramConnector - broadcast message sending problem
Hi DCSReply, On 9/26/07, dcsepely [EMAIL PROTECTED] wrote: I've written a simple datagram broadcast sender application using Mina 1.1.2. It works correctly but after ~1 minute the IoSession.write() always throws an org.apache.mina.common.RuntimeIOException exception. There is exactly one IoSession instance during the application lifecycle. The full stacktrace is shown bellow: org.apache.mina.common.RuntimeIOException: java.net.SocketException: Socket operation on nonsocket: sun.nio.ch.Net.setIntOption at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:262) at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl.write(DatagramSessionImpl.java:163) at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:136) at hu.infomatix.mango.ox.daemon.mail.test.DatagramBroadcastSender.main(DatagramBroadcastSender.java:65) Caused by: java.net.SocketException: Socket operation on nonsocket: sun.nio.ch.Net.setIntOption at sun.nio.ch.Net.getIntOption0(Native Method) at sun.nio.ch.Net.getIntOption(Unknown Source) at sun.nio.ch.DatagramChannelImpl$1.getInt(Unknown Source) at sun.nio.ch.SocketOptsImpl.getBoolean(Unknown Source) at sun.nio.ch.SocketOptsImpl.broadcast(Unknown Source) at sun.nio.ch.OptionAdaptor.getBroadcast(Unknown Source) at sun.nio.ch.DatagramSocketAdaptor.getBroadcast(Unknown Source) at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:260) ... 3 more How could i get rid of this error? Thanks in advance for your answers. What operating system do you use? On what address did you bind? In most operating systems, you have to bind on 0.0.0.0 like the following: acceptor.bind(new InetSocketAddress(8080), ...); Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
Do i need to use threadpool in my iohandler to improve performance?
thanks! -- View this message in context: http://www.nabble.com/Do-i-need-to-use-threadpool-in-my-iohandler-to-improve-performance--tf4523297s16868.html#a12904139 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Environment switch causing strange SocketExceptions
All - We've just recently deployed a Mina-based server (using mina-core-1.0.3) to production that had been in testing for some time. We are now getting a strange error that we had never seen during testing. The server is a fairly simple request / response multi-threaded server that uses our own custom protocol codec for encoding and decoding messages. The codec uses a line length to separate initialization messages, and then a delimiter for all subsequent messages. We use a edu.emory.mathcs.backport.java.util.concurrent.Executors.newCachedThreadPoolexecutor with an ExecutorFilter to handle requests in different threads. The max # of threads is set using the # of processors + 1, as in the mina tutorial. We are getting a strange socket connection that is always paired with a strange java.lang.Integer / java.lang.String mismatch? Additionally, we've noticed that a new thread is being spawned for each incoming request and that these threads are no longer returning to the thread pool as they were during the testing phase. The server runs as a windows service using JavaService and we are continuously restarting as the memory usage climbs above 500 MB or so. We are now getting the following exceptions, sometimes after a single request, sometimes after 10-15, as extracted from our log files: 2007-09-25 10:28:07,821 [SocketAcceptorIoProcessor-0.3] INFO package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] EXCEPTION: java.net.SocketException: Connection reset by peer: Read failed at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:42) at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:265) at sun.nio.ch.IOUtil.read(IOUtil.java:238) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:223) at org.apache.mina.transport.socket.nio.SocketIoProcessor.read( SocketIoProcessor.java:267) at org.apache.mina.transport.socket.nio.SocketIoProcessor.process( SocketIoProcessor.java:241) at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500( SocketIoProcessor.java:44) at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run( SocketIoProcessor.java:563) at org.apache.mina.util.NamePreservingRunnable.run( NamePreservingRunnable.java:43) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker( ThreadPoolExecutor.java:987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:528) at java.lang.Thread.run(Thread.java:832) 2007-09-25 10:28:07,821 [SocketAcceptorIoProcessor-0.3] INFO package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] CLOSED 2007-09-25 10:28:07,821 [pool-1-thread-32] ERROR package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] Connection with client closed abnormally. Exception: Connection reset by peer: Read failed 2007-09-25 10:28:07,836 [pool-1-thread-32] ERROR package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] Connection with client closed abnormally. Exception: java/lang/Integer incompatible with java/lang/String As you can see, this is on the 32nd thread spawned and is the 32nd message received since the server started. We currently only have a single client connected to the server. Has anyone ever seen anything like this before? Any ideas? Thanks in advance for your help! Best, Matt
Re: Environment switch causing strange SocketExceptions
Also noticed during testing in my own dev environment that if I wait for a few minutes between sending messages to the server, a new thread is always used by the executor filter. For example, if I connect and send three requests one after the other, the executor filter uses thread-1 for each request. If i wait five minutes and send the same request again on the same connection, the log shows thread-2 being used. Looking at my task manager, I can confirm that a new thread is indeed being launched after every increment. Thanks, Matt On 9/26/07, Matt Mehalso [EMAIL PROTECTED] wrote: All - We've just recently deployed a Mina-based server (using mina-core-1.0.3) to production that had been in testing for some time. We are now getting a strange error that we had never seen during testing. The server is a fairly simple request / response multi-threaded server that uses our own custom protocol codec for encoding and decoding messages. The codec uses a line length to separate initialization messages, and then a delimiter for all subsequent messages. We use a edu.emory.mathcs.backport.java.util.concurrent.Executors.newCachedThreadPoolexecutor with an ExecutorFilter to handle requests in different threads. The max # of threads is set using the # of processors + 1, as in the mina tutorial. We are getting a strange socket connection that is always paired with a strange java.lang.Integer / java.lang.String mismatch? Additionally, we've noticed that a new thread is being spawned for each incoming request and that these threads are no longer returning to the thread pool as they were during the testing phase. The server runs as a windows service using JavaService and we are continuously restarting as the memory usage climbs above 500 MB or so. We are now getting the following exceptions, sometimes after a single request, sometimes after 10-15, as extracted from our log files: 2007-09-25 10:28:07,821 [SocketAcceptorIoProcessor-0.3] INFO package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] EXCEPTION: java.net.SocketException: Connection reset by peer: Read failed at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:42) at sun.nio.ch.IOUtil.readIntoNativeBuffer (IOUtil.java:265) at sun.nio.ch.IOUtil.read(IOUtil.java:238) at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:223) at org.apache.mina.transport.socket.nio.SocketIoProcessor.read( SocketIoProcessor.java :267) at org.apache.mina.transport.socket.nio.SocketIoProcessor.process( SocketIoProcessor.java:241) at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$500( SocketIoProcessor.java:44) at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run ( SocketIoProcessor.java:563) at org.apache.mina.util.NamePreservingRunnable.run( NamePreservingRunnable.java:43) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java :987) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:528) at java.lang.Thread.run(Thread.java:832) 2007-09-25 10:28:07,821 [SocketAcceptorIoProcessor-0.3 ] INFO package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] CLOSED 2007-09-25 10:28:07,821 [pool-1-thread-32] ERROR package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] Connection with client closed abnormally. Exception: Connection reset by peer: Read failed 2007-09-25 10:28:07,836 [pool-1-thread-32] ERROR package.handler.ReceiptTaskHandler - [/56.116.73.225:4630] Connection with client closed abnormally. Exception: java/lang/Integer incompatible with java/lang/String As you can see, this is on the 32nd thread spawned and is the 32nd message received since the server started. We currently only have a single client connected to the server. Has anyone ever seen anything like this before? Any ideas? Thanks in advance for your help! Best, Matt
Re: DatagramConnector - broadcast message sending problem
I'm using Windows Vista Windows XP. I attached a sample application it also throws an org.apache.mina.common.RuntimeIOException after one minute. Trustin Lee wrote: Hi DCSReply, On 9/26/07, dcsepely [EMAIL PROTECTED] wrote: I've written a simple datagram broadcast sender application using Mina 1.1.2. It works correctly but after ~1 minute the IoSession.write() always throws an org.apache.mina.common.RuntimeIOException exception. There is exactly one IoSession instance during the application lifecycle. The full stacktrace is shown bellow: org.apache.mina.common.RuntimeIOException: java.net.SocketException: Socket operation on nonsocket: sun.nio.ch.Net.setIntOption at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:262) at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl.write(DatagramSessionImpl.java:163) at org.apache.mina.common.support.BaseIoSession.write(BaseIoSession.java:136) at hu.infomatix.mango.ox.daemon.mail.test.DatagramBroadcastSender.main(DatagramBroadcastSender.java:65) Caused by: java.net.SocketException: Socket operation on nonsocket: sun.nio.ch.Net.setIntOption at sun.nio.ch.Net.getIntOption0(Native Method) at sun.nio.ch.Net.getIntOption(Unknown Source) at sun.nio.ch.DatagramChannelImpl$1.getInt(Unknown Source) at sun.nio.ch.SocketOptsImpl.getBoolean(Unknown Source) at sun.nio.ch.SocketOptsImpl.broadcast(Unknown Source) at sun.nio.ch.OptionAdaptor.getBroadcast(Unknown Source) at sun.nio.ch.DatagramSocketAdaptor.getBroadcast(Unknown Source) at org.apache.mina.transport.socket.nio.support.DatagramSessionImpl$SessionConfigImpl.isBroadcast(DatagramSessionImpl.java:260) ... 3 more How could i get rid of this error? Thanks in advance for your answers. What operating system do you use? On what address did you bind? In most operating systems, you have to bind on 0.0.0.0 like the following: acceptor.bind(new InetSocketAddress(8080), ...); Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6 http://www.nabble.com/file/p12905376/SampleDatagaramBroadcastSender.java SampleDatagaramBroadcastSender.java http://www.nabble.com/file/p12905376/SampleDatagaramBroadcastSender.java SampleDatagaramBroadcastSender.java -- View this message in context: http://www.nabble.com/DatagramConnector---broadcast-message-sending-problem-tf4522509s16868.html#a12905376 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: Do i need to use threadpool in my iohandler to improve performance?
It's unlikely that anyone can give a good answer to such a generic question. 1) It depends highly on the type of application you are writing. 2) Instead of using your own thread-pool, you could also add an ExecutorFilter to the chain for example at the end (thus just before your IoHandler) 3) testing performance of the alternatives will give you the best answer regards, Maarten On 9/26/07, tiandike [EMAIL PROTECTED] wrote: thanks! -- View this message in context: http://www.nabble.com/Do-i-need-to-use-threadpool-in-my-iohandler-to-improve-performance--tf4523297s16868.html#a12904139 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: MINA for HTTP
Mark Webb-4 wrote: If you are using the trunk, check out the protocol-http-server and filter-codec-http subprojects. I checkout yesterday the trunk code from https://svn.apache.org/repos/asf/mina/trunk/ and the no classes under the protocol-http-server. The directory listed below is empty. https://svn.apache.org/repos/asf/mina/trunk/protocol-http-server/src/main/java/org/apache/mina/protocol/http/server Can someone check the svn respository and make sure all the code is checked in? Monika -- View this message in context: http://www.nabble.com/MINA-for-HTTP-tf4481259s16868.html#a12908114 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: MINA for HTTP
The protocol-http-server is the future home of AsyncWeb, when it gets imported. See this issue for details: https://issues.apache.org/jira/browse/DIRMINA-353 Trustin... please! On 9/26/07, monika7 [EMAIL PROTECTED] wrote: Mark Webb-4 wrote: If you are using the trunk, check out the protocol-http-server and filter-codec-http subprojects. I checkout yesterday the trunk code from https://svn.apache.org/repos/asf/mina/trunk/ and the no classes under the protocol-http-server. The directory listed below is empty. https://svn.apache.org/repos/asf/mina/trunk/protocol-http-server/src/main/java/org/apache/mina/protocol/http/server Can someone check the svn respository and make sure all the code is checked in? Monika -- View this message in context: http://www.nabble.com/MINA-for-HTTP-tf4481259s16868.html#a12908114 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: MINA for HTTP
yeah yeah I hear everyone's crying! :) On 9/27/07, Cameron Taggart [EMAIL PROTECTED] wrote: The protocol-http-server is the future home of AsyncWeb, when it gets imported. See this issue for details: https://issues.apache.org/jira/browse/DIRMINA-353 Trustin... please! On 9/26/07, monika7 [EMAIL PROTECTED] wrote: Mark Webb-4 wrote: If you are using the trunk, check out the protocol-http-server and filter-codec-http subprojects. I checkout yesterday the trunk code from https://svn.apache.org/repos/asf/mina/trunk/ and the no classes under the protocol-http-server. The directory listed below is empty. https://svn.apache.org/repos/asf/mina/trunk/protocol-http-server/src/main/java/org/apache/mina/protocol/http/server Can someone check the svn respository and make sure all the code is checked in? Monika -- View this message in context: http://www.nabble.com/MINA-for-HTTP-tf4481259s16868.html#a12908114 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com. -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
[VOTE] Import AsyncWeb from Safehaus to MINA
Hi, There has been enormous amount of requests about importing AsyncWeb under MINA PMC. I must admit that I was too lazy to deal with legal issues even after the proper software grant for AsyncWeb has been received. Now, I'd like to fire the vote for importing AsyncWeb under Apache MINA PMC. AsyncWeb is currently located at: * https://svn.safehaus.org/repos/asyncweb/trunk/ If the vote passes, I will fill out the incubation paperwork at: * http://incubator.apache.org/ip-clearance/index.html And we would then import AsyncWeb under our sandbox at: * https://svn.apache.org/repos/asf/mina/sandbox/asyncweb [ ]: +1, import [ ]: 0, abstain [ ]: -1, don't import Cheers, Trustin Lee -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
Re: [VOTE] Import AsyncWeb from Safehaus to MINA
On 9/27/07, Trustin Lee [EMAIL PROTECTED] wrote: Hi, There has been enormous amount of requests about importing AsyncWeb under MINA PMC. I must admit that I was too lazy to deal with legal issues even after the proper software grant for AsyncWeb has been received. Now, I'd like to fire the vote for importing AsyncWeb under Apache MINA PMC. AsyncWeb is currently located at: * https://svn.safehaus.org/repos/asyncweb/trunk/ If the vote passes, I will fill out the incubation paperwork at: * http://incubator.apache.org/ip-clearance/index.html And we would then import AsyncWeb under our sandbox at: * https://svn.apache.org/repos/asf/mina/sandbox/asyncweb [X]: +1, import Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
Re: [VOTE] Import AsyncWeb from Safehaus to MINA
non-binding +1 Jeff Trustin Lee wrote: Hi, There has been enormous amount of requests about importing AsyncWeb under MINA PMC. I must admit that I was too lazy to deal with legal issues even after the proper software grant for AsyncWeb has been received. Now, I'd like to fire the vote for importing AsyncWeb under Apache MINA PMC. AsyncWeb is currently located at: * https://svn.safehaus.org/repos/asyncweb/trunk/ If the vote passes, I will fill out the incubation paperwork at: * http://incubator.apache.org/ip-clearance/index.html And we would then import AsyncWeb under our sandbox at: * https://svn.apache.org/repos/asf/mina/sandbox/asyncweb [ ]: +1, import [ ]: 0, abstain [ ]: -1, don't import Cheers, Trustin Lee
[VOTE] Import KeepAlive functionality contribution under MINA PMC
Hi again. There's an important contribution from Eero Nevalainen that will help users to implement sending a protocol-specific keep-alive message periodically: https://issues.apache.org/jira/browse/DIRMINA-354 It's just a few classes, so I thought we could just import the code, but procedure is procedure. :) Software grant has been received long time ago, and also again, it was not processed on time due to my laziness. There's no reason not to import these classes IMO; it's just a few classes that makes people's life a lot easier. Once vote passes, I will start the paperwork and all the required procedure. [ ]: +1, import [ ] 0, abstain [ ]: -1, don't import Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
Re: [VOTE] Import KeepAlive functionality contribution under MINA PMC
+1, import - Original Message - From: Trustin Lee [EMAIL PROTECTED] To: dev@mina.apache.org Sent: Wednesday, September 26, 2007 5:24 PM Subject: [VOTE] Import KeepAlive functionality contribution under MINA PMC Hi again. There's an important contribution from Eero Nevalainen that will help users to implement sending a protocol-specific keep-alive message periodically: https://issues.apache.org/jira/browse/DIRMINA-354 It's just a few classes, so I thought we could just import the code, but procedure is procedure. :) Software grant has been received long time ago, and also again, it was not processed on time due to my laziness. There's no reason not to import these classes IMO; it's just a few classes that makes people's life a lot easier. Once vote passes, I will start the paperwork and all the required procedure. [ ]: +1, import [ ] 0, abstain [ ]: -1, don't import Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
Re: [VOTE] Import AsyncWeb from Safehaus to MINA
[X]: +1, import On 9/26/07, Jeff Genender [EMAIL PROTECTED] wrote: non-binding +1 Jeff Trustin Lee wrote: Hi, There has been enormous amount of requests about importing AsyncWeb under MINA PMC. I must admit that I was too lazy to deal with legal issues even after the proper software grant for AsyncWeb has been received. Now, I'd like to fire the vote for importing AsyncWeb under Apache MINA PMC. AsyncWeb is currently located at: * https://svn.safehaus.org/repos/asyncweb/trunk/ If the vote passes, I will fill out the incubation paperwork at: * http://incubator.apache.org/ip-clearance/index.html And we would then import AsyncWeb under our sandbox at: * https://svn.apache.org/repos/asf/mina/sandbox/asyncweb [ ]: +1, import [ ]: 0, abstain [ ]: -1, don't import Cheers, Trustin Lee -- ..Cheers Mark
Re: [VOTE] Import KeepAlive functionality contribution under MINA PMC
[X]: +1, import On 9/26/07, Michael Grundvig [EMAIL PROTECTED] wrote: +1, import - Original Message - From: Trustin Lee [EMAIL PROTECTED] To: dev@mina.apache.org Sent: Wednesday, September 26, 2007 5:24 PM Subject: [VOTE] Import KeepAlive functionality contribution under MINA PMC Hi again. There's an important contribution from Eero Nevalainen that will help users to implement sending a protocol-specific keep-alive message periodically: https://issues.apache.org/jira/browse/DIRMINA-354 It's just a few classes, so I thought we could just import the code, but procedure is procedure. :) Software grant has been received long time ago, and also again, it was not processed on time due to my laziness. There's no reason not to import these classes IMO; it's just a few classes that makes people's life a lot easier. Once vote passes, I will start the paperwork and all the required procedure. [ ]: +1, import [ ] 0, abstain [ ]: -1, don't import Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6 -- ..Cheers Mark
Re: multiple handlers per IoService
A Selector pool something like: http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/net/NioSelectorPool.java On 9/25/07, Trustin Lee [EMAIL PROTECTED] wrote: On 9/25/07, Mark [EMAIL PROTECTED] wrote: Wouldn't it make sense to multiplex a Selector across multiple channels in order to efficiently manage threads since you can have multiple channels being monitored by one selector. You could have 10 channels, 1 selector in the main thread and 1 I/O thread. Currently, 10 channels would mean 10 selectors each in their own thread. Yes, that's what I am saying. By managing a global pool of selectors and I/O processors, we could optimize thread usage. Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6 -- ..Cheers Mark
Re: [VOTE] Import KeepAlive functionality contribution under MINA PMC
[X]: +1, import Alex
Re: [VOTE] Import AsyncWeb from Safehaus to MINA
On 9/26/07, Trustin Lee [EMAIL PROTECTED] wrote: I must admit that I was too lazy to deal with legal issues even after the proper software grant for AsyncWeb has been received. Hehe you were just waiting for me to do it :). [X]: +1, import Alex
Re: [VOTE] Import KeepAlive functionality contribution under MINA PMC
On 9/26/07, Trustin Lee [EMAIL PROTECTED] wrote: ... [ X ]: +1, import [ ] 0, abstain [ ]: -1, don't import Enrique
Re: [VOTE] Import AsyncWeb from Safehaus to MINA
On 9/26/07, Trustin Lee [EMAIL PROTECTED] wrote: ... [ X ]: +1, import [ ] 0, abstain [ ]: -1, don't import Enrique