Skip to content

Instantly share code, notes, and snippets.

@changtimwu
Last active August 29, 2015 14:05
Show Gist options
  • Save changtimwu/972e1a5a6056267763bb to your computer and use it in GitHub Desktop.
Save changtimwu/972e1a5a6056267763bb to your computer and use it in GitHub Desktop.
rpc todo jobs
  • create a smith based net/rpc codec. simulate the following two apis
    • codec.MsgpackSpecRpc.ClientCodec -- done
    • codec.MsgpackSpecRpc.ServerCodec
  • pubsub in go-smith
    • net/rpc doesn't cover this. It's required to create a server to receive calls.
  • encoding/transportation conversion
    • encoding:
      • json/msgpack gateway.
    • transportation
      • smith/sockjs gateway.
  • bring this implementation to sockjs -->
    • sockjs with callback support
    • can sockjs used as transportation of net/rpc?
@changtimwu
Copy link
Author

this looks interesting http://www.gorillatoolkit.org/pkg/rpc but how to support pubsub?

@changtimwu
Copy link
Author

In smith, a specific seq ID 9999 is chosen to represent event message published from server.
Go's RPC client can't catch this since it's a unsolicited message. That's means its a response without previous correspondent request.

@changtimwu
Copy link
Author

no easy way to archive pubsub.

@changtimwu
Copy link
Author

an user's comment about using sockjs with martini. https://groups.google.com/forum/#!topic/martini-go/MD7IoaDqQ5g

@changtimwu
Copy link
Author

Beego has official example on how to integrate with sockjs
https://github.com/astaxie/beego/issues/20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment