Does Netty provide reliable-ordered UDP messaging? - udp

Does anyone know if Netty provides reliable messaging (acks) and sequence ordering for UPD messages? I am looking for a Java messaging library that will allow me to write a game server but provide that functionality so that I don't have to write it.

OK - I found the answer. It does! It provides UDT via these packages:
io.netty.channel.udt
io.netty.channel.udt.nio
Which include these classes:
UdtChannel
UdtChannelConfig
UdtChannelOption
UdtMessage
UdtServerChannel
UdtServerChannelConfig
and these ones:
NioUdtAcceptorChannel
NioUdtByteAcceptorChannel
NioUdtByteConnectorChannel
NioUdtByteRendezvousChannel
NioUdtMessageAcceptorChannel
NioUdtMessageConnectorChannel
NioUdtMessageRendezvousChannel
NioUdtProvider
And it also provides plain UDP via these classes:
DatagramChannel
DatagramChannelConfig
DatagramPacket

Related

how to testing of services having Apache Thrift based RPC protocol using karate [duplicate]

We have a requirement where we need to send .avro file as an input request to our API's. Really stuck at this point. If any detail example provided would be more appreciated.
Just use Java interop: https://github.com/intuit/karate#calling-java
You need to write a helper (start with a static method) to convert JSON to Avro and vice versa. I know teams using this for gRPC. Read this thread for tips: https://github.com/intuit/karate/issues/412
Also there is even a "karate-grpc" project: https://github.com/pecker-io/karate-grpc
Also see:
https://twitter.com/KarateDSL/status/1128170638223364097
https://twitter.com/KarateDSL/status/1417023536082812935

Any good profiler for coding in Ansi C for gwan like xhprof for php?

Looking for web based c proiler tool similar to xhprof and for Linux. Any good recommendations for gwan scripting? Thanks in advance.
A G-WAN profiler would have to both report issues for:
code portions of G-WAN scripts (servlets and handlers)
blocking / poorly written scripts (not using events)
slow library or system calls, etc.
Rather than making a separate product, it may make more sense to use extra code in G-WAN scripts to check your workflow.
G-WAN provides several examples using very precise time functions like: cycles64(), getms(), getus(), and getns() to check how fast code portions or library calls are.
But G-WAN also provides server counters like REQUEST_TIME which will reveal performance and scalability issues in your applications.
Further, you can go deeper by using a connection handler to check the accept, parse, build and reply times:
enum HANDLER_ACT
{
HDL_INIT = 0,
HDL_AFTER_ACCEPT, // just after accept (client IP address setup)
HDL_AFTER_READ, // each time a read was done until HTTP request OK
HDL_BEFORE_PARSE, // HTTP verb/URI validated but not HTTP headers
HDL_AFTER_PARSE, // HTTP headers validated, ready to build reply
HDL_BEFORE_WRITE, // after a reply was built, but before it is sent
HDL_AFTER_WRITE, // after a reply was sent
HDL_HTTP_ERRORS, // when G-WAN is going to reply with an HTTP error
HDL_BEFORE_CLOSE, // when G-WAN is going to close a connection
HDL_CLEANUP
};
As G-WAN supports scripts in 17 programming languages, performance tuning may also involve doing the right choices for speed-critical parts of your applications.
You may want to use G-WAN C scripts for generating images on-the-fly and G-WAN PHP, C# or Java scripts for less critical tasks.
G-WAN lets you do that very easily.
Last but not least, G-WAN provides ab.c (an open-source benchmark tool) to let you identify scalability issues, most of which are discussed here.

webrtc used as a simile message app

I am trying to write a small application usingwebrtc that can be used as a messaging/Chat application between 2 computers.
I see this:
http://simpl.info/rtcdatachannel/
and it is not working. any suggestions?
I wrote the simpl.info/rtcdatachannel example. It's only designed to show off data channels working within one page.
For a complete peer-to-peer messaging application, I suggest adding RTCDataChannel functionality to something like apprtc.appspot.com. You could also consider a readymade abstraction library like PeerJS or EasyRTC.
You might also want to take a look at the RTCPeerConnection/RTCDataChannel/signaling codelab I built.
In above example, from the trace log, the ice-candidates are generated, but they are either not exchanged between each other because of there may be problem in sending 'offer' or responding the 'answer'. Also above example works only in chrome( because of only webkitRTCPeerConnection is used, with mozRTCPeerConnection this can work on firefox also.
If you want to develope chat application for only text and not for the video chat, then you can use node-js & socket.io or websockets for this.
You may like :) following two libraries:
DataChannel.js / for webrtc data/text/file sharing (among multi-users)
RTCMultiConnection.js / for data as well as media (screen/audio/video/etc) sharing
Firebase.com is a "suggested" starting point for newcomers; that can be used for signaling. You just need to override "openSignalingChannel" and done!
You should use peer.js (https://github.com/peers/peerjs) or use peer chat (https://github.com/Hironate/PeerChat) if you want to do with node js.

Is there an Objective-C client for Cassandra?

I want to access a Cassandra instance in an Iphone application and i need an objectiveC client
for that. I couldnt find one, Thrift is supposed to support ObjectiveC but I couldnt figure out how to do that. If anyone has any knowledge on the subject it is very much appriciated.
Apache Thrift has a generator for ObjC. (Complete list).
If you will distribute the application I would considered the alternative to create a server with simple interface (eg. http) that in turns access the cassandra database.
But if you are the only user it could work with direct database access.
If you're not sure about how to get Thrift to generate the bindings then go with what Schildmeijer posted. Use a simple web server running php + phpcassa or any language of your choice that comes with a high level client library -- list here: High level clients.
You can use some open source libraries to expose resources from Cassandra as JSON or XML then use NSURLRequests to do the work. If you go with XML then Google's GDataXML is an excellent choice of parser, if you go with JSON then json-library on Google Code is another great choice.
Have fun!

FlexUnit 4 and Cairngorm commands

Does anyone know if it is possible to test remote procedure calls in Cairngorm Commands with FlexUnit 4. I have an old app full of them and before I introduce FlexUnit into the mix would like to hear if anyone has been successful with this.
Many thanks,
It's pretty easy using asynchronous tests (as you've found the relevant doc) - as long as you can exchange the remote service with a mock service, e.g. by injecting a different service locator that returns mock services, or better by using a DI framework like Spring ActionScript or Parsley. In that case you will have a real unit test that is not depending on a running server.