I'm learning nanomsg and zeromq these days with Golang binding. I've tested with Req-Rep which can work, but is it a proper idea to use this mechanism to build reliable internal server for serving data under high concurrent requests (but from limited client sources < 30)?
Some pseudo code may looks like,
for {
data, conn = socketRep.readData()
go func(data, conn){
result=process(data)
conn.sendReply(result)
conn.close()
}()
}
How to achieve similar communication pattern in nanomsg? Is there any example (C is ok) available?
====UPDATE====
Sorry the question looks too broad. The most important question for me is, "Is there any workable Req/Rep example (C is ok) around?"