|
Planning
Information gathering -- what tools/libraries to use?
Server-to-client communicationWe need to be able to asynchronously pass messages from a web server to a web browser. This requires clever gimmicks.
Server-side JavaScriptWe need a CapTP implementation on the server. That means running either E on JavaScript on the server, or implementing CapTP in Yet Another Language. But using JavaScript has the clear advantage that we can test this CapTP implementation, and it only needs to (at first) interoperate with itself. So, use a server-side JavaScript implementation.
CryptoFor browser/server operation, we probably don't want to load crypto libraries on the client. That means that all our messages are plaintext-as-far-as-we-know delivered over HTTPS to the server, which does all the CapTP-related crypto (swiss number handling, VatIDs as public keys, etc) All of the 'in vat' computation runs on the browser, and the crypto for outside communication runs on the server. The browser and server form a single distributed machine, in a sense. The design of CapTP implementation may need to be revised to allow for only-asynchronous access to crypto operations. AddressingOur objects have the same address components as in Pluribus: VatID, swiss number, network address hints. However, the wire protocol is different (HTTPS-based). Therefore, it makes sense to use a different type of URL. captp://*vatID@locationhints/swissnum # Pluribus https://*vatID@locationhint/arbitrarypath/swissnum # Caja-CapTP perhaps https://*vatID@locationhint/arbitrarypath/#swissnum # Or this
The reason for possibly putting the swiss number in the fragment is this: In CapTP, there is at most one CapTP connection per pair of vats. The process of contacting an object is to open a connection, or reuse an existing one, to its vat, then lookup its swiss number over the connection. This process is analogous to "download a document and then lookup the fragment identifier in it". SerializationThis will be our serialization format: http://wiki.erights.org/wiki/Data-E_in_JSON |