Multiple nodes for scaling

455 views
Skip to first unread message

Csh

unread,
Jan 6, 2015, 10:54:44 AM1/6/15
to baa...@googlegroups.com
Hi, I know this has been discussed before regarding holding session tokens in the database and using hazelcast,etc.

However, I think we can treat baasbox like a php application where we use a session sticky load balancing solution to load balance baasbox. However, the only problem is that I have read that baasbox is tightly integrated with an embedded Orientdb which makes it hard to scale in the Php fashion. It also means that if an application grow to more than 100k of users, baasbox will not be able to handle it, especially when we have to consider that it has to handle other functions such as file upload, push notification, etc.

Is there a way to let baasbox connect to a cluster of Orientdb? Do you have any plans for this?

In order to offload some functions, do you think we can implement custom file upload to S3 using plugin?

Many thanks

narendra

unread,
Jan 7, 2015, 8:49:46 AM1/7/15
to baa...@googlegroups.com
Interested to know about the scalability of Baasbox and numbers of users it can handle.

Csh

unread,
Jan 7, 2015, 12:08:07 PM1/7/15
to baa...@googlegroups.com
Hi, I am trying to change the open() method in DbHelper to connect to a remote Orientdb but still gettings errors continuously after commenting out each error.

Do you have a tip for making baasbox connect to remote orientdb?

giastfader

unread,
Jan 7, 2015, 12:45:54 PM1/7/15
to
We are actually working on scalability, optimizing the connection handling, the threading system (using the Play framework) and fine-tuning the OrientDB parameters to avoid as much as possible locks on the database ( https://github.com/baasbox/baasbox/tree/opti )

As far as clustering is concerned, we do not want to connect to a remote db/cluster  to avoid network latency problem and mainly because OrientDB does not allow some operations on remote DB (such as pessimistic locking/transaction, role managing and others...).
Thus we want to use the embedded OrientDB engine to create a cluster of BaasBox(es) relying on it.
To complete this process we need to change the session token management, but at the moment you can still use basic auth.

Csh

unread,
Jan 7, 2015, 7:49:20 PM1/7/15
to baa...@googlegroups.com
Hi Giastfader, thank you for your reply.

What I tried was change the open connection line in open() method of DbHelper to connect to remote orientdb instead of local dir. Then I copied the db dir that was generated previously (normal initialisation without code changes) to a remote orientdb databases folder. Everything seems to start ok with no errors but when login as admin, although there is session token returned back, it was not set in browser and using that to make rest api call produces error with Permissiontag. I am not sure whether there are more to this than just changing a line but since you are developing the whole program, you would know what's happening. Do you know what happened?

Anyway, when you say have Baasbox(es) connecting to an embedded orientdb, how would that be possible? Even if it is possible, wouldnt the embedded orientdb becomes the bottleneck?

dirkam

unread,
Jan 8, 2015, 4:59:13 AM1/8/15
to baa...@googlegroups.com
What do you mean by that baasbox will not be able to handle more than 100k of users? Did you run into this or is it just an estimation?

@giastfader do you happen to have benchmarks on the scalability of the current standalone version?

giastfader

unread,
Jan 8, 2015, 1:38:30 PM1/8/15
to baa...@googlegroups.com
I suppose that BaasBox does not work because the first thing that actually fails is the check on the role of the actual user (here: https://github.com/baasbox/baasbox/blob/master/app/com/baasbox/db/DbHelper.java#L364 )

This happens because, if I remember well, for security reason, the OrientDB OUser.getRoles() API returns a fake information when invoked against a remote storage.
It should be changed into a select statement on the ORole class.

As far as the embedded OrientDB is concerned, I was not clear. The thing works because each BaasBox will use its own embedded OrientDB engine, and then it will be OrientDB itself that will take care of data sync through the nodes, just like a plain OrientDB cluster.



Csh

unread,
Jan 13, 2015, 12:58:55 AM1/13/15
to baa...@googlegroups.com
thanks for your reply giastfader. I hope this will be a useful thread to other Baasbox users too since many of us do want to know how to scale Baasbox and understand what is possible and what is not. 

I have read up further on OrientDb and know that it is possible to do a Multi-Master replication even with embedded Db. So I assume that we just need to setup Baasbox in this smiliar fashion. Since I won't need this scale atm, I won't go on and explore it but I hope Baasbox can provide us with a Blog example or something regarding this experiment to setup Baasbox with embedded OrientDb using OrientDb supported Hazelcast settings to setup a Multi Master cluster.

Many thanks and all the best to other Baasboxers!

Heng

Andre C

unread,
Apr 16, 2015, 7:04:10 PM4/16/15
to baa...@googlegroups.com
+1 for news and blog posts on BaasBox/OrientDB scale out. It is a crucial point for industrial grade mobile applications.

vvs

unread,
Jul 19, 2016, 3:25:34 AM7/19/16
to BaasBox
This seems like a year old topic. I have been evaluating usage BaaS for use in our projects and BaasBox seems like a very interesting. I was able to download and set up in a matter of minutes and I have been tempted to use it on projects until I realised that the scaling only seems vertical (i.e. put more ram, storage, cpu etc on the machine running baasbox). This post mentions about possibilities of horizontal scaling through multiple node but I can't see any definitive guide about how to go about it (even if on the hosted cloud service). Like csh I am at the beginning of a mobile app project and scaling is not a worry at the moment. But if the project does well, hitting the magic number of 100k users will definitely happen and I would prefer to have some clarity about BaasBox being able to handle that scale. 

Appreciate any up to date information on this topic.

KanagarajM

unread,
Nov 11, 2016, 2:23:35 AM11/11/16
to BaasBox
Its awesome that i could just setup on my local machine and start the baasbox.
It uses the Netty server for the http layer and am not sure how will scale when the request is getting blasted.
so is it possible to put under tomcat and run?
any inputs appreciated. Thanks.
Reply all
Reply to author
Forward
0 new messages