streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sblackmon <sblack...@apache.org>
Subject New, improved, license compliant streams-provider-twitter
Date Mon, 03 Apr 2017 20:02:28 GMT
This branch now has all of the existing unit and integration tests passing.

I’m opening a pull request to solicit comments and criticisms.

Especially take a look at:
streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Twitter.java

I’ve added TODO notes depicting how I think these methods could be dramatically simplified
after a few additional features are added to juneau’s RemoteableProxy.

This new pattern + those simplifications would greatly reduce the amount of code across every
provider module in the project, while also making it much easier to reach full feature parity
with the provider APIs themselves.

Looking forward to feedback.

Steve
On April 3, 2017 at 11:06:00 AM, sblackmon (sblackmon@apache.org) wrote:

Hello,

I’ve just pushed an update to https://github.com/steveblackmon/incubator-streams/tree/STREAMS-496

Added extensive testing around oauth request signing, which is now working according to twitter.

Now working on the juneau RestClient bindings to get the results populated into streams pojos.

Trying to do this entirely with juneau, although using jackson to parse the results would
be simple enough.

Steve
On March 25, 2017 at 11:49:04 AM, sblackmon (sblackmon@apache.org) wrote:

Hello,

I’ve just pushed again to https://github.com/steveblackmon/incubator-streams/tree/STREAMS-496
As you can see, I've removed twitter4j entirely and replaced it with new code that uses juneau
to achieve the same outcome.

The primary client class is:
https://github.com/steveblackmon/incubator-streams/blob/STREAMS-496/streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/api/Twitter.java

It’s currently > 300 lines - I expect it will shrink to < 100 once support for GET
requests are added to RemoteableProxy in juneau 6.2.0.
 
Next step is to get the unit and integration tests passing.  

Key to that are:
 - Performing oauth setup when creating the RestClient
 - Embedding error handling into the RestClient using juneau libraries
 - Embedding retry management into the RestClient using juneau libraries

More to come, but we’re on track to wrap this up in a release before April 30.

Steve
On March 19, 2017 at 5:02:51 PM, sblackmon (sblackmon@apache.org) wrote:

I created https://cwiki.apache.org/confluence/display/STREAMS/Twitter+Provider+Refactor with
a more concrete proposal for how to do this.  I welcome feedback or any volunteers who want
to help.

Steve
On March 6, 2017 at 10:59:44 AM, sblackmon (sblackmon@apache.org) wrote:

 
So this is still something we need to take care of, and the clock is ticking down to April
30 2017. I opened STREAMS-496 this morning.

I think it will be straight-forward to remove the twitter4j client from the providers, at
least from a request / response perspective, using our twitter provider pojos.

Where I have zero useful expertise is replicating the process of turning an instance of org.apache.streams.twitter.TwitterOAuthConfiguration
into the headers that actually get sent with each request. 

Does anyone have enough background in how oauth works (on twitter specifically, but also more
generally) to help out with this?

Steve

On November 28, 2016 at 5:03:23 AM, Stian Soiland-Reyes (stain@apache.org(mailto:stain@apache.org))
wrote:

>
>
> On 2016-11-14 17:04 (-0000), Joey Frazee wrote:
> > The ASF recently reclassified the JSON license for org.json as category-x because
of its "shall be used for Good, not Evil" clause [1].
> >
> > There does not appear to be any direct usage of it in Streams but there are a number
of dependencies in Streams that do depend on org.json, most notably Twitter4j, and it does
appear in the poms.
>
> There are also repackaging like org/apache/geronimo/bundles/json/20090211_1/json-20090211_1.jar
> to be aware of, which is used by jackson-datatype-json.org, which at least for Streams
0.4 was referenced here:
>
> /org/apache/streams/streams-core/0.4-incubating/streams-core-0.4-incubating.pom: jackson-datatype-json-org
> /org/apache/streams/streams-provider-moreover/0.4-incubating/streams-provider-moreover-0.4-incubating.pom:
jackson-datatype-json-org
> /org/apache/streams/streams-master/0.4-incubating/streams-master-0.4-incubating.pom:
jackson-datatype-json-org
>
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message