I am working in a project using grizzly. At the beginning, I worked with the sample https://grizzly.java.net/quickstart.html. Since I want to built a grizzly-based https-server, I used another sample https://grizzly.java.net/httpserverframework.html for my project.
I am asking whether the server in the first sample that I used at the beginning was an http-server. I think that it was not an http-server but I need a confirmation, so that I can understand the situation
The Echo example was not HTTP based. It's a simple TCP echo.
Related
This question already has answers here:
Deploying microservice to be tested within the test [duplicate]
(3 answers)
Closed 1 year ago.
Let me give some background. We're trying to do e2e testing between a bunch of spring boot services that write to kafka, move files and talk to other services to do the file moving. I think we're pretty good on integration testing with mocks and whatnot, but is there a way to leverage karate or any other testing framework to help achieve fully e2e for the few major scenarios? Like can i have a test on one service that takes actual data and sends to the next service without mocking?
I hope that made sense. Thank you.
It really does not matter whether the "system under test" is a single service or a collection of services - we just need to think in terms of input to the system, and the outputs from the system. From the description it looks like, the "system under test" does ...
(a) interact with some downstream services : you should be able to mock them using Karate
(b) produces to Kafka : See if https://github.com/Sdaas/karate-kafka can help here
(c) does some file i/o
For the last one, you may need to write some custom Java code that can be called from within Karate. See https://github.com/Sdaas/karate-kafka/tree/master/src/test/java/karate/java for some examples.
As you said, karate is for e2e testing. The answer is quite easy: if you can assess changes in your overall state across all microservices according to the result of some action(s), then yes.
Of course all these changes, actions and assessments have to be HTTP, since it is Karate’s main protocol.
The answer is yes. Even within the same Scenario you can make calls to 2 different URL-s. So for example you can GET from service A and use the response to POST to service B.
tl;dr
Requesting suggestions, guidelines or examples for possibilities to extend spring-boot-adminto use methods other than HTTP requests for health moitoring of non-spring projects like MariaDB.
Full version
There is a requirement to setup a monitoring application using spring-boot-admin. Several of the clients are spring-bootapplications and are easily implemented. There are however a couple of non spring-boot projects like the database server MariaDB.
The question is therefore formulated thusly : Is it possible to extend SBA to monitor the databse status by methods other than HTTP requests. One possible approach, for example, might be to check if it is possible to connect to the application specific TCP port to verify if the db server is still running. However, other possibilities can be exploited too.
One post I found similar to my question was this :
https://github.com/codecentric/spring-boot-admin/issues/504. The key difference here though is that the provided answer still sugests a HTTP approach. The reference guide also does not suggest an alternative.
Should such a possibility exists, a brief outline of the approach or an example implementation would be most welcome.
SBA currently only supports checking health via http. But your DB should be implicitly monitored if you have an according health indicator on your business application.
It should be possible to extend the StatusUpdater#queryStatus() doing a tcp connect if it encounters an health-url beginning with tcp:// instead of http://...
And in case you accomplish that a PR is appreciated :)
Is there any program that could help me build a REST client without having access to the server? I just want to get custom static HTTP answers when accessing a specific url via POST. It should be as fast and easy as one of the many REST-clients for backend developers.
(No it's not because I develop the client before developing the server, it's because somebody else develops the server and I want to program even when neither this person nor his | her server is available.)
Platform: Windows 7
As long as you can serve static files, you can use any web server as a response generator. Generate your data and save it in the file structure with an extension like .json or .xml. I have found that this works for GET requests but is not very useful for POST/DELETE requests. Sometimes a tool like fiddler http://fiddler2.com/ can let you capture the request while the server is live and then you have it when it goes offline.
If you want a more complex and true rest environment you can use mongoDB's http interface. http://docs.mongodb.org/ecosystem/tools/http-interfaces/ A word of caution. Mongo is a great tool but the learning curve is a little steep of you have not worked with NOSQL before. The plus side is that it doesn't really require an application server since you hook your calls straight into the document structure via it's http console.
I appreciate your help
I've never had the need to learn proxies until recently,
basically I have a Java application and I'm unsure if I can just setup a program so that my computer changes to use a different proxy every few minutes (out of a few 100-1000 proxies), or if I need to have the java application directly connect to a proxy in order for it to use the proxy? then finally I want to connect to website with basic get requests etc.
if anyone could kindly explain the process in order to accomplish what I explained and/or suggest how to go about performing this?
Thank you very much!
you can start with SamProxy 1.0 it is very efficient proxy built in java
http://sourceforge.net/projects/samproxy10/?
you will need to update java JRE first.
There is readme File in project which will help you
I want to create a test DNS server in ruby, but could not find anything suitable. I found pnet-dns(http://rubyforge.org/projects/pnet-dns/). This project is incomplete and buggy. Is there any alternative?
A language-agnostic alternative is to use PowerDNS pipe backend. Because it communicates with a name server across a simple pipe, it can be written in any language, including Ruby. (The simple example in the documentation uses Perl but it should be easy to translate.)
RubyDNS is what you're looking for.
Checkout an another approach of DNS server in ruby using celluloid: https://github.com/celluloid/celluloid-dns
The original celluloid-dns is horribly incomplete (v0.0.1). Recently, RubyDNS is being copied into celluloid-dns (I'm doing this as we speak). RubyDNS will be modified to work with the updated celluloid-dns since all core functions will be moved from RubyDNS to celluloid-dns.
If you want something that works right now, use RubyDNS. However, in the future, if you just want the low level APIs, use celluloid-dns.
Have you looked at Dnsruby?
It aims to be fully RFC compliant, although it focuses primarily on the client side. It is, however, possible to write your own server - use Dnsruby::Message#decode to decode incoming packets, and a zone of RRSets holding your test records. You can then encode your packets to send back to the client.