Is rxJava library compatible with Google Appengine? If so are there any limitations? The only info I have found is mention of 'partial support' on grepcode. http://grepcode.com/snapshot/repo1.maven.org/maven2/com.netflix.rxjava/rxjava-core/0.9.0
What is not supported?
The problem is the limitation of Java Threads in Google Appengine: https://developers.google.com/appengine/docs/java/#Java_The_sandbox
RxJava uses Java
Thread
andExecutor
in theScheduler
implementations. So the codes which get involved some concurrentScheduler
s can not run in Google Java Sandbox.If you want to use
Scheduler
in Google Appengine, you need to implement a specialScheduler
by yourself. Besides, some operators may useScheduler
by default, such asdelay
useSchedulers.computation()
by default. Remember to use theirScheduler
overload methods.You should create a child of RxJavaSchedulersHook and override its methods using your scheduler which use
com.google.appengine.api.ThreadManager
: I've done it like this :Then you should register this hook. Better to do this in an ServletContextListener implementation:
It works for me.