Meridian Query Language SpecificationWe developed a language for safely executing general-purpose localization queries on Meridian hosts. The language enables a user to implement different localization algorithms based on the rings-of-rings overlay maintained by Meridian, which in turn enables the system to support a much larger class of algorithms than the three we explored in our SIGCOMM paper. The language for expressing these algorithms is a safe, polymorphic, dynamically-typed variant of C with tight resource controls and an extended set of library calls. Every Meridian packet carries the full query specified by the user, similar to a capsule in an active network, and the query is executed on each Meridian node it is forwarded. Hence the language can be used to implement and experiment with queries that we, the system implementers, have not yet thought of. Major differences between the Meridian Query Language and C1) No pointers, no heap objects.2) No global variables 3) No incrementers/decrementers 4) No +=, *=, etc operators 5) Compound statement (i.e. {...}) must follow if/else/else if 6) Dynamic type checking 7) Structs have implicit typedefs (i.e. don't need struct keyword when defining an instance of it) 8) Structs cannot have another struct as a field 9) Does not support array of arrays, although it does support array of structs that has an array field Due to the dynamic type checking, a program may fail a type check at a remote host, which can be difficult to debug. Testing the query locally is currently the best solution. LimitationsCurrently, the entire program plus the marshalled parameters must fit inside one UDP packet. The UDP payload size is set at 1400 bytes as many nodes have IP fragmentation disabled. The program text itself is compressed before being inserted into the packet, so the maximum size of the program text is approximately 3 KB. The entire query must be resolved within a 10 seconds timeout. Queries that take longer than the timeout will be automatically removed from the Meridian servers. A query is limited to O(N) number of hops/RPCs. Primitive typesint, double, stringAdditional structuresstruct Node { struct Measurement { System and Library CallsThe Meridian framework exports a set of interfaces through which query code can acquire node handles and perform latency probes.
DemoYou experiment with the Meridian Query Language by issuing queries in real time to our sample Meridian network. The demo is accessible here. All queries are limited to a total of 10 CPU seconds, are capped in how many packets they can send, and are limited in how much memory they can allocate, so the impact of errant queries on the network is limited. We reserve the right to terminate this service at any time for any reason for any user. |