[OFBiz] Users - RMI / database shared / disconnected operation / sync

Si Chen schen at graciousstyle.com
Tue Sep 28 13:00:55 EDT 2004


Hi everyone.

I am running two production instances against a single database.  It is 
quite easy to set up.  You would have the same database referenced in 
your entityengine.xml, possibly using a different sequenced-id-prefix if 
you wish.  In the case of the job sandbox, there is a configuration 
properties file where you can give each instance a different name, and 
you can then edit the JobSandbox entity to specify the name of the 
instance to run each job.  Once it's there, it will always be run by the 
same instance.

In terms of rmi synchronization, you can do that as well if you wish, 
and I have gotten it to work as well.  The advantage is you will have 
two completely separate instances running off separate databases and 
synchronize them, either with scheduled jobs or with a command to do it 
at your discretion.  If the network connection goes down, the 
synchronization will be marked as failed.  You may have to go back into 
the entity engine to change the status of that particular 
synchronization job to get it to run again.

I think if you are concerned about a disconnection, then your best bet 
is to go with synchronization via rmi.  That way if the internet link is 
down, each instance can still run independently of each other.  OfBiz 
will set up all the keys in a way that they won't conflict with each 
other.  The downside of RMI is it does have more overhead.  Also, be 
aware that both sides of RMI must have public IP addresses--I do not 
believe you can get RMI to hop over a firewall.

Si

John Jones wrote:

>ok 
>
>so we have one ofbiz server in office and want to push this out to use
>on the Internet (colo server) and use the POS component
>                      
>                           Internet                           office LAN
>      ___________     /          ___________          \     ___________
>      |                  |     \         |                    |       
>/     |                  |
>      |  ISP server |------/--------| Office Server |--------\-----|
>POS server |
>      |__________|      \        |____________|        /    |___________|
>
>people use RMI to keep system in sync then ?
>(I have not looked at this and I presume that it would just call the
>methods on the office ofbiz server  )
>
>so what happens about disconnection ?
>
>Internet connection is never like a LAN.... 
>
>yes you can sync the DB's very nicely but unless multiple ofbiz can
>talk happily to the same DB live then syncing the DB wont help
>
>so i would be interested to see how others do it 
>
>regards
>
>John Jones
>
>
>On Tue, 28 Sep 2004 04:26:10 -0700, Brett G. Palmer
><brett.palmer at in2m.com> wrote:
>  
>
>>I've run multiple ofbiz server's against a single database in
>>development as well (not in production).  I know that every instance of
>>ofbiz will try to execute the services in the job_sandbox, but they
>>should be synchronized to only allow a single execution.  I'm not sure
>>this a real problem.  What are the side effects have you found with
>>running multiple instances of ofbiz against a single database?
>>
>>Brett
>>
>>
>>
>>bjfree at free-man.net wrote:
>>
>>    
>>
>>>I am running more than one ofbiz in a development.
>>>you can connect to the save server but not the same dB, unless you append an
>>>ID to the sandbox processes. lot of rework.
>>>I believe the RMI is the preferred method for tiering.
>>>I use AS2 since it fits other interfaces I have to do for EDI.
>>>
>>>-----Original Message-----
>>>From: John Jones [mailto:jones.john at gmail.com]
>>>Sent: Monday, September 27, 2004 11:21 PM
>>>To: OFBiz Users / Usage
>>>Subject: Re: [OFBiz] Users - Starting Derby in Multi-Client (Server)
>>>mode
>>>
>>>
>>>no i have not tried this out and I am very interested
>>>As I wonder if it would be possible to run multiple ofbiz instances
>>>connected to the same DB....
>>>
>>>to produce a tiered ofbiz...
>>>
>>>regards
>>>
>>>John Jones
>>>
>>>On Mon, 27 Sep 2004 13:44:17 -0600, Brett Palmer <brett.palmer at in2m.com>
>>>wrote:
>>>
>>>
>>>      
>>>
>>>>I've been using Apache's Derby (formerly Cloudscape) database for
>>>>development on Linux and Windows for a few days.  It's a nice database
>>>>especially if you develop on multiple platforms.  Derby comes in two
>>>>standard configurations:
>>>>
>>>>1. Embedded Mode which is the default configuration for OFBiz.
>>>>
>>>>2. Multi-client or server mode:  This is run like most database
>>>>servers.  It is run separately from the application and requires the DB2
>>>>JDBC driver from IBM.
>>>>
>>>>The embedded mode is nice because it just starts when the ofbiz
>>>>application server starts but then you can't access it from a JDBC
>>>>client.  I've been able to get ofbiz to talk to Derby in the server mode
>>>>but this requires that I start the Derby server up in another process.
>>>>The Derby docs says that it is possible to start the Derby server up in
>>>>server mode inside the application.  Does anyone know if ofbiz has been
>>>>configured to support this option?  If ofbiz isn't configured to support
>>>>this option is anyone interested?  Let me know and I'll do some research
>>>>to see how difficult it would be to support starting the Derby server up
>>>>when ofbiz starts.
>>>>
>>>>Thanks,
>>>>
>>>>Brett
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>
>>>      
>>>
>>_______________________________________________
>>Users mailing list
>>Users at lists.ofbiz.org
>>http://lists.ofbiz.org/mailman/listinfo/users
>>
>>    
>>
>
>
>
>  
>


More information about the Users mailing list