Hi Antoine,

I suggest you to use the factory, it is much faster than manually acquiring
connections. If you are doing only read operations OrientGraphNoTx is ok,
just make sure that every actor has its own connection, the main constraint
you have here is that OrientDB connections are not thread safe, so they
cannot be shared between different threads

Luigi


2015-06-10 14:27 GMT+02:00 <[email protected]>:

> Hello,
>
> I'm developping a distributed application using the following tools :
> - Java 1.8 & Scala 2.11.6
> - Akka Toolkit 2.3.11
> - OrientDB 2.1 RC3
>
> I'm trying to figure out how to manage ressources such as threads,
> database connections, cores.
>
> Akka is a library to create actor-based softwares. Actors are independant
> units of work communicating with each others thanks to light messages.
> Akka constantly dispatches the actors on the available threads of the
> running JVM.
> I use the extension Akka Cluster which allows me to use several JVM
> processes (called nodes) across a network to balance workload and speed up
> the results.
>
> My application stores the inputs and outputs in one Graph database of
> OrientDB.
>
> In the current architecture, each node has several Actors running on them
> and they need to retrieve informations (read) from the database and
> eventually store back informations. We can visualize each actors as a
> database client.
>
> To communicate with the Graph database, I use a remote connection Factory.
> In order to retrieve informations I use Pipes from the GremlinJava API.
>
> I perform many reads and a few writes, and I'm not when to use connection
> factory and when to acquire a new graph with/without a Transaction.
>
> Should I create the factory at the start of my nodes, then use that
> factory to acquire graph each time an Actor needs to perform a Pipe request
> ?
> If my Actor only read the graph, is it safe to assume that I only need to
> acquire one graph with OrientGraphNoTx for the lifetime of the Actor, then
> process any number of Pipe requests, then close the graph ?
>
> Could I share one OrientGraphNoTx between Actors in the same JVM ?
>
> Regards,
> Antoine
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to