Giter VIP home page Giter VIP logo

realm-object-server's Introduction

DEPRECATED

With the introduction of MongoDB Realm, this package is deprecated. Please use MongoDB Realm Cloud.


Realm

Realm Platform

The perfect backend for the next generation of reactive mobile apps.

The Realm Platform delivers automatic and seamless realtime data sync and powerful event handling between server and devices. You never need to think about networking code again. Try Realm Cloud for free to get a feeling for the power and ease of use!

This repo contains the self-hosted version of Realm Object Server and requires a license to use.

The Realm Database is cross-platform, supporting both iOS and Android, and the Realm Object Server is ready to run on your servers or on your favorite cloud.

Read all the details on our website here. You can also check out our launch post.

Samples

Example code showing how to integrate Realm Object Server with your existing infrastructure is located in our Realm Server Side Samples repo.

Issue Tracking

This repo tracks issues and feature ideas related the Realm Object Server, or other general issues not related to specific SDKs.

If you have an issues specific to the Realm Database, please create issues in the relevant repo:

Releases

Check the Releases Page to see the latest versions and the changes introduced with each one. Should you wish to get notified of new releases, you can "Watch releases" in this repo through github or use a service like Libraries.io.

License

The Realm Object Server and samples in the repo are proprietary and can only be used with a commercial license for self hosted Realm Object Server.

Code of Conduct

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

analytics

realm-object-server's People

Contributors

alebsack avatar bmunkholm avatar diogoandre avatar fealebenpae avatar justjenu avatar mgeerling avatar mrackwitz avatar mrh-is avatar nhachicha avatar nirinchev avatar radu-tutueanu avatar revolter avatar teotwaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

realm-object-server's Issues

React Native support

Are there any plans to support Realm Mobile Platform in React Native (RN)?

I'm aware that we can use the mobile platform using native modules in RN, but would like to know whether Realms has plans to implement RN support.

Problem with localhost in the Android Demo App (Ubuntu)

Hi Realm team,
First, I would like to thank you for such a great product and for making us our life easier.

I have installed the ROS in my ubuntu 16.04, and download the Android Demo App in my computer. The installation was completed without errors and I am able to enter in the Dashboard. Also, I am able to run the app, but I am not able to register a new user in the example. The demo throws the following error:

Failed authenticating user.
UNKNOWN(-1)
java.net.UnknownHostException: Unable to resolve host "myComputer": No address associated with hostname
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:125)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74)
at java.net.InetAddress.getAllByName(InetAddress.java:752)
at okhttp3.Dns$1.lookup(Dns.java:39)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:172)
at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:138)
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:80)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:178)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:129)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:98)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.execute(RealCall.java:60)
at io.realm.internal.network.OkHttpAuthenticationServer.authenticate(OkHttpAuthenticationServer.java:92)
at io.realm.internal.network.OkHttpAuthenticationServer.loginUser(OkHttpAuthenticationServer.java:52)
at io.realm.User.login(User.java:133)
at io.realm.User$1.run(User.java:171)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Caused by: android.system.GaiException: android_getaddrinfo failed: EAI_NODATA (No address associated with hostname)
at libcore.io.Posix.android_getaddrinfo(Native Method)
at libcore.io.ForwardingOs.android_getaddrinfo(ForwardingOs.java:55)
at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:106)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74) 
at java.net.InetAddress.getAllByName(InetAddress.java:752) 
at okhttp3.Dns$1.lookup(Dns.java:39) 
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:172) 
at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:138) 
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:80) 
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:178) 
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:129) 
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:98) 
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) 
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) 
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) 
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109) 
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) 
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) 
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) 
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) 
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124) 
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) 
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) 
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170) 
at okhttp3.RealCall.execute(RealCall.java:60) 
at io.realm.internal.network.OkHttpAuthenticationServer.authenticate(OkHttpAuthenticationServer.java:92) 
at io.realm.internal.network.OkHttpAuthenticationServer.loginUser(OkHttpAuthenticationServer.java:52) 
at io.realm.User.login(User.java:133) 
at io.realm.User$1.run(User.java:171) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) 
at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
at java.lang.Thread.run(Thread.java:761) 

In the BuildConfig class, the OBJECT_SERVER_IP = "myComputer". This is my /etc/hosts:

