Spring XD facebook data extraction - spring-xd

Is there anyway to extract Facebook data using Spring XD?
I am now able to extract Facebook data using Graph api, Json, Java Program, but the question is if could I integrate this this to be executed automatically through Spring XD.

You can create a custom source module.
If it is general enough, consider contributing it to spring-xd-modules. The README has information about contributing.

Related

Using Java functional API with Spring Cloud Data Flow and Polled Consumers

I am working on a project that is trying to use the polled consumer API. However, existing documentation, blog posts and sample code seems to use deprecated annotations (such as org.springframework.cloud.stream.annotation.Input). This seems to be because they are relying on the older style of Spring Cloud stream applications rather than using Java functional api (e.g., java.util.function.Function), as shown in other examples such as this one, given in the same repo.
Is there a way to use functional style with polled consumers in Spring Cloud Stream?
You are using outdated documentation. The most current is available from the project site - https://spring.io/projects/spring-cloud-stream#learn.
The section you are looking for is - https://docs.spring.io/spring-cloud-stream/docs/3.1.5/reference/html/spring-cloud-stream.html#spring-cloud-streams-overview-using-polled-consumers

Spring boot , Elasticsearch

Searched over the net but unable to find the satisfying approach.
I am new to spring boot and aware of starter dependancies,
I want to develop a springboot app using elastic search as a storage system.
Wherever i searched i found that somewhere my service class will have to implement some interface from springframework for ES crud operations.
Is there any other way without implementing or extending the components.
I myself want to create transport client and want to query ES by my code or methods not by overidden ones.
Please if you ahve ever seen any projects you can redirect me to that link .
Thanks.
Assuming I understand you correctly, you can use the Elasticsearch REST client: https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-low.html
You supply the JSON entities for the queries and parse the responses yourself. Its pretty basic in what it does, so you're not dependent on a lot of third party stuff to perform operations.

Spring : Auto Generate CRUD Rest Controller

Is there a way to generate spring rest crontroller for a business flow.
I want to generate CRUD services for given database object.For example, "employee_mst" , generate CRUD services code automatically.This is similar to what we used to have in hibernate or what we have in loopback.io for node. Appreciate any help around it.
I found a link that may answer your question: https://docs.spring.io/spring-data/rest/docs/current/reference/html/.
This text explains that Spring Data REST generates REST interfaces from Spring Data repositories.
I intend to try this but did not do so yet.
EDIT: I saw in my example application that Spring Data REST did what I expected. I could request all entities in my Spring Data repository using a HTTP request. The returned JSON contained also discovery information. You may prefer writing your own controller to have more control on what information is returned.

Spring MongoDB REST API without HAL?

This Guide shows how to easily create a RESTful interface to a Mongo Database. It produces Json-data in HAL format(Hypertext Application Language), but unfortunately I am unable to find a working Android Client that supports HAL.
Is there any way to disable this HAL format an just GET the documents from the DB without any extra? So that it can be directly parsed into my datatype classes?
It would be really nice to use this approach to somehow automatically generate the REST interface, I cannot go back to manually writing all the methods in controllers after seeing this very short code.
This post seems to deal with the same topic, but I do not understand how to do this configuration.
The guide you are linking to is specifically aimed at using Spring Data REST + Spring Data MongoDB, so to disable the hypermedia for a project designed to generate hypermedia, i.e. a RESTful interface, sounds very strange.
On a mobile platform like Android, the question is what are you trying to do? Are you trying to query for a single, small piece of JSON from MongoDB? The risk of not having any type of hypermedia layer in the middle is that you could query for a giant (i.e. humongous data set) and cripple both the server and mobile device.
For more details about hypermedia and Spring Data REST, check out Oliver Gierke's answer at Disable Hypertext Application Language (HAL) in JSON?.
Regarding the ability to communicate between Android and a HAL backend, of course it's possible. You may wish to look at Roy Clarkson's sample Android app used to talk to a HAL backend that was used at SpringOne 2014 at https://github.com/SpringOne2GX-2014/spring-a-gram-android.
The slides from that presentations are at https://speakerdeck.com/gregturn/springone2gx-2014-spring-data-rest-data-meets-hypermedia.

Neo4j unmanaged extension with Spring Data

I was advised to develop Neo4j extension because of poor performance due to the many calls to the Neo4j REST interface introduced by Spring Data Neo4j. For the good start I was able to run simply Neo4j extension from Neo4j documentation:
http://docs.neo4j.org/chunked/stable/server-unmanaged-extensions.html
Now I have to move some logic from my web service to Neo4j extension to make communication between them as small as possible. However, my web service is based on Spring Data Neo4j as well as Spring Data JPA, so to reuse my actual code I would like to use also Spring Data in my extension. I have found this documentation:
http://docs.spring.io/spring-data/data-neo4j/docs/current/reference/html/reference_neo4j-server.html
but it is not clear for me and there is no working example. Is there any sample code with such integration?
There is a great example on using SDN in an unmanage extension, see http://inserpio.wordpress.com/2014/04/30/extending-the-neo4j-server-with-spring-data-neo4j/.

Resources