Skip to main content Accessibility help
×
Home

A theory of RPC calculi for client–server model

  • KWANGHOON CHOI (a1) and BYEONG-MO CHANG (a2)

Abstract

With multi-tier programming languages, programmers can specify the locations of code to run in order to reduce development efforts for the web-based client–server model where programmers write client and server programs separately and test the multiple programs together. The RPC calculus, one of the foundations of those languages by Cooper and Wadler, has the feature of symmetric communication in programmer’s writing arbitrarily deep nested client–server interactions. The feature of the calculus is fully implemented by asymmetric communication in trampolined style suitable for the client–server model. However, the existing research only considers a stateless server strategy in which all server states are encoded for transmission to the client so that server states do not need to be stored in the server. It cannot always correctly handle all stateful operations involving disks or databases. To resolve this problem, we first propose new stateful calculi that fully support both symmetric communication from the programmer’s viewpoint and asymmetric communication in its implementation using trampolined style. All the existing calculi either provide only the feature of asymmetric communication or propose only symmetric implementation suitable for the peer-to-peer model, rather than the client–server model. Second, the method used to design our stateful server strategy is based on a new locative type system which paves the way for a theory of RPC calculi for the client–server model. Besides proposing the new stateful calculi, this theory can improve the existing stateless server strategy to construct new state-encoding calculi that eliminate runtime checks on remote procedure calls present in the existing strategy, and it enables us to design a new mixed strategy that combines the benefits of both kinds of strategies. As far as we know, there are no typed multi-tier calculi that offer programmers the feature of symmetric communication with the implementation of asymmetric communication under the three strategies together.

Copyright

References

Hide All
Balat, V. (2006) Ocsigen: Typing web interaction with Objective Caml. In ML’06: Proceedings of the 2006 Workshop on ML, pp. 8494.
Boudol, G., Luo, Z., Rezk, T. & Serrano, M. (2012) Reasoning about web applications: An operational semantics for HOP. ACM Trans. Program. Lang. Syst. 34(2), 10:110:40.
Chlipala, A. (2015) Ur/Web: A simple model for programming the web. In POPL’15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 153165.
Conway, M. E. (1963) Design of a separable transition-diagram compiler. Commun. ACM 6(7), 396408.
Cooper, E. K. & Wadler, P. (2009) The RPC calculus. In PPDP’09: Proceedings of the 11th ACM SIGPLAN Conference on Principles and Practice of Declarative Programming. New York, NY, USA: ACM, pp. 231242.
Cooper, E. K., Lindley, S., Wadler, P. & Yallop, J. (2007) Links: Web programming without tiers. In FMCO’06: Proceedings of the 5th International Conference on Formal Methods for Components and Objects. Berlin, Heidelberg: Springer-Verlag, pp. 266296.
Flanagan, C., Sabry, A., Duba, B. F. & Felleisen, M. (1993) The essence of compiling with continuations. In PLDI’93: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. New York, NY, USA: ACM, pp. 237247.
Ganz, S. E., Friedman, D. P. & Wand, M. (1999) Trampolined style. In ICFP’99: Proceedings of the Fourth ACM SIGPLAN International Conference on Functional Programming. New York, NY, USA: ACM, pp. 1827.
Gay, S. J. & Hole, M. (1999) Types and subtypes for client–server interactions. In ESOP’99: Proceedings of the 8th European Symposium on Programming Languages and Systems. London, UK, UK: Springer-Verlag, pp. 7490.
Graunke, P., Findler, R. B., Krishnamurthi, S. & Felleisen, M. (2001) Automatically restructuring programs for the web. In ASE’01: Proceedings of the 16th IEEE International Conference on Automated Software Engineering. Washington, DC, USA: IEEE Computer Society, pp. 211222.
Krishnamurthi, S., Hopkins, P. W., McCarthy, J., Graunke, P., Pettyjohn, G. & Felleisen, M. (2007) Implementation and use of the PLT scheme web server. Higher-Order Symb. Comput. 20(4), 431460.
Launchbury, J. & Peyton Jones, S. L. (1994) Lazy functional state threads. In PLDI’94: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. Orlando, Florida, USA, pp. 2435.
Matthews, J., Findler, R. B., Graunke, P., Krishnamurthi, S. & Felleisen, M. (2004). Automatically restructuring programs for the web. Autom. Softw. Eng. 11(4), 337364.
McCarthy, J. A. (2009) Automatically restful web applications: Marking modular serializable continuations. In ICFP’09: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming. New York, NY, USA: ACM, pp. 299310.
McCarthy, J. A. (2010) The two-state solution: Native and serializable continuations accord. In OOPSLA’10: Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications. New York, NY, USA: ACM, pp. 567582.
Murphy VII, T. (2008) Modal Types for Mobile Code. Ph.D. thesis, Carnegie Mellon University, Pittsburgh, PA, USA.
Murphy VII, T., Cray, K., Harper, R. & Pfenning, F. (2004) A symmetric modal lambda calculus for distributed computing. In LICS’04: Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science. Washington, DC, USA: IEEE Computer Society, pp. 286295.
Neubauer, M. & Thiemann, P. (2005) From sequential programs to multi-tier applications by program transformation. In POPL’05: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. New York, NY, USA: ACM, pp. 221232.
Queinnec, C. (2004) Continuations and web servers. Higher-Order Symb. Comput. 17(4), 277295.
Radanne, G. (2017) Tierless Web Programming in ML. Ph.D. thesis, University Paris Diderot.
Rastogi, A., Hammer, M. A. & Hicks, M. (2014) Wysteria: A programming language for generic, mixed-mode multiparty computations. In SP’14: Proceedings of the 2014 IEEE Symposium on Security and Privacy. Washington, DC, USA: IEEE Computer Society, pp. 655670.
Reynders, B., Devriese, D. & Piessens, F. (2014) Multi-tier functional reactive programming for the web. In Onward!’14: Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming & Software, pp. 5568.
Reynolds, J. C. (1972) Definitional interpreters for higher-order programming languages. In ACM’72: Proceedings of the ACM Annual Conference - Volume 2. New York, NY, USA: ACM, pp. 717740.
Serrano, M. & Berry, G. (2012) Multi-tier programming in Hop. Commun. ACM 55(8), 5359.
Serrano, M. & Prunet, V. (2016) A glimpse of Hopjs. In ICFP’16: Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, pp. 180192.
Serrano, M. & Queinnec, C. (2010) A multi-tier semantics for Hop. Higher-order Symb. Comput. 23(4), 409431.
Serrano, M., Gallesio, E. & Loitsch, F. (2006) Hop: A language for programming the web 2.0. In DLS’06: Proceedings of the 1st Dynamic Languages Symposium, pp. 975985.
Timany, A., Stefanesco, L., Krogh-Jespersen, M. & Birkedal, L. (2017) A logical relation for monadic encapsulation of state: Proving contextual equivalences in the presence of runST. In PACMPL’17: Proceedings of ACM Programming Languages, 2(POPL), pp. 64:1–64:28.

Metrics

Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

A theory of RPC calculi for client–server model

  • KWANGHOON CHOI (a1) and BYEONG-MO CHANG (a2)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *