My Application was moving to cloud now, So we are planning to compare response data from Oracle and Cloud implementation.
We are getting Response data as Json, So Any have idea about how to compare both?
We are planning to Automate the comparison process not in Manual. So give me some suggestion for this.
Related
How can we ingest data to elastic search through java without logstash and beats is there any option like kafka or something like using only java without any tools
I am not sure why you dont want to consider Filebeats --> Elastic. But yes, there are other ways to send your logs to Elastic search.
Also, you did not mention whats the source, whether you want to insert app logs, database. Assuming you want to send microservices logs also, and below options holds good for sending other data too.
As you dont want to use Filebeat, you should add custom code to collect, refine, format and publish the logs.
you can use Kafka Sink Connector to Elastic search to move all your logs
Also, you can use UDP protocol to send(client) logs and listen(server), then implement buffer and ingest to Elastic.
you can develop a commons lib which holds all this code and use in all your java applications.
Simple udp client server code - https://github.com/suren03/udp-server-client
I am working on a little android app that will be requesting json data 3 times a day, this json data will be populated base on data that is fetch from 3 different web sites.
My question is what cloud solution will allow me to used some sort of script/language (python,perl or java) to fetch the data within the cloud itself(make the fetching automatic) from the these site and make it available in a json friendly format so my app can fetch it .
One of the AWS services I have been looking at was API gateway but i don't see a way of me fetching the data from within AWS to later make it public as a json API.
thanks in advance for the help
Have you considered running scheduled events on AWS Lambda - https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html#supported-event-source-scheduled-events
I am importing some information (includes accounts and contacts)
Anyone have advice on the best methodology for doing the import?
Any experience with this import in specific or importing data into Salesforce in general would be appriciated.
First, you should decide is it one time migration of data, or it's iterative process which is an integral part of your solution.
In first case you can use any ETL tools that supports Salesforce integration. There are a lot of them - Talend, Pentaho Kettle, Jitterbit and many others. You can find more information about on Awesome Salesforce page.
In second case you need to implement integration API. Salesforce provides few approaches for API:
REST API - Access objects in your organization using REST
SOAP API - Integrate your organization’s data with other applications using SOAP
Bulk API - Load or delete large numbers of records
Streaming API - Provide a stream of data reflecting data changes
in your organization.
Following my question regarding connecting to a MySQL database in Java, I am looking to create a web service in PHP. My Java program needs to ask the web service to gather some data from MySQL database and send the result back. However, I have a few dilema's:
Firstly, my web hosts do not support Java, and therefore the server side needs to be written in PHP but the client needs to be written in Java.
Secondly, all the tutorials I have found seem to involve creating a whole web service project in order for my Java program to communicate with the web service, where as realistically only a couple of classes need to contact the PHP web service.
And, you may have already guessed but I don't know anything about web service's. It was just suggested that I used one in order to get around the GPL licence of the JDBC driver...
I realise that similar questions may have been asked here before but as I am a complete novice, the posts that are saw here did not contain enough information for me and I require as much help as I can get - almost a step by step guide!
Alternatively, I did think about just using standard PHP Sockets, as I am pretty sure I know how to use them. However, I don't know how secure they are and I didn't want to take any risks because I will be needing to retrieve information such as licence keys!
Thanks in Advance
You don't need to use PHP Sockets, all you need is a simple PHP script on your web host that fetches the data you need from the MySQL DB and outputs the data to be read by your Java client.
Your PHP script will need:
To retrieve any query parameters from the Java client (probably
via $_POST or $_GET).
Information to connect to MySQL (hostname/ip address, db name,
username, password).
To run SQL query/queries to grab the data from the database.
To output the data for the java client to read, in some mutually-acceptable format, such as XML, JSON, HTML, etc.
You would structure the script something like this:
<?php
// 1. Read and validate input parameters
$myquery_val = $_POST['queryval'];
// 2. Connect to MySQL
// 3. Fetch MySQL data
// 4. Output data
?>
To learn how to connect to MySQL and retrieve data, read up on MySQL PDO: http://php.net/manual/en/ref.pdo-mysql.php
What I would do is use an agnostic form of communication between your PHP service and the Java client. My weapon of choice is XML.
The steps would be:
Create the PHP classes which will interact with your database and get the data you want to work with. GitHub has plenty of examples and source code. Sample PHP-MySQL Database Abstraction Layer
Create a RESTful php service which takes the data from step 1 and makes it into an XML REST service. Checkout the Recess Framework, an easy to use REST framework
Create your JAVA client, it should just need to be able to work with HTTP, and consume XML. No need for a huge soap or other framework.
How does one consume web services that return JSON data in the response?
I am trying to build an app around twitter's API (for ex: http://search.twitter.com/search.json?q=shivkumarganesh)
I have a Twitter URL . Now this when queried returns a JSON file. Can you help me to identify that how can I consume this in order to retrieve the results. I want to build an application around it. Please let me koow. I am using Netbeans 7 as my IDE so if there is a tutorial for such a thing in Netbeans and that too in Java then please let me know.
You have 2 choices here: 1. Consume the twitter API on your server 2. Consume the API in the client
The fastest to roll out would be number 2 since you'll just fire an ajax request to the API and consume the JSON response.
Consuming it on your server(presumably a j2ee application) will require a JSON Serializer/Deserialzer. There are several available(see json.org) but I personally prefer flexjson. google-gson is also good.
You're just needing to decode the JSON, so look into Gson: http://code.google.com/p/google-gson/