127.0.0.1 localhost
127.0.1.1 myComputer

I tried changing directly the URL in the RealmTasksApplication class, and this eliminated the error, but the app kept waiting.

Thanks in advance and sorry if it is a silly question.

ROS only syncs once for read-only realms

I have ROS installed on a remote CentOS machine. I am accessing it using an iOS application I am developing.

I have created a realm in the common area (/realmName) with the server admin and the __admin realm shows nil for the owner of that realm.

I created a second user that is not a server admin and created a realm for that user (/~/realmName).

When I log in as the second user, the notification block is called in my iOS application only once. Any changes made during this time are not reflected in the Realm Browser pointed at the user's realm and no changes made to the common realm are reflected in the iOS app. If I close and reopen the iOS app, all pending changes are synced in both directions and everything is up to date, but again no new changes are reflected.

If I make the second user a server admin and then start the app everything works as expected. I can even close the app and revoke admin on the second user and it all still works.

Also, user's authenticating with google have the same problem, and I am not able to make those users admin so the problem persists on all app launches.

I have a MacOS ROS installed on my home network as well and the above scenario does not occur. On the MacOS server all the data is synced immediately just as expected.

Let me know if there are any logs or anything else I can provide that can help. I am unsure if this issue is caused by a configuration problem on my end or if it is an issue with ROS itself.

Deploy Realm Object Server to Heroku

As a feature request, I would like to suggest an option to easily deploy the Realm Object Server to Heroku. I am aware of the AMI image for Amazon services but a Heroku option would be another easy option for deployment. Are there any plans to support Heroku deployment?

realm::SharedGroup::BadVersion exception

Originally opened as issue against Core (realm/realm-core#2299), but Core is merely the messenger, indicating that an attempt is being made to access a version which is no longer present in the realm file.

This can frequently (though not always) be reproduced by running these steps:

$ git clone https://github.com/realm/realm-cocoa.git
$ cd realm-cocoa
$ git checkout v2.0.4
$ git submodule update --init --recursive
$ ./build.sh verify-osx-object-server

Test output:

Test Case '-[RLMObjectServerTests testDeleteObjects]' started.
libc++abi.dylib: terminating with uncaught exception of type realm::SharedGroup::BadVersion: std::exception
./sync/start-object-server.command: line 95: 38618 Abort trap: 6           node "$package/node_modules/.bin/realm-object-server" -c configuration.yml  (wd: ~/Projects/realm-cocoa/sync/object-server)
/Users/jp/Projects/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.m:153: error: -[RLMObjectServerTests testDeleteObjects] : ((error) == nil) failed: "Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x608000247950 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}" - Error when trying to log in a user: Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x608000247950 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.} (process: child)
/Users/jp/Projects/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.m:110: error: -[RLMObjectServerTests testDeleteObjects] : failed - Received an asynchronous error: Error Domain=io.realm.sync Code=1 "(null)" UserInfo={underlying_error=Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={NSUnderlyingError=0x60000024c180 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={_kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-4, NSLocalizedDescription=The network connection was lost.}} (process: parent)
Test Case '-[RLMObjectServerTests testDeleteObjects]' failed (1.618 seconds).
Test Case '-[RLMObjectServerTests testLogBackInDeferredRealmDownload]' started.
/Users/jp/Projects/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.m:153: error: -[RLMObjectServerTests testLogBackInDeferredRealmDownload] : ((error) == nil) failed: "Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x60800024d620 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}" - Error when trying to log in a user: Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x60800024d620 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.} (process: parent)
/Users/jp/Projects/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.m:153: error: -[RLMObjectServerTests testLogBackInDeferredRealmDownload] : ((error) == nil) failed: "Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x60800005aa30 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.}" - Error when trying to log in a user: Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={NSUnderlyingError=0x60800005aa30 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://127.0.0.1:9080/auth, NSErrorFailingURLKey=http://127.0.0.1:9080/auth, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=Could not connect to the server.} (process: child)

Add support for creating a user and a realm when offline

How would I manage to start an iOS application using the new mobile platform when the device is e.g. in Airplane Mode and no auth call to to the server is possible? Shouldn't there be a way to use the locally cached version?
This is not about losing connectivity after having been authenticated when I can grab the user object and keep working, this is purely about starting the app in offline mode.

Also see this post on SO: http://stackoverflow.com/questions/39942208/synchronized-realm-airplane-mode

the onsuccess is fire even when my task is not done.

public void onItemLongClick(View view, final int position) {


              realm.executeTransactionAsync(new Realm.Transaction() {
                  @Override
                  public void execute(Realm bgRealm) {
                      final RealmResults<Device> deviceQuery=bgRealm.where(Device.class).findAllSorted("ipAddress", Sort.ASCENDING);

                      deviceQuery.deleteFromRealm(position);
                  }
              }, new Realm.Transaction.OnSuccess(){
                  @Override
                  public void onSuccess () {

                      adapter.notifyItemRemoved(position);
                      Toast.makeText(MainActivity.this,"successfully deleted",Toast.LENGTH_LONG).show();
                  }

              });

          }
      }));

Sync a Realm between multiple devices of a user

So I'm thinking about using this as a means to sync a user's realmdb from one iOS device to another.

is that an easy idea to implement, or is this ROS idea really more for cross-user-base syncing?

I guess what I'm trying to ask - I can see where ROS would be quite handy for an "uber-like cab tracking" app, where all users get to see all cabs and RT updates are central to the app as a bunch of users all see the real time state of the data model.

what about for app where I'm looking to (merely) cross-devices sync a user's personal realmdb?

Create or use existing

Is it possible to authenticate using .usernamePassword in such a way that if the user account does exist, it uses it, and if it does not, it creates it?

I'm looking at a situation where I want the app to automatically register if need be.

Has whole realm object in mobile device?

Hello.
I'm very impressed on **Realm Mobile Platform** and this is amazing.
But I have one question about it.
Realm mobile platform synchronize local object to realm object server.
I think realm object is always stored in local and when mobile is online, this object is sync to server.
So, mobile has same realm objects as amount of data that object server has, I think.
Am I right or not.
And can I use this mobile platform as mobile backend?
Please explain about it.
Thanks.

Remove Realms

Apologies if I missed it, but what is the best way to remove Realms from the ROS? I've tried rm'ing the .realm, .lock, and .management items from /var/realm/sync-services/user_data. It seems to kill them, but they still show up in my list when using the Realm Browser.

I'm using latest ROS on Ubuntu 16.04.

Realm Browser not showing all ROS realms

I have a ROS running on RHEL in Amazon, and for some reason the Realm Browser has stopped showing any new realms in its list. I can see them on the server when doing an 'ls' on the user_data folder, and there are a lot more of them there than in my Browser list. Also, the new realms are no longer showing up as a RealmFile in __admin.

I can connect directly to it from the Open Sync URL... menu option. But the other way is much nicer since I don't have to continually log in.

Any ideas? Is there a local cache that the Realm Browser uses that I could wipe?

Installing ROS on Fedora

I suggest enabling installation of ROS on Fedora - at least, to aid adoption.
Please, my problem is the inability to install Realm Object Server on Fedora - I know Fedora was not listed as a compatible OS; but I thought that what is good for RHEL should be good for Fedora 24.

Running the platform on Ubuntu

Hi,
Not sure if this is the place to post this, but I've installed the realm mobile platform on a digital ocean droplet, and it doesn't seem to run. I've followed the steps in https://realm.io/docs/realm-mobile-platform/install-realm-object-server/.

When I try to setup the realm dashboard (i.e. access via web) it doesn't work. I think there's no service running.

I tried to install an apache server it seemed to work fine (web access).
Seemingly after running systemctl start realm-object-server there's no output.

Any idea?

Custom SyncUser?

Is there a way to add more info to the SyncUser object? Right now the only identifying property on it is "identity". Maybe a subclass to add more properties (like first, last name, etc...)?

It would also be nice to be able to add these custom fields through the ROS admin page when creating a new user.

Connect multiple authentication methods to single SyncUser

Let's say a user signs up using their email address and password. Later they want to do something in the app that requires Facebook, so they connect to Facebook inside the app. I want to add the Facebook credential to the existing SyncUser so that when the user logs in on another device they can simply login with Facebook and get all of their data.

