Ari, Thanks for responding.
There is a caveat. For certain operations, the Load Balancer type component is supposed to route the request to a specific server using Hessian. For this reason, we've written our own Load Balancer. Today, our Load Balancer code looks like the following to handle a request. We've put the variable to determine which server to route the request to into the binary data. LoadBalancer code for handling doFindByLogin private def doFindByLogin(byte[] bytes) { //Create a fake inputStream so hessian can decode for us def fakeInput = new ByteArrayInputStream((byte[]) bytes.clone()) // Find the server that matches the given login HessianInput input = new HessianInput(fakeInput); input.readCall() input.readMethod() input.readString() // retrieve the context were the operation is performed so we can route it to the right server Long contextId = input.readLong() Server server = Context.get(contextId)?.server if (!server) { server = Server.get(1) } //Execute the server call byte[] responseBytes = serverService.sendClientRequest(server.url, USER_SERVICE, bytes) // Send the response to the client serverService.sendServerResponse(responseBytes, response) } The problem with this implementation is all of the data is funneled back and forth through the Load Balancer. We're also cloning the incoming bytes. Ideally, we'd redirect the request to the correct server, but I do not have a good example for how to do a Hessian redirect. Do you have any thoughts for how to effectively do a redirect with Hessian? Thanks, Joel On Sun, May 4, 2014 at 10:00 AM, <hessian-interest-requ...@caucho.com>wrote: > Send hessian-interest mailing list submissions to > hessian-interest@caucho.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://maillist.caucho.com/mailman/listinfo/hessian-interest > or, via email, send a message with subject or body 'help' to > hessian-interest-requ...@caucho.com > > You can reach the person managing the list at > hessian-interest-ow...@caucho.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of hessian-interest digest..." > > > Today's Topics: > > 1. Hessian Load Balancer (Joel Garcia) > 2. Re: Hessian Load Balancer (Aristedes Maniatis) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sat, 3 May 2014 16:54:12 -0700 > From: Joel Garcia <joelgar...@tidalwaveapp.com> > Subject: [Hessian-interest] Hessian Load Balancer > To: hessian-interest@caucho.com > Message-ID: > < > cakchhl9bq6jfmm1peoqj04hkkmu2tqws2jl6rqf6i9pro-y...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > What's the best way to have a Java Spring client communicate with multiple > Java Spring servers via the Hessian protocol. > > Ideally, I'd like to introduce a Load Balancer component to function as a > Proxy, but I'd prefer for the request to be proxied to one of the Java > Spring servers as opposed to having the Load Balancer function as a middle > man for all communication. > > Does anyone know of a good solution for this? > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://maillist.caucho.com/pipermail/hessian-interest/attachments/20140503/a1f5b5f2/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Sun, 04 May 2014 11:58:55 +1000 > From: Aristedes Maniatis <a...@ish.com.au> > Subject: Re: [Hessian-interest] Hessian Load Balancer > To: Discussion of the Hessian protocol <hessian-interest@caucho.com> > Message-ID: <53659edf.7080...@ish.com.au> > Content-Type: text/plain; charset=ISO-8859-1 > > Why does this have anything to do with Hessian at all? Push hessian data > over http and then use one of the million http load balancer solutions > available. > > Ari > > On 4/05/2014 9:54am, Joel Garcia wrote: > > What's the best way to have a Java Spring client communicate with > multiple Java Spring servers via the Hessian protocol. > > > > Ideally, I'd like to introduce a Load Balancer component to function as > a Proxy, but I'd prefer for the request to be proxied to one of the Java > Spring servers as opposed to having the Load Balancer function as a middle > man for all communication. > > > > Does anyone know of a good solution for this? > > > > > > _______________________________________________ > > hessian-interest mailing list > > hessian-interest@caucho.com > > http://maillist.caucho.com/mailman/listinfo/hessian-interest > > > > -- > --------------------------> > Aristedes Maniatis > ish > http://www.ish.com.au > Level 1, 30 Wilson Street Newtown 2042 Australia > phone +61 2 9550 5001 fax +61 2 9550 4001 > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A > > > > ------------------------------ > > _______________________________________________ > hessian-interest mailing list > hessian-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/hessian-interest > > > End of hessian-interest Digest, Vol 75, Issue 2 > *********************************************** > -- Joel Garcia, COO TidalWave Interactive, LLC. 101 California, Suite 2450 San Francisco, CA, 94111 (415) 244-0933 http://www.tidalwaveapp.com LinkedIn: www.linkedin.com/in/joelgarcia Twitter: joelphilipgarcia
_______________________________________________ hessian-interest mailing list hessian-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/hessian-interest