Re: [akka-user] Akka Streams - UDP messages

2017-07-13 Thread Arnout Engelen
Hi Rajesh,

Where exactly did you add that log message? Perhaps there is something we
can tweak/optimize to drop less UDP data in your case, but in general (as
Konrad mentioned above) the network is also allowed to drop UDP packets, so
if you need reliable transmission UDP is not going to take care of it.


Kind regards,

Arnout

On Thu, Jul 13, 2017 at 3:09 PM, Madabhattula Rajesh Kumar <
mrajaf...@gmail.com> wrote:

> Hi Konrad,
>
> Thank you for the response. In the server side, I have added some debug
> messages. Below is the log message.
>
> Datagram buffer size ({}) exceeded.
>
> Whenever I see this messages, that time messages are dropped.
>
> Regards,
> Rajesh
>
> On Thu, Jul 13, 2017 at 6:33 PM, Konrad “ktoso” Malawski <
> konrad.malaw...@lightbend.com> wrote:
>
>> Hi there,
>> you do realize that UDP, the protocol itself, does not guarantee delivery
>> of anything?
>> It absolutely may and will in practice drop packets - it is designed to
>> do exactly that.
>>
>> Start reading about UDP here https://en.wikipedia.org/
>> wiki/User_Datagram_Protocol and take it from there to networking books
>> and articles.
>>
>> In short, if you’re suprised that UDP “dropped”, you should likely not be
>> using UDP at all :-)
>>
>> — Konrad
>>
>>
>> On 13 July 2017 at 21:34:17, Madabhattula Rajesh Kumar (
>> mrajaf...@gmail.com) wrote:
>>
>> Hi,
>>
>> I am using Akka Streams to read the messages from UDP port and write into
>> the filesystem. It is not able to read all messages. Some messages are
>> dropping.
>>
>> I have found one example program in the github.
>>
>> https://github.com/jpthomasset/akka-udp-stream
>>
>> val source = UdpSource(new InetSocketAddress("127.0.0.1", 9876), 100)
>> val result = source.map(x => x.data.decodeString("UTF-8")).
>> runWith(lineSink(filePath))
>> import system.dispatcher
>> result.onComplete { _ => system.terminate() }
>>
>> def lineSink(filename: String): Sink[String, Future[IOResult]] = {
>> Flow[String]
>>   .map(s => ByteString(s + "\n"))
>>   .toMat(FileIO.toFile(new File(filename)))(Keep.right)
>>   }
>>
>> *Do we need to increase the "maxBufferSize" to receive all messages from
>> UDP?*
>>
>> Please let me know how to receive all messages?
>>
>> Regards,
>> Rajesh
>> --
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/additional/faq.html
>> >> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: http://doc.akka.io/docs/akka/
> current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Arnout Engelen
*Senior Software Engineer*
E: arnout.enge...@lightbend.com
T: https://twitter.com/raboofje

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Akka Streams - UDP messages

2017-07-13 Thread Madabhattula Rajesh Kumar
Hi Konrad,

Thank you for the response. In the server side, I have added some debug
messages. Below is the log message.

Datagram buffer size ({}) exceeded.

Whenever I see this messages, that time messages are dropped.

Regards,
Rajesh

On Thu, Jul 13, 2017 at 6:33 PM, Konrad “ktoso” Malawski <
konrad.malaw...@lightbend.com> wrote:

> Hi there,
> you do realize that UDP, the protocol itself, does not guarantee delivery
> of anything?
> It absolutely may and will in practice drop packets - it is designed to do
> exactly that.
>
> Start reading about UDP here https://en.wikipedia.org/
> wiki/User_Datagram_Protocol and take it from there to networking books
> and articles.
>
> In short, if you’re suprised that UDP “dropped”, you should likely not be
> using UDP at all :-)
>
> — Konrad
>
>
> On 13 July 2017 at 21:34:17, Madabhattula Rajesh Kumar (
> mrajaf...@gmail.com) wrote:
>
> Hi,
>
> I am using Akka Streams to read the messages from UDP port and write into
> the filesystem. It is not able to read all messages. Some messages are
> dropping.
>
> I have found one example program in the github.
>
> https://github.com/jpthomasset/akka-udp-stream
>
> val source = UdpSource(new InetSocketAddress("127.0.0.1", 9876), 100)
> val result = source.map(x => x.data.decodeString("UTF-8")).
> runWith(lineSink(filePath))
> import system.dispatcher
> result.onComplete { _ => system.terminate() }
>
> def lineSink(filename: String): Sink[String, Future[IOResult]] = {
> Flow[String]
>   .map(s => ByteString(s + "\n"))
>   .toMat(FileIO.toFile(new File(filename)))(Keep.right)
>   }
>
> *Do we need to increase the "maxBufferSize" to receive all messages from
> UDP?*
>
> Please let me know how to receive all messages?
>
> Regards,
> Rajesh
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: http://doc.akka.io/docs/akka/
> current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Akka Streams - UDP messages

2017-07-13 Thread Konrad “ktoso” Malawski
Hi there,
you do realize that UDP, the protocol itself, does not guarantee delivery
of anything?
It absolutely may and will in practice drop packets - it is designed to do
exactly that.

Start reading about UDP here
https://en.wikipedia.org/wiki/User_Datagram_Protocol and take it from there
to networking books and articles.

In short, if you’re suprised that UDP “dropped”, you should likely not be
using UDP at all :-)

— Konrad


On 13 July 2017 at 21:34:17, Madabhattula Rajesh Kumar (mrajaf...@gmail.com)
wrote:

Hi,

I am using Akka Streams to read the messages from UDP port and write into
the filesystem. It is not able to read all messages. Some messages are
dropping.

I have found one example program in the github.

https://github.com/jpthomasset/akka-udp-stream

val source = UdpSource(new InetSocketAddress("127.0.0.1", 9876), 100)
val result = source.map(x =>
x.data.decodeString("UTF-8")).runWith(lineSink(filePath))
import system.dispatcher
result.onComplete { _ => system.terminate() }

def lineSink(filename: String): Sink[String, Future[IOResult]] = {
Flow[String]
  .map(s => ByteString(s + "\n"))
  .toMat(FileIO.toFile(new File(filename)))(Keep.right)
  }

*Do we need to increase the "maxBufferSize" to receive all messages from
UDP?*

Please let me know how to receive all messages?

Regards,
Rajesh
--
>> Read the docs: http://akka.io/docs/
>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups
"Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Akka Streams - UDP messages

2017-07-13 Thread Madabhattula Rajesh Kumar
Hi,

I am using Akka Streams to read the messages from UDP port and write into
the filesystem. It is not able to read all messages. Some messages are
dropping.

I have found one example program in the github.

https://github.com/jpthomasset/akka-udp-stream

val source = UdpSource(new InetSocketAddress("127.0.0.1", 9876), 100)
val result = source.map(x =>
x.data.decodeString("UTF-8")).runWith(lineSink(filePath))
import system.dispatcher
result.onComplete { _ => system.terminate() }

def lineSink(filename: String): Sink[String, Future[IOResult]] = {
Flow[String]
  .map(s => ByteString(s + "\n"))
  .toMat(FileIO.toFile(new File(filename)))(Keep.right)
  }

*Do we need to increase the "maxBufferSize" to receive all messages from
UDP?*

Please let me know how to receive all messages?

Regards,
Rajesh

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.