At the moment it seems like a SyncUser == credentials, instead of SyncUser has many credentials. I've seen hints at a permissions API coming soon that would let me build a poor man's version of this on my own (granting access for the new credentials to see my current credentials' data), but since authentication is handled by the server, this really seems like something the platform would provide better than a hacked solution.

Let me know if I've missed something in the docs or API that lets me do this already. Thanks!

Can anyone get the Realm Object Server to run on Ubuntu?

I had a smooth experience installing the ROS on a new Digital Ocean Droplet running Ubuntu 16.04. But I'm unsure how to configure the server so I can view the ROS dashboard on the web.

Does someone have a functioning configuration.yml file they could share for an Ubuntu installation?

Migrating from Parse.com

Hi! I want to migrate on realm DB and platform, but now my app use backend on Parse.com. How can I migrate on realm-server?

Install on Debian

Hi,

I follow ubuntu instruction to install on my debian, I get this error :
E: Unable to locate package realm-object-server-de

Do you just not support debian at all ?

config :
debian 8.5
x86_64 GNU/Linux

thanks 😊

Synchronization over Bluetooth

Greetings!

I'm developing Bluetooth networking library for iOS+Android called Underdark and would like to integrate it with Realm Mobile platform, so client devices will be able to sync not only with server, but with each other too.

What is the best or easiest way to do that?

Non-admin user can read __admin by default

That probably shouldn't be the case. Anybody that knew 9080 or 9443 was Realm, and had valid creds, could enumerate the ROS pretty easily at that point.

I was able to fix this by manually removing the nil - __admin - mayRead permission.

"Unable to locate package realm-object-server-de" on Ubuntu 16.04

Hello, I seem to be unable to locate the package on Ubuntu, the commands that come before at https://realm.io/docs/realm-object-server/ complete successfully but installing fails.
I am running the Desktop Ubuntu could this be an issue?

john@john-VirtualBox:~$ sudo apt-get install realm-object-server-de
[sudo] password for john:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package realm-object-server-de

john@john-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial

notification if sync fails.

Hi there,

As far as i can understand mobile platform sync the local database with remote server whenever it can. This is great for apps that need to be functional even when there is no internet connection. but right now i'm working on a project that everything has to be live and when user has no connection i want to not let user change anything from local database.

is there a sync failure notification or such thing
OR
is there a chained write method that syncs right after and gives result of both at the same time?

Syncing data across users

I'm having problems understanding how the sync mechanism is intended to work for different users. I'm confused on how should I create a realm database that would be in sync with two different users. The Realm mobile platform docs says this about the URL:
String serverURL = "realm://my.realm-server.com/~/default";

According to the docs, ~ is optional. If it is present, it will be replaced by users identifier meaning that every user would have its own realm database. When I do this with two different users, the database is not synced (which makes sense) because there are 2 different realms. So my question is, how should I setup my realm so that I have one realm database that is synced between 2 (or more) different users? The only case I managed to make it sync is when I would use one same user on two different devices.

I also tried constructing a realm url without ~ sign but then I get this:
REALM_JAVA: AuthenticateResponse. Error The path is invalid or current user has no access!

Can someone help me out understanding this please?

Roadmap

Hello Realm Community,

the Realm mobile platform is now in the beta state. I've seen on stackoverflow a few threads about the client side api to manage realm permissions which is not yet implemented or made public.

http://stackoverflow.com/a/39801679/4572536

I'd love to see a public roadmap on what features we can expect in the near future and what is on the current todo list for the first stable release.

Swift Driver/Provider for Vapor

I'm not sure if this is the right corner to post this or if the idea is totally out of scope for any future release of the mobile platform, but it's worth asking.

Some notes about my project:

  • I have a large long term project without any start budget.
  • I need to build an iOS Application which is a client to our service (main project).
  • I'll have to build a backend to organize user and sync their data (private/public chats/posts etc.).
  • I'd love to be able to focus on a single programming language (in my case Swift).

The Developer license of Realm MP solves a few things for me:

  1. It's easy to use, because it's Realm. :)
  2. It's a DB and it's working on Linux too.

The upcoming Pro license might fill a few more gaps:

  1. Working with events (APNS - Push Notifications)?
  2. Discovering user.
  3. Managing user and their realms.

What not even the Enterprise license can do for me is the ability to focus on a single language.


Here comes Vapor into the game. It's an elegant and easy to use Swift package to build a backend.

Since the Developer license offers us the ability to store data on a linux machine, just like other databases do.

Wouldn't be great to have a Driver/Provider for Vapor?

That way we could finally use Realm as a DB for our own backends. This also might allow us to share some data structures between the client and the backend codebase.

Module version mismatch. Expected 48, got 46

I get the error Module version mismatch. Expected 48, got 46 when trying to run realm-object-server, I'm on Node.js v6.9.1 and Ubuntu 16.04.1 LTS on AWS

Edit: Showing Complete error log with backtrace


/usr/lib/nodejs/realm-object-server/node_modules/realm-sync-server/node_modules/bindings/bindings.js:83
        throw e
        ^

Error: Module version mismatch. Expected 48, got 46.
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at bindings (/usr/lib/nodejs/realm-object-server/node_modules/realm-sync-server/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/usr/lib/nodejs/realm-object-server/node_modules/realm-sync-server/index.js:34:54)
    at Module._compile (module.js:570:32)

Authentication Bug or Intended?

I have a single Realm file on the ROS server that I have multiple users pointing at. When calling authenticate() for the first time with a user, my Realm() comes back empty after I set the default realm sync configuration. This only happens on the first successful login for that user. Every time thereafter, it works works just fine, and I get false for .isEmpty. This happens with each successive "new" user on that device. I have a feeling this is due to the fact that there isn't a local version of the realmfile yet until the scope of this call exits (maybe?). If that is the case, is there a way to guarantee the realm is populated even on the first login within this completionHandler? I tried using .refresh() and also tried forcing a Realm().commitWrite. Neither helped. Later one crashed.

To reproduce, drop this in an appDelegate didFinishLaunching method call, and populate with valid creds, authURL, and realmURL.

SyncUser.authenticate(with: creds, server: authURL) { user, error in
        guard let user = user else {
            print(error!)
            return
        }

        Realm.Configuration.defaultConfiguration = Realm.Configuration(syncConfiguration: (user, realmURL))
        print("isEmpty: \(try! Realm().isEmpty)")
    }

Custom Authenticators

Hi!

Here at our company we have an existing authentication provider for our customers. Is it possible to use this authentication provider for the Realm Mobile Plattform? Or is this feature planned for future releases?

