Does TCL provides a functionality to listen to external servers?
I want to create a socket with TCL-based client-side, which gonna listen to not TCL-based server-side. In the common case I'm gonna send XML (SOAP) message and I'm gonna wait for some response, which gonna be some kind of mask.
If TCL does support such functionality, please help me with some hyper-links to already existing API's or some other posts!
Any help is useful! Thanks in advance!
Tcl does support sockets. You can either write your own WS client implementation using the socket command, you can use the Tcl http package, or the TclSoap library as #Johannes13 suggested.
Related
In general, supposing your server, written in Javascript in the node.js environment, is assembling a response to an end user from services provided by other servers, is there any reasonable alternative to having them all talk JSON?
RPC calls usually use XDR, which is binary, or JSON, which is ascii. There are handy libraries to take care of all the boring sockets stuff for you for these cases.
Node.js tools to use RPC are available for RPC in JSON, but is there any easy way to access RPC calls in binary formats such as XDR, ASN.1 PER, or Avro Apache from node.js. Or to do something similar?
I am not asking what is the best way, or what can be done, because anything can be done with enough hard work, but rather what ways have standards to avoid reinventing the wheel, and libraries to do as much of the work as possible.
avsc implements Avro's RPC specification, you can use it to expose "type-safe" services over any transport (e.g. HTTP, TCP, WebSockets). The quickstart guide goes through a simple example that should help you get started. (Disclaimer: I wrote it.)
I am new to gRPC and currently working on making a message forwarding gRPC service.
Currently my gRPC service, written in Go, transforms HTTP/JSON into protobuf and I am wondering if I can call a client call of another gRPC service in my current gRPC service, so that it basically can work as translate-and-forward service.
Is it possible to do this?
Thanks a ton in advance.
Using protoc tool you can automatically generate server interface, the implementation is up to you.
In your implementation code you can call other services, the only requirement it to accept input arguments and return structure as defined in interface.
Yes, you can definitely do that. That's the way to build more complicated systems - System A calls System B which calls System C, and they're all written with gRPC/protobuffers.
Where you might have issues is making a generic forwarder. AFAIK you will most likely have to just hardcode the translation from the HTTP frontend to calls to a gRPC service.
I'm looking lua memcached client that supports memcached binary protocol.
Could you recommend something?
There is a client that supports memcached binary protocol.
lua-resty-couchbase - Lua couchbase client driver for the ngx_lua based on the cosocket API.
Not sure about binary protocol, but check this out: https://github.com/silentbicycle/lua-memcached
Also, this one may serve as a reference (it is for ngx_lua, so it is unlikely that you'll be able to immediately reuse it out of the box): https://github.com/agentzh/lua-resty-memcached
I did not try either of the modules, please do leave feedback here in comments if you will try them.
I've publish lua binary client:
http://github.com/kolchanov/Lua-couchbase
We have a system built on MarkLogic, Java / GlassFish. We need some kind of system that could capture thrown exceptions from any of those three subsystems, and then provide a nice web-based reporting interface where exceptions could be viewed, prioritized, marked done. We use JIRA.com in the cloud so if there was any way to integrate with that, it would be nice. Prefer open source or inexpensive.
I'm not sure whether a Java-based system would accomodate our MarkLogic errors, so I believe we need something that is language-agnostic.
Thanks.
If you are communicating with MarkLogic using a MarkLogic "HTTP appserver" (as opposed to XCC or WebDAV), then you can use the error handler configuration as a choke point for catching unhandled exceptions. I've never tried this, but, in theory, in the error handler, you could make an http request and send them anywhere you want.
See http://docs.marklogic.com/5.0doc/docapp.xqy#display.xqy?fname=http://pubs/5.0doc/xml/dev_guide/appserver-control.xml%2387072
If you are using XCC, then there are other places to put choke points in your Java code.
MarkLogic writes exceptions by default to the Data/Logs/ErrorLog.txt file. Application code within MarkLogic can use xdmp:log, or trace() to log messages to the same file. The file can be accessed quite easily through file-system if GlassFish is running on the same host., It can also be disclosed through an App Server within MarkLogic with some custom XQuery code.
GlassFish itself appears to be a Java EE platform. I expect it to do logging using something like Log4J. The logging messages in the ErrorLog and the Log4J log will likely not be formatted identically, but basic properties should be there, like date/time, and error message. Log4J logging can be set to write to a log file as well. You could consume it in a similar way as the ErrorLog.
I am not aware of any error reporting web-interface for such logging, but I believe JIRA provides an HTTP API, which can be used to push information into it.
I want to know if it's possible to make my own chat application with ajax push.
And if it's, what is the easiest way to do it?
I know how to use javascript and make ajax calls but that's as far as I go. I can find tutorials myself but I can't tell whether the method is good or not so any links will be appreciated.
Thanks
to use ajax push (comet), you must make a server that will keep concurrent connections.
You can really do anything look for echo servers in your favorite language. Java/C/C++.. I'd do this in Java since it can run on Linux as well.
You can use http://www.ape-project.org/ which seems to be done already all for you.. but seems complex.. I'd recommend starting from scratch with a echo server.
I would recommend using Node.js as it is great at Comet/Ajax-push. Why is it great? Comet applications tend to be event driven and Node.js/javascript excels at these kinds of things.
However, if you prefer to do it in Java, Tomcat actually supports Comet as long as your servlet implements CometProcessor and you use NIO as your http connector. See http://tomcat.apache.org/tomcat-6.0-doc/aio.html