Comments (14)
👍 Sounds good to me. I always wanted to use Guava anyway, but I never had the time to get into it. If you want to introduce it, by all means, go for it. In addition to making the code more robust, I can spy on how you use it for my own education. :)
from xchange.
I love Guava! I use it all the time in all my projects. But it's a single monolithic library of 2.2 MB, and I don't know how many dependencies it pulls in (though I think not many, if any).
from xchange.
It might also introduce some problems with older versions of Android.. I think this should be checked first.
from xchange.
Too bad it's a single monolithic lib. 2.2MB is quite large.
from xchange.
Yeah, I keep thinking of XChange in terms of desktops and forget about the impact of a heavy library.
Guava only brings in a "provided" dependency on findbugs, so is essentially self-contained.
We could look at using the Maven Shade plugin to merge their library with ours at build time. That way only the classes that we actually use would be included in the XChange JAR. It does have the effect of introducing a com.google package parallel to the com.xeiam ones.
from xchange.
Thinking more about this I think we'll have to leave it for the time being. Shading Guava will just cause consumers with a full Guava available to see classpath issues.
It's a shame, but until they can split up the library into smaller modules we'll probably have to skip it.
from xchange.
Agreed.
from xchange.
Guava might still be useful in tests; we might wanna add it with
test for now, if it makes writing tests easier.
A side note: the same goes for JodaTime. It's very easy to create fixed
dates (eg. 2013-01-20), eg. for test assertions, with JodaTime and
relatively difficult with java.util.Date/Calendar.
On Wed, Feb 20, 2013 at 4:34 PM, Gary Rowe [email protected] wrote:
Thinking more about this I think we'll have to leave it for the time
being. Shading Guava will just cause consumers with a full Guava available
to see classpath issues.It's a shame, but until they can split up the library into smaller modules
we'll probably have to skip it.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/57#issuecomment-13837757.
from xchange.
I would recommend that we convert our APIs to use JodaTime if possible. It is far more robust as well as all the extra goodness mentioned by Matija.
It comes in at around 550K which isn't too painful.
from xchange.
One of the benefits of using java.util.Date is that jackson provides out-of-the-box conversion from long (unix timestamp) and several String formats in json to java.util.Date. If we used JodaTime everywhere, we'd need to write custom deserializers for the JodaTime classes.
I also think that public APIs should in general use java.util.Date and not JodaTime, for easier interfacing with the users of XChange and other reasons. I see the main benefit of JodaTime as internal utility library (ie., not visible in public API). But I don't know if this brings enough benefit to XChange in production code. (I still think it's useful in tests.)
I think XChange used JodaTime a while ago, but Tim removed it at some point?
from xchange.
Yes, I removed it because it was barely used and it couldn't be justified. It was used in a couple places and I easily replaced it with java.util.Date stuff.
from xchange.
I don't think that writing our own Jackson serializer would be too onerous (see http://stackoverflow.com/a/3272244/396747), but Tim's comment about Dates not being well-used might be enough to swing it for me.
Overall, I think we've thrashed these two out. Literally. So I guess we'll be sticking with what we have right now for the foreseeable future. It's a shame, but there are valid reasons which we've now documented.
OK to close?
from xchange.
Ok to close.
from xchange.
BTW, I've added some custom deserializers recently (for String -> Date and "Yes"/"No" -> Boolean), in case someone needs them (directly or as an example).
from xchange.
Related Issues (20)
- Incompatibility with Jackson 2.15.x (as used by Spring Boot 3.1.x)
- is okx thread safe? HOT 2
- large backlog of pull requests HOT 34
- BINANCE FUTURE exchangeMetaData, need some advise
- Supporting Coinbase Advanced Trading
- java.lang.NoClassDefFoundError: jakarta/ws/rs/Path HOT 4
- Binance futures URL problem HOT 5
- Add bitcoin as a topic to this repository HOT 1
- [Binance-stream] Confusion about bookTicker usage HOT 1
- Converting to BinanceKlines gets this error: java.lang.String and java.lang.Boolean are in module java.base of loader 'bootstrap' HOT 7
- BitfinexAdapters.adaptTicker(org.knowm.xchange.bitfinex.v2.dto.marketdata.BitfinexTicker bitfinexTicker) NPE HOT 5
- Invalid Symbol Error with ByBit v5 API Integration HOT 5
- [Binance] UserReference / ClientID not populated in Trades or Orders properly
- Bybit problem with Instrument conversion for options. java.text.ParseException: Unparseable date: "31MAY24" HOT 1
- Bankera exchange exists? HOT 1
- TradeOgreAdapters.adaptCurrencyPair() build a wrong CurrencyPair HOT 2
- org.knowm.xchange.exceptions.NotYetImplementedForExchangeException: getTrades of OkexStreamingExchange HOT 2
- [Binance] Kline class cast exception HOT 1
- [Bitstamp] WithdrawalRequest object does not support txid field HOT 4
- [Bitstamp] Implement client call for the V2 withdrawal-fees endpoint HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xchange.