We use Keycloak (http://www.keycloak.org/) so I should be possible using OAuth2 + OpenID like with the social authentication providers you already support.

Node.js client module

As a new feature/idea it would be great to have a client module for node.js so that you can manipulate data using a server side script too.

Selective Synchronisation

Can anyone tell me if selective synchronisation is on the roadmap?

i.e: Selectively synchronise rows that match a filter.

My focus is reducing on device database size and networking requirements.

Able to connect to object server, but not open a realm.

Good evening.
#1 First off, love your work.

I'm using the newest version of realm-browser on osx el capitan. I can connect to my aws object server and see realms, but whenever I try to open one, it dies with a super helpful error message:
image

Now I post this here for the mobile platform, because i'm also having issues connecting to it from my ios project which leads me to think I've got a server side issue. Here's what the server side logs show:
image

And the xcode logs show:
image

I'm sure i'm likely doing something wrong, but no idea what. Here's a narrative overview of what I've done:

  1. spun up ami realm-object-server-hvm-1474909717 (ami-80347097)
  2. took the task demo, and slightly modified the authentication section to read:
func setupRealm() {
        let username = "[email protected]"
        let password = "Sup3rS3kr3tPassw0rd;"

        User.authenticate(with: Credential.usernamePassword(username: username,
                                                            password: password,
                                                            actions: []),
                          server: URL(string: "http://ec2-100.40.40.40.compute-1.amazonaws.com:9080")!,
                          onCompletion: { user, error in
            guard let user = user else {
                fatalError(String(describing: error))
            }

            // Open Realm
            let configuration = Realm.Configuration(
                syncConfiguration: (user, URL(string: "realm://ec2-100.40.40.40.compute-1.amazonaws.com/~/foo")!)
            )
            self.realm = try! Realm(configuration: configuration)
            print("Realm Setup")

            // Notify us when Realm changes
            self.notificationToken = self.realm.addNotificationBlock { _ in
                print ("Realm Update occured")
            }
        })
    }

help me obi-won-realnobi you're my only hope!

Mac DE 2nd run of start-object-server.command kills all running apps

If you run the start command whilst a server is already running it can kill all your (GUI) apps.

(Changelog says this is Object Server 1.0.0-beta-4.2)

  • Double-clicked on the start-object-server.command
  • later, after laptop sleep, didn't realise was still running first copy
  • Double-clicked on the start-object-server.command
  • in the Terminal window was prompted Another instance...already running
  • typed yes to terminate the other instance
  • all running Mac apps died leaving only the Terminal going

This is 100% repeatable.

(full log available from Terminal window but may want to just forward privately - unsure if things like the Admin token should be public here)

Expired Refresh Token Warning

Hi! I've been getting this message from time to time when trying to connect to the object server. As far as I could detect it happens when the client cannot connect to the server for an extended period. I believe it happens mostly after the server has been offline for an extended period.

warn: [services] internal error: ExpiredRefreshToken: The refresh token is expired!

Is that a client issue or server issue?

here's the full message I get:

2016-10-14T20:24:26.412Z - warn: [services] internal error: ExpiredRefreshToken: The refresh token is expired!
    at Manager.verifyRefreshToken (realm-mobile-platform/realm-object-server/node_modules/realm-object-server/services/auth/manager.js:74:13)
    at realm.handleRequest (realm-mobile-platform/realm-object-server/node_modules/realm-object-server/services/auth/provider/realm.js:15:27)
    at Service.newSession (realm-mobile-platform/realm-object-server/node_modules/realm-object-server/services/auth/service.js:81:14)
    at Layer.handle [as handle_request] (realm-mobile-platform/realm-object-server/node_modules/express/lib/router/layer.js:95:5)
    at next (realm-mobile-platform/realm-object-server/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (realm-mobile-platform/realm-object-server/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (realm-mobile-platform/realm-object-server/node_modules/express/lib/router/layer.js:95:5)
    at realm-mobile-platform/realm-object-server/node_modules/express/lib/router/index.js:277:22
    at Function.process_params (realm-mobile-platform/realm-object-server/node_modules/express/lib/router/index.js:330:12)
    at next (realm-mobile-platform/realm-object-server/node_modules/express/lib/router/index.js:271:10).

Thanks!

Upgrade to 4.2?

I just tried upgrading my RHEL instance running 2.3 to 3.0, but to my surprise I received 1.0.0_BETA_4.2-336.el7, along with a realm-object-server service that wouldn't start, even after reboot of the server. Just dropping a note here because I didn't see any release notes beyond 3.0 yet.

Notification for new beta releases

Hi! Is there a way to get notified when new beta releases are out? I just saw that 2.1 was out and I'm still running 1.0 😢

Maybe a symbolical release tag on this repository?

Thanks!!

Reseting user password

Really loving the platform so far!

Just one question. Have I missed something, or is it not possible to have a "forgot password" feature right now?

Fine-grained (object-level) permissions

Creating this issue because it's a dealbreaker for my client-server POS app: I see no way to establish user-level or group-level control over object modification.

EG: In a point-of-sale system, all users need to be able to view product descriptions and prices. But only a manager should be able to modify the products. When money is on the line, I cannot rely on all clients being trustworthy.

Tool for creating schemas across bindings

Working with Sync has made it abundantly clear that creating schemas across languages is a pretty hard problem, and we also mess it up frequently internally.

The following things will make this easier:

  1. Agree on a format for a cross platform language for specifying schemas either as a new "language" or perhaps just use the JSON format that JS already uses?

  2. Online tool for doing it on the fly. Will make one-off conversions really easy. It would also be cool if such a tool could validate the schema given a specification.

  3. A command line tool for generating language specific classes. Useful for continuous development by multiple teams. Needs to be written in a cross-platform language, perhaps Java or Ruby? Could also be used as the backing code for 2).

PHP or JS Access to Realm Object Server

Now that we can have Realms on our servers and can sync seamlessly to mobile apps, the next question is obvious: will there be a PHP or JavaScript SDK to access and sync a Realm in a web app?

Personally, I would love a JS SDK. Realm is already a 10, but this would push it to an 11. :)

Thanks for your time!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.