message CallInfo {required string name = 1; // method name
required string req = 2; // serialized argument
1. How to match request with its response?
2. How to support synchronous calls?
The underling socket layer must be no-blocking. But sometimes it's
very convenient to program on a synchronous model.
3. Could sharing the same TCP connection cause any problem?
Could this be possible : Thread A just finishes part of sending
request, context change happens, Thread B begins to send it's
request. The server would be unable to split the bit stream into
requests!
if that isn't a core element of the system, you're doing something very
wrong
>
> 2. Could run on top twisted framework but could also work with out
> twisted.
not using twisted will mean reinventing a very complicated wheel and
almost certainly doing it wrong. The only argument for not using
twisted is because people can't figure out asynchronous processing... in
which case, they should find another line of work.
>
> I shall spend about 2 to 4 weeks working on this to provide the first
> release. Hope I could finish it on time :)
this should take about 2 days to come up with a pre alpha version. But
before you start, you should look at foolscap which is the follow-on
twisted distributed object protocol.
>
> ==================================
>
> Some technical problems:
>
> 1. How to match request with its response?
This is what foolscap and deferreds are for
>
> For example, client called method A twice before server reply because
> the process of method A is very time consuming on server. So when
> server finished both of the calls, and sent them back to client, how
> could client match these requests to their initial requests?
that's what deferreds are for
>
> 2. How to support synchronous calls?
you shouldn't. if the client wants to block, that's their problem. you
return a value when you do... if they're blocking on the socket it's
independent of the server issue.
>
> The underling socket layer must be no-blocking. But sometimes it's
> very convenient to program on a synchronous model.
and wrong. and leads threads... which is always the path first taken by
those without any understanding of asynchronous programming... which
leads to non-deterministic bugs, synchronization issues etc.
unless its a really simple call on the client side and they don't care
about blocking... in which case you simply write a simple method which
ships the arguments across and blocks. if they need something fancier
they should be using twisted on the client. If they can't get it, they
should move on.
>
> 3. Could sharing the same TCP connection cause any problem?
i don't really understand what you're asking here... but there should be
only one connection between a client and server unless you're doing
specific things regarding control channels etc.
>
> Could this be possible : Thread A just finishes part of sending
> request, context change happens, Thread B begins to send it's
> request. The server would be unable to split the bit stream into
> requests!
if this is your understanding of the issues going in, I suggest stopping
now. its very clear you've done virtually no research and have no
understanding of the issues.
at best, somebody will pay attention and use what you write.
> >
--
Glenn H. Tarbox, PhD || gl...@tarbox.org
"Don't worry about people stealing your ideas. If your ideas are any
good you'll have to ram them down peoples throats" -- Howard Aiken
if this is your understanding of the issues going in, I suggest stoppingnow. its very clear you've done virtually no research and have no
understanding of the issues.
|
|