4

Is there any method to call a Scala function from PHP other than Thrift service? Initially I tried the Thrift service but the problem is, it works some times and some times it doesn't. Is there any easy solution to this problem?

The code below is my server.scala program

try {
    val serverTransport: TServerSocket= new TServerSocket(9778)
    val processor = new User_nodeService.Processor(User_node)
    val args1:Args = new Args(serverTransport)
    args1.processor(processor)
    val server:TServer = new TThreadPoolServer(args1)
    println("Started service successfully...")
    server.serve()
}

Sometimes I get this error "value processor is not a member of org.apache.thrift.server.TThreadPoolServer.Args" on the line "args1.processor(processor)" and sometimes the code works fine.

Nick
  • 11,475
  • 1
  • 36
  • 47
yAsH
  • 3,367
  • 8
  • 36
  • 67

1 Answers1

0

You could try gearman, there is a scala version available

https://github.com/efuquen/scala-gearman

http://gearman.org/

SamV
  • 7,548
  • 4
  • 39
  • 50